A financial-level cascaded monitoring method based on Prometheus
Through the financial-level cascading monitoring method based on Prometheus in the financial-level container cloud platform, a unified summary display and reporting of monitoring data at the control and business levels is realized, and the problem of unification of monitoring data display and reporting of alarms in the existing technology is solved.
Patent Information
- Application Number
- CN202211153238.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2042-09-21
AI Technical Summary
In the prior art, when viewing monitoring data, it is necessary to view it separately at the control level and the business level. There are technical problems that the monitoring data cannot be displayed uniformly and the alarm will be reported uniformly.
By providing a financial-level cascading monitoring method based on Prometheus, it realizes the cluster deployment of Prometheus services based on infra nodes in the management and business layer, obtains monitoring instructions for data collection, and receives service layer monitoring data through the northbound interface and CLB IP, so as to realize the summary and unified display of monitoring data of the management and business layer and report on the alarm.
Under the multi-cluster architecture of the financial-level container cloud platform, a unified summary and display of monitoring data at the control layer and business layer is realized, solving the problem that the monitoring data cannot be displayed and reported by the existing technology.
Smart Images

Figure CN115567527B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of monitoring and management, and in particular to a financial-level cascaded monitoring method based on Prometheus. Background Art
[0002] In the design of the container cloud platform deployment solution, according to the requirements of high availability of the data center, a deployment mode of a management and control layer - business layer is adopted. The management and control layer deploys an image repository, a unified portal of the container cloud platform, and monitoring logs; the business layer deploys a Kubernetes business cluster and monitoring logs, and the two together form the overall deployment architecture of the Construction Bank container cloud platform. Monitoring Prometheus is independently deployed in the management and control layer and the business layer, and respectively provides monitoring data for the management and control layer and the business layer.
[0003] However, during the process of implementing the technical solution of the present invention in the embodiments of the present application, the inventors of the present application found that the above technology has at least the following technical problems:
[0004] In the prior art, when viewing monitoring data, it is necessary to view the management and control layer and the business layer separately, resulting in the technical problems that the monitoring data cannot be displayed uniformly and the alarms cannot be reported uniformly. Summary of the Invention
[0005] The embodiments of the present application provide a financial-level cascaded monitoring method based on Prometheus, which solves the technical problems in the prior art that when viewing monitoring data, it is necessary to view the management and control layer and the business layer separately, resulting in the inability to uniformly display monitoring data and uniformly report alarms, and achieves the technical effect of summarizing and uniformly displaying the monitoring data of the management and control layer and the business layer and uniformly reporting alarm monitoring in the multi-cluster architecture of the financial-level container cloud platform.
[0006] In view of the above problems, the embodiments of the present application provide a financial-level cascaded monitoring method based on Prometheus.
[0007] In a first aspect, the embodiments of the present application provide a financial-level cascaded monitoring method based on Prometheus, the method comprising: obtaining a deployment instruction; deploying a Prometheus service based on the infra node clustering in the management and control layer and the business layer through the deployment instruction; obtaining a monitoring instruction, and collecting business layer monitoring data based on the Prometheus service deployed in the business layer through the monitoring instruction; collecting management and control layer monitoring data based on the Prometheus service deployed in the management and control layer through the monitoring instruction; the management and control layer receiving the business layer monitoring data through a northbound interface and a CLB IP; and performing aggregated monitoring management through the management and control layer monitoring data and the business layer monitoring data.
[0008] On the other hand, this application also provides a financial-level cascaded monitoring system based on Prometheus. The system includes: an instruction generation module for obtaining deployment instructions; a deployment module for cluster-deploying Prometheus services based on infra nodes in the management layer and the business layer through the deployment instructions; a first data collection module for obtaining monitoring instructions and collecting business layer monitoring data based on the Prometheus services deployed in the business layer through the monitoring instructions; a second data collection module for collecting management layer monitoring data based on the Prometheus services deployed in the management layer through the monitoring instructions; a receiving module for the management layer to receive business layer monitoring data through the northbound interface and the CLB IP; and a management module for performing aggregated monitoring management through the management layer monitoring data and the business layer monitoring data.
[0009] In a third aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the method in the first aspect are implemented.
[0010] In a fourth aspect, the present invention provides a storage medium with a computer program stored thereon. When the computer program is executed by a processor, the steps of the method in the first aspect are implemented.
[0011] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:
[0012] By cluster-deploying Prometheus services based on infra nodes in each cluster in the management layer and the business layer through deployment instructions; obtaining monitoring instructions and collecting business layer monitoring data based on the Prometheus services deployed in the business layer through the monitoring instructions; collecting management layer monitoring data based on the Prometheus services deployed in the management layer through the monitoring instructions; the management layer receiving business layer monitoring data through the northbound interface and the CLB IP; and performing aggregated monitoring management through the management layer monitoring data and the business layer monitoring data. The technical effect of aggregating and uniformly displaying the monitoring data of the management layer and the business layer and uniformly reporting alarms for monitoring is achieved in the multi-cluster architecture of the financial-level container cloud platform.
[0013] The above description is only an overview of the technical solutions of this application. In order to be able to understand the technical means of this application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features, and advantages of this application more obvious and understandable, the specific embodiments of this application are hereinafter specifically described. Description of the Drawings
[0014] Figure 1 This is a schematic flowchart of a financial-level cascaded monitoring method based on Prometheus according to an embodiment of the present application;
[0015] Figure 2 This is a schematic flowchart of summary monitoring management in a financial-level cascaded monitoring method based on Prometheus according to an embodiment of the present application;
[0016] Figure 3 This is a schematic structural diagram of a financial-level cascaded monitoring system based on Prometheus according to an embodiment of the present application;
[0017] Figure 4 This is a schematic structural diagram of an electronic device according to an embodiment of the present application.
[0018] Description of the reference numerals: instruction generation module 1, deployment module 2, first data acquisition module 3, second data acquisition module 4, receiving module 5, management module 6, bus 300, receiver 301, processor 302, transmitter 303, memory 304, bus interface 306. Detailed Embodiments
[0019] After introducing the basic principles of the present application, the various non-limiting embodiments of the present application will be specifically introduced below in conjunction with the drawings of the specification.
[0020] Example 1
[0021] As Figure 1 shown, an embodiment of the present application provides a financial-level cascaded monitoring method based on Prometheus, and the method includes:
[0022] Step S100: Obtain a deployment instruction;
[0023] Step S200: Based on the deployment instruction, deploy the Prometheus service in a clustered manner on the control layer and the service layer based on the infra node;
[0024] Specifically, Kubernetes is an open-source container scheduling platform across hosts. It can automatically deploy, scale, and operate application containers, providing container-centric infrastructure. The most basic Kubernetes can schedule and run application containers on physical or virtual machine clusters. In the design of the container cloud platform deployment solution, according to the requirements of high availability of the data center, a control layer-service layer deployment mode is adopted, and the control layer and the service layer are independently deployed to provide data for the control layer and the service layer respectively.
[0025] The control layer and the service layer may include one or more clusters. Prometheus is an open-source system monitoring and alerting system that provides relatively complete monitoring and alerting functions. The deployment instruction is a control instruction for deploying the Prometheus service in the cluster. In order to integrate and summarize the monitoring data, based on the obtained deployment instruction, the Prometheus service is deployed in each cluster of the control layer and the service layer.
[0026] Furthermore, each cluster separately uses the infra node cluster to deploy the Prometheus service. By deploying the Prometheus service based on the infra node, it provides environmental support for subsequent monitoring data collection and transmission of each cluster.
[0027] Step S300: Obtain a monitoring instruction, and collect service layer monitoring data based on the Prometheus service deployed in the service layer through the monitoring instruction;
[0028] Step S400: Collect control layer monitoring data based on the Prometheus service deployed in the control layer through the monitoring instruction;
[0029] Specifically, after the deployment is completed, it means that operations such as monitoring data collection, integration, and alerting can be carried out. The monitoring instruction is an instruction for controlling the collection and integration of monitoring data. After receiving the monitoring instruction, the Prometheus service deployed in each cluster of the service layer is used to collect service layer monitoring data, and service layer monitoring data is obtained.
[0030] Based on the monitoring instruction, the control layer monitoring data is collected through the Prometheus service deployed in the control layer, and control layer monitoring data is obtained. By collecting the service layer monitoring data and the control layer monitoring data, it lays a solid foundation for subsequent accurate processing such as integration and summarization of monitoring data.
[0031] Step S500: The control layer receives the service layer monitoring data through the northbound interface and the CLB IP;
[0032] Step S600: Conduct aggregated monitoring management through the control layer monitoring data and the service layer monitoring data.
[0033] Specifically, the northbound interface is an interface provided for other manufacturers or operators for access and management, that is, an upward-provided interface. The management and control layer is connected to each service cluster in the service layer through the northbound interface and the CLB IP. When the collection of service layer monitoring data in each service cluster in the service layer is completed, the management and control layer receives the service layer monitoring data through the northbound interface and the CLB IP. After receiving the service layer monitoring data, it is displayed to service users through the grafana graphical interface of prometheus. Service users can monitor the entire service cluster and the management and control layer data through the prometheus in the management and control layer, providing users with a complete containerized monitoring platform.
[0034] Furthermore, each cluster in the management and control layer and the service layer separately uses an infra node cluster to deploy the prometheus service in a clustered manner.
[0035] Specifically, by using an infra node cluster to deploy the prometheus service in a clustered manner, the collection and transmission of monitoring data can be achieved. On the basis of ensuring the collection and summary management of monitoring data, the deployment monitoring cost is saved.
[0036] Furthermore, each cluster in the management and control layer and the service layer uses three infra nodes to deploy the prometheus service in a clustered manner.
[0037] Specifically, when each cluster in the management and control layer and the service layer separately uses three infra nodes to deploy the prometheus service in a clustered manner, the collection and transmission of monitoring data can be ensured. By using three infra nodes to deploy the prometheus service in a clustered manner, the failure of monitoring and alarming caused by node anomalies can be avoided, ensuring the safe and stable operation of monitoring and summary alarming.
[0038] Furthermore, as Figure 2 shown, step S700 of this application further includes:
[0039] Step S710: The management and control layer docks with the data center alarm platform through the northbound interface and the CLB IP address;
[0040] Step S720: The management and control layer sends the management and control layer monitoring data and the service layer monitoring data to the data center alarm platform to complete the summary monitoring management.
[0041] Specifically, the data center alarm platform is a platform for aggregating, alarming, and integrating monitoring data. The management and control layer is connected to the data center alarm platform through the northbound interface and the CLB IP address. When the management and control layer receives monitoring data of the service layer and the collection of the management and control layer monitoring data is completed, the management and control layer sends the management and control layer monitoring data and the service layer monitoring data to the data center alarm platform to complete the aggregated monitoring management.
[0042] Furthermore, the Prometheus service includes a Prometheus Server module, client libraries module, push gateway module, and alertmanager module.
[0043] Specifically, Prometheus is an open-source system monitoring and alerting system that provides relatively complete monitoring and alerting functions. The core component of Prometheus, the Prometheus Server, is mainly used for scraping data and storing time series data, and also provides query and Alert Rule configuration management; the client libraries are used to interface with the Prometheus Server and can query and report data; the push gateway is a summary node for batch and short-term monitoring data, mainly used for business data reporting, etc.; various exporters for reporting data, such as the node_exporter for reporting machine data, the MongoDB exporter for reporting MongoDB information, etc.; and the alertmanager for alert notification management.
[0044] Furthermore, the main modules of Prometheus include: Server, Exporters, Pushgateway, PromQL, Alertmanager, WebUI, etc. The Prometheus server periodically pulls data from statically configured targets or targets discovered by service discovery. When the newly pulled data is greater than the configured in-memory buffer, Prometheus will persist the data to disk (if using remote storage, it will be persisted to the cloud). Prometheus can configure rules and then query the data regularly. When conditions are triggered, it will push alerts to the configured Alertmanager. When the Alertmanager receives a warning, it can aggregate, deduplicate, and reduce noise according to the configuration and finally send the warning. Data can be queried and aggregated using the API, Prometheus Console, or Grafana.
[0045] Furthermore, the business data of the business layer is stored in this business cluster, and the business layer can provide business services externally through the CLB IP.
[0046] During the specific deployment and implementation process:
[0047] Step 1: Edit the additional-scrap-confi g.yaml file in the monitoring directory of the management and control layer
[0048]
[0049]
[0050] Step 2: Add the configuration of the additional-scrap-config file in Prometheus.
[0051] Step 3: Use the K8S command to generate the secret file of additional-scrap-config: Kubectl create secret–n monitoring generic additional-scrape-config s–from-file=additional-scrape-configs.yaml.
[0052] In summary, the financial-level cascaded monitoring method based on Prometheus provided by the embodiments of this application has the following technical effects:
[0053] Through the aggregated monitoring and management of the monitoring data of the management and control layer and the business layer, the technical effect of aggregating and uniformly displaying the monitoring data of the management and control layer and the business layer, and uniformly reporting alarms and monitoring is achieved under the multi-cluster architecture of the financial-level container cloud platform.
[0054] Example 2
[0055] Based on the same inventive concept as the financial-level cascaded monitoring method based on Prometheus in the foregoing embodiments, the present invention also provides a financial-level cascaded monitoring system based on Prometheus, as Figure 3 shown, the system includes:
[0056] Instruction generation module 1, which is used to obtain deployment instructions;
[0057] Deployment module 2, which is used to deploy the Prometheus service based on the infra node clustering in the management and control layer and the business layer through the deployment instructions;
[0058] The first data acquisition module 3 is used to obtain a monitoring instruction and collect service layer monitoring data based on the Prometheus service deployed in the service layer through the monitoring instruction.
[0059] The second data acquisition module 4 is used to collect management layer monitoring data based on the Prometheus service deployed in the management layer through the monitoring instruction.
[0060] The receiving module 5 is used for the management layer to receive service layer monitoring data through the northbound interface and the CLB IP.
[0061] The management module 6 is used to perform aggregated monitoring management through the management layer monitoring data and the service layer monitoring data.
[0062] Furthermore, each cluster in the management layer and the service layer separately uses an infra node to cluster and deploy the Prometheus service.
[0063] Furthermore, each cluster in the management layer and the service layer uses three infra nodes to cluster and deploy the Prometheus service.
[0064] Furthermore, the management module 6 is further used for:
[0065] The management layer docks with the data center alarm platform through the northbound interface and the CLB IP address;
[0066] The management layer sends the management layer monitoring data and the service layer monitoring data to the data center alarm platform to complete the aggregated monitoring management.
[0067] Furthermore, the Prometheus service includes a Prometheus Server module, client libraries module, push gateway module, and alertmanager module.
[0068] Furthermore, the service data of the service layer is stored in the local service cluster, and the service layer can provide service externally through the CLB IP.
[0069] The foregoing Figure 1All the various change methods and specific examples of a financial - level cascaded monitoring method based on Prometheus in Embodiment 1 are equally applicable to a financial - level cascaded monitoring system based on Prometheus in this embodiment. Through the foregoing detailed description of a financial - level cascaded monitoring method based on Prometheus, those skilled in the art can clearly know the implementation method of a financial - level cascaded monitoring system based on Prometheus in this embodiment. Therefore, for the sake of simplicity of the specification, it will not be elaborated herein.
[0070] Exemplary Electronic Device
[0071] The following refers to Figure 4 to describe the electronic device of the embodiments of the present application.
[0072] Figure 4 The structural schematic diagram of the electronic device according to the embodiments of the present application is illustrated.
[0073] Based on the inventive concept of a financial - level cascaded monitoring method based on Prometheus in the foregoing embodiments, the present invention also provides an electronic device, on which a computer program is stored. When the program is executed by a processor, it implements the steps of any one of the methods of the financial - level cascaded monitoring method based on Prometheus described above.
[0074] Among them, in Figure 4 , the bus architecture (represented by bus 300), bus 300 may include any number of interconnected buses and bridges. Bus 300 links together various circuits including one or more processors represented by processor 302 and a memory represented by memory 304. Bus 300 can also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well - known in the art. Therefore, they will not be further described herein. Bus interface 306 provides an interface between bus 300 and receiver 301 and transmitter 303. Receiver 301 and transmitter 303 can be the same element, that is, a transceiver, providing a unit for communicating with various other systems on the transmission medium.
[0075] Processor 302 is responsible for managing bus 300 and general processing, while memory 304 can be used to store data used by processor 302 when performing operations.
[0076] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.
[0077] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices produce a system for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or blocks or combinations of blocks.
[0078] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction system that implements the functions specified in Figure 1 one or more of the flows Figure 1 or blocks or combinations of blocks.
[0079] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or blocks or combinations of blocks. Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they know the basic creative concepts. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0080] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims
1. A financial-level cascaded monitoring method based on Prometheus, characterized in that, the method includes: Obtaining a deployment instruction; Based on the deployment instruction, deploying the Prometheus service in a clustered manner on the infra nodes in the management layer and the business layer; Obtaining a monitoring instruction, and collecting business layer monitoring data based on the Prometheus service deployed in the business layer through the monitoring instruction; Collecting management layer monitoring data based on the Prometheus service deployed in the management layer through the monitoring instruction; The management layer receives business layer monitoring data through the northbound interface and the CLB IP; Performing aggregated monitoring management through the management layer monitoring data and the business layer monitoring data.
2. The method according to claim 1, characterized in that, Each cluster in the management layer and the business layer separately uses an infra node to deploy the Prometheus service in a clustered manner.
3. The method according to claim 1, characterized in that, Each cluster in the management layer and the business layer uses three infra nodes to deploy the Prometheus service in a clustered manner.
4. The method according to claim 1, characterized in that, The method further includes: The management layer docks with the data center alarm platform through the northbound interface and the CLB IP address; The management layer sends the management layer monitoring data and the business layer monitoring data to the data center alarm platform to complete the aggregated monitoring management.
5. The method according to claim 1, characterized in that, The Prometheus service includes a PrometheusServer module, client libraries module, push gateway module, and alertmanager module.
6. The method according to claim 1, characterized in that, The business data of the business layer is stored in the local business cluster, and the business layer can provide business services externally through the CLB IP.
7. A financial-level cascaded monitoring system based on Prometheus, characterized in that, the system includes: An instruction generation module, which is used to obtain a deployment instruction; A deployment module, which is used to deploy the Prometheus service in a clustered manner on the infra nodes in the management layer and the business layer through the deployment instruction; A first data collection module, which is used to obtain a monitoring instruction and collect business layer monitoring data based on the Prometheus service deployed in the business layer through the monitoring instruction; A second data collection module, which is used to collect management layer monitoring data based on the Prometheus service deployed in the management layer through the monitoring instruction; A receiving module, which is used for the management layer to receive business layer monitoring data through the northbound interface and the CLB IP; A management module, which is used to perform aggregated monitoring management through the management layer monitoring data and the business layer monitoring data.
8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, when the processor executes the program, the steps of the method according to any one of claims 1-6 are implemented.
9. A storage medium, wherein, a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1-6 are implemented.
Citation Information
Patent Citations
Whole-process monitoring alarm platform and method thereof
CN111752795A
Monitoring system and method suitable for containerized deployment of open source cloud platform
CN112015753A