CN112711512A - Prometheus monitoring method, device and equipment - Google Patents

Prometheus monitoring method, device and equipment Download PDF

Info

Publication number
CN112711512A
CN112711512A CN202011601855.1A CN202011601855A CN112711512A CN 112711512 A CN112711512 A CN 112711512A CN 202011601855 A CN202011601855 A CN 202011601855A CN 112711512 A CN112711512 A CN 112711512A
Authority
CN
China
Prior art keywords
monitoring
prometheus
target
data
alarm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011601855.1A
Other languages
Chinese (zh)
Inventor
逄立业
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN202011601855.1A priority Critical patent/CN112711512A/en
Publication of CN112711512A publication Critical patent/CN112711512A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method, a device and equipment for monitoring Prometheus, wherein the method comprises the following steps: interacting with a service discovery registration center to obtain a monitoring target; performing Prometous monitoring on the monitored target to acquire monitoring data corresponding to the monitored target; storing the monitoring data to an M3DB database; the method utilizes the M3DB database to perform distributed centralized storage on the Prometheus monitoring data, so that the Prometheus monitoring data storage can meet the concurrent requirements of large-scale monitoring read-write, and the high availability of Prometheus in a large-scale scene is ensured; and the monitoring target is obtained by interacting with the service discovery registration center, and the service discovery registration center is used as an agent, so that the Prometheus can obtain the monitoring target only by inquiring the agent, the static configuration process of the monitoring target is reduced, and the user experience is improved.

Description

Prometheus monitoring method, device and equipment
Technical Field
The invention relates to the technical field of monitoring, in particular to a method, a device and equipment for monitoring Prometheus.
Background
Prometheus is an open source monitoring system, an open source version of Google BorgMon (a monitoring system). Prometheus is gaining increasing attention with the rise of container and kubernets (K8 s for short) technology for managing containerized applications on multiple hosts in a cloud platform.
With the continuous expansion of kubernets cluster scale, Prometheus is more prominent in the bottleneck of high concurrency scenes, and the local storage mode of Prometheus cannot completely meet the concurrency requirements of large-scale monitoring read-write. Therefore, how to enable the monitoring data storage of Prometheus to meet the concurrent requirement of reading and writing of large-scale monitoring and ensure the high availability of Prometheus in a large-scale scene is an urgent problem to be solved nowadays.
Disclosure of Invention
The invention aims to provide a Prometheus monitoring method, a Prometheus monitoring device and Prometheus monitoring equipment, so that the monitoring data storage of Prometheus can meet the concurrent requirements of read-write of large-scale monitoring, and the high availability of Prometheus in a large-scale scene is ensured.
In order to solve the above technical problem, the present invention provides a Prometheus monitoring method, including:
interacting with a service discovery registration center to obtain a monitoring target;
performing Prometous monitoring on the monitoring target to acquire monitoring data corresponding to the monitoring target;
storing the monitoring data to an M3DB database.
Optionally, when the service discovery registration center includes the K8s server, the interacting with the service discovery registration center to obtain the monitoring target includes:
interacting with the K8s server to obtain a monitoring container and a monitoring service object; wherein the monitoring target comprises the monitoring container and a monitoring service object.
Optionally, when the service discovery registration center includes an OpenStack server, the interacting with the service discovery registration center to obtain the monitoring target includes:
searching a monitoring cloud host from an application program interface of the OpenStack server; wherein the monitoring target comprises the monitoring cloud host.
Optionally, the method further includes:
acquiring instructions according to data of each preset panel in the acquired Grafana panel tool;
and acquiring target monitoring data corresponding to the data acquisition instruction from the M3DB database, so as to display the target monitoring data by using the preset panel in the dashboard of the Grafana panel tool.
Optionally, the storing the monitoring data in the M3DB cluster includes:
storing the monitoring data to the M3DB database using a nginx tool.
Optionally, the method further includes:
generating alarm information according to the monitoring data;
and grouping the alarm information, acquiring an alarm notification corresponding to each group of the alarm information, and sending the alarm notification to an alarm system.
Optionally, the obtaining alarm information according to the monitoring data includes:
and the Prometheus alarm server generates the alarm information according to the monitoring data acquired from the M3DB database.
Optionally, the grouping the alarm information to obtain an alarm notification corresponding to each group of the alarm information includes:
and grouping the alarm information according to the cluster or the alarm name of the service corresponding to the alarm information, and acquiring an alarm notification corresponding to each group of the alarm information.
The invention also provides a Prometheus monitoring device, which comprises:
the target acquisition module is used for interacting with the service discovery registration center to acquire a monitoring target;
the data acquisition module is used for performing Prometous monitoring on the monitoring target and acquiring monitoring data corresponding to the monitoring target;
and the storage module is used for storing the monitoring data to an M3DB database.
The invention also provides a Prometheus monitoring device, which comprises:
a memory for storing a computer program;
a processor for implementing the steps of the Prometheus monitoring method as described above when executing the computer program.
The invention provides a Prometheus monitoring method, which comprises the following steps: interacting with a service discovery registration center to obtain a monitoring target; performing Prometous monitoring on the monitored target to acquire monitoring data corresponding to the monitored target; storing the monitoring data to an M3DB database;
therefore, the method and the device have the advantages that the M3DB database is used for carrying out distributed centralized storage on the Prometheus monitoring data, so that the Prometheus monitoring data storage can meet the concurrent requirements of large-scale monitoring reading and writing, and the high availability of Prometheus in a large-scale scene is ensured; and the monitoring target is obtained by interacting with the service discovery registration center, and the service discovery registration center is used as an agent, so that the Prometheus can obtain the monitoring target only by inquiring the agent, the static configuration process of the monitoring target is reduced, and the user experience is improved. In addition, the invention also provides a Prometheus monitoring device and equipment, and the Prometheus monitoring device and equipment also have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a Prometheus monitoring method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of another Prometheus monitoring method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of another Prometheus monitoring method according to an embodiment of the present invention;
fig. 4 is a diagram showing an instrument panel of a Grafana panel tool according to another Prometheus monitoring method provided in the embodiment of the present invention;
fig. 5 is a block diagram of a Prometheus monitoring apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a Prometheus monitoring device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a Prometheus monitoring method according to an embodiment of the present invention. The method can comprise the following steps:
step 101: and interacting with the service discovery registration center to obtain a monitoring target.
It can be understood that, in this step, a processor in the Prometheus server (i.e., a server in the Prometheus monitoring system) may interact with the service discovery registry to obtain a target to be monitored (i.e., a monitoring target), such as a container and a service object to be monitored in a container management platform like K8s, a cloud host to be monitored in an OpenStack (an open source cloud computing management platform project) platform, and an application service instance to be monitored in an application program of the micro service architecture. That is, the service discovery registry can serve as an agent, so that Prometheus can obtain the monitoring target only by inquiring the agent, and the static configuration process of the monitoring target is reduced.
Specifically, the specific choice of the service discovery registry in this embodiment may be set by the designer according to the practical scenario and the user requirement, for example, in the application scenario of the K8s platform, the K8s server grasps and manages all containers and service information, and then the promemeus server only needs to interact with the K8s server to find all containers (i.e., monitoring containers) and service objects (i.e., monitoring service objects) that need to be monitored; that is, when the service discovery registration center includes the K8s server, the processor of the promemeus server in this step may interact with the K8s server to obtain the monitoring container and the monitoring service object; the monitoring target comprises a monitoring container and a monitoring service object.
In the application scenario of the private cloud platform of the OpenStack, since the cloud platforms master the information of all resources, the cloud platforms play the role of an agent, and the Prometheus server can find all cloud hosts (namely, monitoring cloud hosts) needing to be monitored only by using an API (application program interface) provided by the OpenStack platform in the OpenStack server; that is to say, when the service discovery registration center includes an OpenStack server, in this step, the processor of the prometeus server may search for the monitoring cloud host from the application program interface of the OpenStack server; the monitoring target comprises a monitoring cloud host.
Prometheus can also be directly integrated with some open-source service discovery tools, for example, in an application program of a micro-service architecture, service discovery registration software (such as Consul software) is often used, and Prometheus can also be integrated with it so as to dynamically discover application service instances (i.e., monitoring services) that need to be monitored; that is, when the service discovery registration center includes the service discovery registration software, the processor of the promemeus server in this step may acquire the monitoring service by using the service discovery registration software; wherein the monitoring target comprises a monitoring service. As long as the processor of the Prometheus server can acquire the monitoring target by interacting with the service discovery registry, the specific selection of the service discovery registry is not limited in this embodiment.
It should be noted that, in this embodiment, the processor of the Prometheus server may obtain the monitoring target in a dynamic manner of interacting with the service discovery registration center; the processor can also acquire the monitoring target according to the monitoring target information of static configuration (such as static _ configurations) and the interaction with the service discovery registry; besides being integrated with the public cloud, the private cloud, the container cloud and the special service discovery registration software of these platform levels, the Prometheus can also support dynamic discovery of the monitoring target in a DNS (Domain Name System) and file-based manner, that is, the processor can also acquire the monitoring target in a DNS access and file analysis manner, which is not limited in this embodiment.
Step 102: and performing Prometous monitoring on the monitored target to acquire monitoring data corresponding to the monitored target.
It is understood that the purpose of this step may be that the processor of the Prometheus server obtains corresponding monitoring data by performing Prometheus monitoring on the monitoring target. For a specific manner of performing Prometheus monitoring on the monitored target by the processor in this embodiment, a manner similar to or the same as a monitoring method of the Prometheus monitoring system in the prior art for the monitored target may be adopted, and this embodiment does not limit this.
Step 103: the monitoring data is stored to the M3DB database.
The M3DB database in this step may be an open-source distributed time sequence database, the M3DB database may aggregate 5 hundred million metrics per second, and continuously store 2000 million metric metrics per second worldwide (using the M3DB database), and the batch write persists each metric to three copies of the region. The M3DB database also allows engineers to write metrology strategies that tell them to run at a particular granularity (e.g., one second, ten seconds, one minute, ten minutes, etc.) with shorter or longer retention times (e.g., two days, one month, six months, one year, three years, five years, etc.). This allows engineers and data scientists to intelligently store different reserved time series in a fine and coarse granularity range using metric tags that match defined storage policies.
It can be understood that, in this step, the processor of the Prometheus server stores the monitoring data in the M3DB database, and the M3DB database can be used to perform persistent distributed centralized storage on the monitoring data of Prometheus, so that the monitoring data storage of Prometheus can meet the concurrent requirement of read and write of large-scale monitoring, and high availability of Prometheus in a large-scale scene is ensured.
Specifically, this embodiment does not limit the specific way in which the processor of the Prometheus server stores the monitoring data in the M3DB database, and as shown in fig. 2 and fig. 3, the processor of the Prometheus server may store the monitoring data in the M3DB database by using a nginx (a load balancing and proxy tool) tool.
Further, in order to realize visualization of monitoring data of Prometheus, the method for monitoring Prometheus provided by this embodiment may further include: acquiring data acquisition instructions of each preset panel in the acquired Grafana (an open source panel tool) panel tool; and acquiring target monitoring data corresponding to the data acquisition instruction from the M3DB database so as to display the target monitoring data by using a preset panel in an instrument panel of the Grafana panel tool. That is, in the present embodiment, the Dashboard (Dashboard) of the Grafana panel tool managed by the web can be utilized to organize and manage the visual charts of the monitoring data. The Dashboard of the Grafana Panel tool may be as shown in fig. 4, where one of the most basic visualization units in a Dashboard is a Panel, and the Panel shows visualized data (i.e. target monitoring data) in the form of a trend graph or a thermodynamic diagram; and each Panel in the Dashboard is a completely independent part, a Query Editor (Query Editor) of the Panel can set a Data Source and a Data Query mode for each Panel, for example, promeheus is used as a Data Source (Data Source), in the Query Editor, Data Query can be performed by using PromQL (Data Query language built in promeheus), and the Panel is responsible for querying and visualizing corresponding Data from a specific promeheus. Since each Panel is completely independent, it is likely that Data from multiple Data sources will be contained in a Dashboard.
Correspondingly, the method provided by the embodiment may further include: adjusting each preset panel in the Grafana panel tool according to the acquired row management instruction; as shown in fig. 4, a Row may be defined in the Dashboard page to organize and manage a group of associated panels (i.e. preset panels), so that a user may generate a Row management instruction by operation to control the processor to adjust (e.g. delete or add) the preset panels.
Specifically, in this embodiment, the processor of the Prometheus server may acquire an instruction according to data of each preset Panel (i.e., Panel) in the obtained Grafana Panel tool; acquiring target monitoring data corresponding to the data acquisition instruction from an M3DB database by using a nginx tool so as to display the target monitoring data by using a preset panel in an instrument panel of the Grafana panel tool; namely, the Prometheus server can use the grapana panel tool to display the monitoring data (i.e. target monitoring data) to be displayed. The method provided by the embodiment may further include the steps that the Grafana server obtains target monitoring data corresponding to each preset panel from the M3DB database by using a nginx tool, and displays the target monitoring data by using the preset panels in the dashboard of the Grafana panel tool; namely, a separate Grafana server for displaying the monitoring data, the target monitoring data can be directly obtained from the M3DB database and displayed in the dashboard.
Further, the method provided by this embodiment may further include a step of generating an alarm notification according to the monitoring data, so that when the monitoring data meeting the alarm rule is monitored, the user is timely reminded of the problem existence condition through the alarm notification, and the problem is quickly located.
Correspondingly, because the workload of the monitoring node (i.e., the prometheus server) of prometheus does not reach a certain load in a general scale or large scale scene (as shown in fig. 2), calculating to generate the alarm notification corresponding to the monitoring data and sending the alarm notification do not bring a large overhead, and the requirement on the real-time performance of the alarm can be met; that is, in this embodiment, the Prometheus server may generate an alarm notification according to the monitoring data. In a super-large-scale scenario (as shown in fig. 3), the load of a monitoring node of the prometheus (i.e., a prometheus server) tends to or approaches saturation, and the alarm rule calculation can not quickly calculate a result because of the shortage of processor (e.g., CPU) resources, which may cause delay in alarm transmission and possibly cause a disaster failure, at this time, an alarm node (i.e., a prometheus alarm server) specially responsible for calculation and transmission of an alarm notification corresponding to monitoring data may be added to the prometheus, so that the alarm notification may be quickly calculated, and thus, the real-time performance of quick early warning and monitoring is realized; that is, in this embodiment, the prometheu alarm server may generate an alarm notification according to the monitoring data acquired from the M3DB database.
Specifically, the prometheu server or the prometheu alarm server may generate alarm information according to the monitoring data meeting the alarm rule; and sending the alarm notification corresponding to the alarm information to an alarm system (such as an open source alarm system), so as to realize monitoring alarm on the monitored target.
Furthermore, the situation that a user is difficult to quickly locate problems due to the fact that a large number of alarm notifications are triggered at one time is avoided; for example, when there are hundreds of running service instances in the cluster and an alarm rule is set for each service instance, if a network failure occurs at this time, a large number of service instances may not be connected to the database, and as a result, a large number of alarm notifications are sent to the alarm system; as a user, it may be desirable to be able to see in an alert notification which service instances are affected. In this embodiment, the prometheu server or the prometheu alarm server may group the alarm information, obtain an alarm notification corresponding to each group of alarm information, and send the alarm notification to the alarm system; for example, according to the alarm name of the alarm information or the cluster where the corresponding service is located, the alarm information is grouped, and an alarm notification corresponding to each group of alarm information is obtained.
Alternatively, a server (e.g., an alert server) of the alert system such as alert manager may group alert notifications sent by a promemeu server or a promemeu alert server, obtain an alert content corresponding to each of the alert notifications in each group, and send the alert content to a corresponding alert channel, so as to notify the user of the alert content through the alert channel. That is, the alarm system may group alarm notifications by clusters or alarm names of the service using a grouping mechanism, and group multiple alarm notifications together into one alarm content. If the alarm system is alert manager, the alert grouping, the alert time, the alert receiving mode, etc. can be configured in the configuration file of alert manager.
Correspondingly, the alert manager server can also stop sending other alert contents triggered by the alert contents to realize the function of alert suppression, and prevent a user from receiving a large amount of alert contents irrelevant to actual problems. For example, when a cluster is inaccessible, which triggers the sending of an alert content, all other alert content relating to the cluster can be stopped by configuring the alert manager.
Further, the alert manager server can also judge whether the received alarm notification conforms to the silence rule; if yes, ignoring the alarm notification meeting the silence rule; if not, acquiring and sending alarm content corresponding to the alarm notification. Therefore, a simple silence mechanism can be used for rapidly carrying out silence processing on the alarm notification according to the label, and generation and sending of useless alarm content are avoided.
In the embodiment of the invention, the M3DB database is used for carrying out distributed centralized storage on the monitoring data of Prometheus, so that the concurrent requirements of reading and writing of large-scale monitoring can be met by the monitoring data storage of Prometheus, and the high availability of Prometheus in a large-scale scene is ensured; and the monitoring target is obtained by interacting with the service discovery registration center, and the service discovery registration center is used as an agent, so that the Prometheus can obtain the monitoring target only by inquiring the agent, the static configuration process of the monitoring target is reduced, and the user experience is improved.
Referring to fig. 5, fig. 5 is a block diagram of a Prometheus monitoring device according to an embodiment of the present invention.
A target obtaining module 10, configured to interact with a service discovery registration center to obtain a monitoring target;
the data acquisition module 20 is configured to perform Prometheus monitoring on the monitored target and acquire monitoring data corresponding to the monitored target;
and the storage module 30 is used for storing the monitoring data into the M3DB database.
Optionally, when the service discovery registration center includes a K8s server, the target obtaining module 10 may include:
the first obtaining submodule is used for interacting with the K8s server to obtain a monitoring container and a monitoring service object; the monitoring target comprises a monitoring container and a monitoring service object.
Optionally, when the service discovery registry includes an OpenStack server, the target obtaining module 10 may include:
the second acquisition sub-module is used for searching the monitoring cloud host from an application program interface of the OpenStack server; the monitoring target comprises a monitoring cloud host.
Optionally, the apparatus may further include:
the instruction acquisition module is used for acquiring instructions according to the acquired data of each preset panel in the Grafana panel tool;
and the display module is used for acquiring target monitoring data corresponding to the data acquisition instruction from the M3DB database so as to display the target monitoring data by utilizing a preset panel in an instrument panel of the Grafana panel tool.
Optionally, the storage module 30 may be specifically configured to store the monitoring data in the M3DB database by using the nginx tool.
Optionally, the apparatus may further include:
the generating module is used for generating alarm information according to the monitoring data;
and the alarm module is used for grouping the alarm information, acquiring an alarm notification corresponding to each group of alarm information and sending the alarm notification to the alarm system.
Optionally, the generating module may be specifically configured to generate the alarm information according to the monitoring data acquired from the M3DB database.
Optionally, the alarm module may be specifically configured to group the alarm information according to the cluster where the service corresponding to the alarm information is located or the alarm name, and obtain an alarm notification corresponding to each group of alarm information.
In the embodiment of the invention, the M3DB database is used for carrying out distributed centralized storage on the monitoring data of Prometheus, so that the concurrent requirements of reading and writing of large-scale monitoring can be met by the monitoring data storage of Prometheus, and the high availability of Prometheus in a large-scale scene is ensured; and the target acquisition module 10 interacts with the service discovery registration center to acquire the monitoring target, and the service discovery registration center is used as an agent, so that the Prometheus can acquire the monitoring target only by inquiring the agent, the static configuration process of the monitoring target is reduced, and the user experience is improved.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a Prometheus monitoring device according to an embodiment of the present invention. The device 1 may comprise:
a memory 11 for storing a computer program; a processor 12, configured to implement the steps of the Prometheus monitoring method provided in the above embodiments when the computer program is executed.
The device 1 may include a memory 11, a processor 12 and a bus 13.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the device 1. The memory 11 may in other embodiments also be an external storage device of the device 1, such as a plug-in hard disk provided on a Prometheus server, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. Further, the memory 11 may also comprise both internal memory units of the device 1 and external memory devices. The memory 11 can be used not only for storing application software installed in the device 1 but also various types of data, such as: the code of the program, etc. executing the Prometheus monitoring method, can also be used to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip in some embodiments, and is used for running program codes stored in the memory 11 or Processing data, such as codes of a program for executing a Prometheus monitoring method.
The bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
Further, the device may further comprise a network interface 14, and the network interface 14 may optionally comprise a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the device 1 and other electronic devices.
Optionally, the device 1 may further comprise a user interface 15, the user interface 15 may comprise a Display (Display), an input unit such as keys, and the optional user interface 15 may also comprise a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the device 1 and for displaying a visual user interface.
Fig. 6 only shows the device 1 with the components 11-15, and it will be understood by a person skilled in the art that the structure shown in fig. 6 does not constitute a limitation of the device 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
In addition, a computer-readable storage medium is further disclosed, and a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of the Prometheus monitoring method provided by the above embodiments.
Wherein the storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device, the apparatus and the computer-readable storage medium disclosed in the embodiments correspond to the method disclosed in the embodiments, so that the description is simple, and the relevant points can be referred to the description of the method.
The foregoing describes a method, an apparatus, and a device for monitoring Prometheus provided by the present invention in detail. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A method of Prometheus monitoring, comprising:
interacting with a service discovery registration center to obtain a monitoring target;
performing Prometous monitoring on the monitoring target to acquire monitoring data corresponding to the monitoring target;
storing the monitoring data to an M3DB database.
2. The data storage method for Prometheus monitoring of claim 2, wherein when the service discovery registry comprises a K8s server, the interacting with the service discovery registry to obtain the monitoring target comprises:
interacting with the K8s server to obtain a monitoring container and a monitoring service object; wherein the monitoring target comprises the monitoring container and a monitoring service object.
3. The data storage method for Prometheus monitoring of claim 2, wherein when the service discovery registry comprises an OpenStack server, the interacting with the service discovery registry to obtain the monitoring target comprises:
searching a monitoring cloud host from an application program interface of the OpenStack server; wherein the monitoring target comprises the monitoring cloud host.
4. The Prometheus monitoring method of claim 1, further comprising:
acquiring instructions according to data of each preset panel in the acquired Grafana panel tool;
and acquiring target monitoring data corresponding to the data acquisition instruction from the M3DB database, so as to display the target monitoring data by using the preset panel in the dashboard of the Grafana panel tool.
5. The Prometheus monitoring method of claim 1, wherein storing the monitoring data to an M3DB cluster comprises:
storing the monitoring data to the M3DB database using a nginx tool.
6. The Prometheus monitoring method of any one of claims 1 to 5, further comprising:
generating alarm information according to the monitoring data;
and grouping the alarm information, acquiring an alarm notification corresponding to each group of the alarm information, and sending the alarm notification to an alarm system.
7. The Prometheus monitoring method of claim 6, wherein the obtaining alarm information according to the monitoring data comprises:
and the Prometheus alarm server generates the alarm information according to the monitoring data acquired from the M3DB database.
8. The Prometheus monitoring method of claim 6, wherein the grouping the alarm information to obtain one alarm notification corresponding to each group of the alarm information comprises:
and grouping the alarm information according to the cluster or the alarm name of the service corresponding to the alarm information, and acquiring an alarm notification corresponding to each group of the alarm information.
9. A Prometheus monitoring device, comprising:
the target acquisition module is used for interacting with the service discovery registration center to acquire a monitoring target;
the data acquisition module is used for performing Prometous monitoring on the monitoring target and acquiring monitoring data corresponding to the monitoring target;
and the storage module is used for storing the monitoring data to an M3DB database.
10. A Prometheus monitoring device, comprising:
a memory for storing a computer program;
processor for implementing the steps of the Prometheus monitoring method according to any of claims 1 to 8 when executing the computer program.
CN202011601855.1A 2020-12-29 2020-12-29 Prometheus monitoring method, device and equipment Pending CN112711512A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011601855.1A CN112711512A (en) 2020-12-29 2020-12-29 Prometheus monitoring method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011601855.1A CN112711512A (en) 2020-12-29 2020-12-29 Prometheus monitoring method, device and equipment

Publications (1)

Publication Number Publication Date
CN112711512A true CN112711512A (en) 2021-04-27

Family

ID=75546852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011601855.1A Pending CN112711512A (en) 2020-12-29 2020-12-29 Prometheus monitoring method, device and equipment

Country Status (1)

Country Link
CN (1) CN112711512A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113220420A (en) * 2021-05-18 2021-08-06 北京百度网讯科技有限公司 Service monitoring method, device, equipment, storage medium and computer program product
CN114328107A (en) * 2021-12-28 2022-04-12 北京易华录信息技术股份有限公司 Monitoring method and system for optomagnetic fusion storage server cluster and electronic equipment
CN114490241A (en) * 2021-12-25 2022-05-13 苏州浪潮智能科技有限公司 Chip monitoring method, system, storage medium and equipment
CN116737514A (en) * 2023-08-15 2023-09-12 南京国睿信维软件有限公司 Automatic operation and maintenance method based on log and probe analysis
CN117194149A (en) * 2023-08-25 2023-12-08 中移互联网有限公司 Monitoring method, device, system, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130282808A1 (en) * 2012-04-20 2013-10-24 Yahoo! Inc. System and Method for Generating Contextual User-Profile Images
CN110262944A (en) * 2019-06-21 2019-09-20 四川长虹电器股份有限公司 The method that a kind of pair of K8s cluster container resource is monitored and is alerted
CN110688281A (en) * 2019-09-25 2020-01-14 凡普数字技术有限公司 Alarm method and device in monitoring system and storage medium
CN111459763A (en) * 2020-04-03 2020-07-28 中国建设银行股份有限公司 Cross-kubernets cluster monitoring system and method
CN112073252A (en) * 2020-11-12 2020-12-11 北京优炫软件股份有限公司 Cloud platform monitoring method and system, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130282808A1 (en) * 2012-04-20 2013-10-24 Yahoo! Inc. System and Method for Generating Contextual User-Profile Images
CN110262944A (en) * 2019-06-21 2019-09-20 四川长虹电器股份有限公司 The method that a kind of pair of K8s cluster container resource is monitored and is alerted
CN110688281A (en) * 2019-09-25 2020-01-14 凡普数字技术有限公司 Alarm method and device in monitoring system and storage medium
CN111459763A (en) * 2020-04-03 2020-07-28 中国建设银行股份有限公司 Cross-kubernets cluster monitoring system and method
CN112073252A (en) * 2020-11-12 2020-12-11 北京优炫软件股份有限公司 Cloud platform monitoring method and system, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"Prometheus中文文档", pages 2 - 3, Retrieved from the Internet <URL:https://prometheus.wang> *
"利用Prometheus 打 造 企 业 分 布 式 监 控 平 台 (3)-- 远 程 读 写 之 战 - 知 乎 (zhihu.com)", pages 1 - 6, Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/135368139> *
IYACONTROL: "利用Prometheus 打造企业分布式监控平台(3)--远程读写之战 - 知乎 (zhihu.com)", pages 1 - 6, Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/135368139> *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113220420A (en) * 2021-05-18 2021-08-06 北京百度网讯科技有限公司 Service monitoring method, device, equipment, storage medium and computer program product
CN114490241A (en) * 2021-12-25 2022-05-13 苏州浪潮智能科技有限公司 Chip monitoring method, system, storage medium and equipment
CN114490241B (en) * 2021-12-25 2023-09-15 苏州浪潮智能科技有限公司 Chip monitoring method, system, storage medium and device
CN114328107A (en) * 2021-12-28 2022-04-12 北京易华录信息技术股份有限公司 Monitoring method and system for optomagnetic fusion storage server cluster and electronic equipment
CN116737514A (en) * 2023-08-15 2023-09-12 南京国睿信维软件有限公司 Automatic operation and maintenance method based on log and probe analysis
CN116737514B (en) * 2023-08-15 2023-12-22 南京国睿信维软件有限公司 Automatic operation and maintenance method based on log and probe analysis
CN117194149A (en) * 2023-08-25 2023-12-08 中移互联网有限公司 Monitoring method, device, system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112711512A (en) Prometheus monitoring method, device and equipment
US10146599B2 (en) System and method for a generic actor system container application
US11755452B2 (en) Log data collection method based on log data generated by container in application container environment, log data collection device, storage medium, and log data collection system
US8707275B2 (en) Simulation environment for distributed programs
CN107665228B (en) Associated information query method, terminal and equipment
CN108874558B (en) Message subscription method of distributed transaction, electronic device and readable storage medium
CN111290828A (en) Dynamic routing using container orchestration services
CN109840142B (en) Thread control method and device based on cloud monitoring, electronic equipment and storage medium
CN112527848B (en) Report data query method, device and system based on multiple data sources and storage medium
US9495402B2 (en) Managing a table of a database
US9201700B2 (en) Provisioning computer resources on a network
CN107133309B (en) Method and device for storing and querying process example, storage medium and electronic equipment
CN109117252B (en) Method and system for task processing based on container and container cluster management system
WO2021032146A1 (en) Metadata management method and apparatus, device, and storage medium
US10109094B2 (en) Interface to index and display geospatial data
CN111258565A (en) Method, system, server and storage medium for generating small program
CN103345386A (en) Software production method, device and operation system
CN113094674A (en) Page display method and device, electronic equipment and storage medium
CN113377626B (en) Visual unified alarm method, device, equipment and medium based on service tree
CN115934855A (en) Full-link field level blood margin analysis method, system, equipment and storage medium
CN111880948A (en) Data refreshing method and device, electronic equipment and computer readable storage medium
CN110975293A (en) Method, device, server and medium for establishing resource reference relation table
CN114416849A (en) Data processing method and device, electronic equipment and storage medium
CN112328656B (en) Service query method, device, equipment and storage medium based on middle platform architecture
CN113703895B (en) Method, system, device, equipment and storage medium for carousel of signboard

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination