An operation and maintenance service distributed monitoring management method, system, device and medium

CN117692499BActive Publication Date: 2026-08-11GUANGZHOU SANQI DREAM NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

然而,将Prometheus应用于运维数据的监控管理时,由于机器数量和告警规则较多,各条业务线配置混乱且规则不一致,当新购或回收机器时也没法做到实时感知机器监控状态,给管理和维护带来了较大的挑战

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117692499B_ABST
    Figure CN117692499B_ABST
Patent Text Reader

Abstract

This invention relates to the field of distributed management technology, and more particularly to a distributed monitoring and management method, system, device, and medium for operation and maintenance services. The method specifically includes: acquiring machine work order data from the operation and maintenance platform; labeling and storing machine resources for each machine work order according to a CMDB system to generate CMDB information; periodically retrieving several pieces of CMDB information from the CMDB system; classifying and rendering each piece of CMDB information for business purposes and then pushing it to the corresponding business nodes of the distributed management tool; deploying confd components in different network areas; monitoring the information of the corresponding business nodes in the distributed management tool using the confd components; and updating the monitoring configuration information of Prometheus through the confd components. This invention enables unified and standardized management of machine resources and personnel information, allowing for dynamic monitoring and management of machine status based on actual resources, ensuring the timeliness and accuracy of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed management technology, and in particular to a distributed monitoring and management method, system, device and medium for operation and maintenance services. Background Technology

[0002] Prometheus is an open-source system monitoring and alerting tool widely used for collecting, storing, and querying time-series data, offering a powerful query language and flexible alerting mechanisms. Prometheus monitoring and alerting rely on two configuration files: a target configuration file to identify which machines need monitoring, and a rules configuration file to store alerting rules. However, when applying Prometheus to the monitoring and management of operational data, the large number of machines and alerting rules, coupled with inconsistent configurations across different business lines, makes it difficult to achieve real-time monitoring status when new machines are purchased or reclaimed, posing significant challenges to management and maintenance. Furthermore, while most companies use HTTP clients to connect to servers for information acquisition and processing, medium to large companies have operations distributed across multiple regions, with different networks to ensure compliance. Therefore, traditional methods are not feasible. Consequently, machine work order information flows constructed in multiple environments (domestic, overseas, intranet) cannot be pushed to the business line's proprietary monitoring tools via an interface on a designated network. Summary of the Invention

[0003] The purpose of this invention is to provide a distributed monitoring and management method, system, device and medium for operation and maintenance business, so as to unify and standardize the management of machine resources and personnel information, and to dynamically monitor and manage the machine status according to actual resources, ensuring the timeliness and accuracy of data, thereby solving at least one of the above-mentioned problems of the prior art.

[0004] In a first aspect, the present invention provides a distributed monitoring and management method for operation and maintenance services, the method specifically comprising:

[0005] Obtain machine work order data from the operation and maintenance platform, and according to the CMDB system, label each machine work order with machine resources and store information to generate CMDB information;

[0006] A number of CMDB information entries are periodically retrieved from the CMDB system. Each CMDB information entry is then categorized by business function and rendered before being pushed to the corresponding business nodes of the distributed management tool.

[0007] Deploy confd components in different network areas, monitor the information of the corresponding business nodes in the distributed management tool using the confd components, and enable Prometheus to update the monitoring configuration information through the confd components.

[0008] Furthermore, the step of labeling and storing machine resources for each machine work order in the CMDB system specifically includes:

[0009] In the CMDB system, several data items and the data type of each data item are set, and a mapping relationship is established between several work order attributes of the machine work order data and several data items of the CMDB system.

[0010] Assign a unique identifier to the machine resource corresponding to each machine work order in the machine work order data. The unique identifier is used to identify the maintenance personnel associated with the machine resource corresponding to each machine work order.

[0011] The machine resource information for each machine work order is stored in the CMDB system according to the mapping relationship. The machine resource information includes a unique identifier for the machine resource corresponding to each machine work order.

[0012] Furthermore, the step of periodically retrieving several pieces of CMDB information from the CMDB system, classifying and rendering each piece of CMDB information for business purposes, and then pushing it to the corresponding business nodes of the distributed management tool specifically includes:

[0013] Obtain the API information of the CMDB system, and periodically obtain a number of CMDB information entries based on the API information of the CMDB system;

[0014] Based on business categories, each CMDB message is grouped into data and rendered as a first JSON string;

[0015] Install and deploy the ETCD cluster, create a corresponding business node for each machine work order in the ETCD cluster, and push the first JSON string to the corresponding business node in the ETCD cluster.

[0016] Furthermore, the method also includes:

[0017] When any service node in the ETCD cluster already has a second JSON string, the second JSON string is compared with the first JSON string to determine whether the second JSON string is expired information;

[0018] When the second JSON string is expired, delete the second JSON string and store the first JSON string in the corresponding business node.

[0019] Furthermore, the step of monitoring the information of the corresponding business nodes in the distributed management tool based on the confd component, and then using the confd component to update the monitoring configuration information of Prometheus, specifically includes:

[0020] Create a monitoring configuration template, which includes monitoring targets and Prometheus monitoring rules;

[0021] Configure parameters in the configuration file of the confd component. The configuration parameters include ETCD cluster connection information, the ETCD key to be monitored, the storage path of the monitoring configuration template, and the generation path of the target configuration file.

[0022] Based on the confd component, the corresponding business node is monitored through each ETCD key. When the storage information of any business node in the ETCD cluster changes, the target configuration file is generated according to the configuration items of the monitoring configuration template.

[0023] Based on the target configuration file, Prometheus updates its monitoring configuration information via hot reloading.

[0024] Furthermore, the step of updating the monitoring configuration information of Prometheus through hot reloading based on the target configuration file specifically includes:

[0025] Specify the generation path of the target configuration file and the time interval for refreshing the configuration in the file_sd_configs configuration item of the Prometheus configuration file;

[0026] When a change is detected in the target configuration file, the monitoring configuration information of the target configuration file is reloaded.

[0027] Furthermore, the method also includes:

[0028] Install and configure the Alertmanager component;

[0029] When Prometheus updates the monitoring configuration information, it uses the unique identifier to identify the associated maintenance personnel.

[0030] The Alertmanager component receives the alarm information from Prometheus and forwards it to the relevant operations and maintenance personnel through the alarm channel.

[0031] Secondly, this invention provides a distributed monitoring and management system for operation and maintenance services, the system specifically comprising:

[0032] The data acquisition module is used to acquire machine work order data on the operation and maintenance platform, and to perform machine resource labeling and information storage for each machine work order in the CMDB system to generate CMDB information.

[0033] The data push module is used to periodically obtain several pieces of CMDB information from the CMDB system, classify each piece of CMDB information for business purposes and render the data, and then push it to the corresponding business nodes of the distributed management tool.

[0034] The data update module is used to deploy the confd component in different network areas, monitor the information of the corresponding business nodes in the distributed management tool according to the confd component, and enable Prometheus to update the monitoring configuration information through the confd component.

[0035] Thirdly, the present invention provides a computer device, including: a memory and a processor, and a computer program stored in the memory, wherein when the computer program is executed on the processor, it implements a distributed monitoring and management method for operation and maintenance services as described in any of the above methods.

[0036] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a distributed monitoring and management method for operation and maintenance services as described in any of the above methods.

[0037] Compared with the prior art, the present invention has at least one of the following technical effects:

[0038] 1. It has achieved automated data management, improved data storage efficiency, reduced the risk of human error and data inconsistency, and helped to better support operation and maintenance work.

[0039] 2. Deploy the confd component in each region to ensure that the management and updates of monitoring configurations are consistent across geographical regions, thereby improving the accuracy and timeliness of operational data updates.

[0040] 3. The entire process only requires a single trigger and is fully automated, requiring no personnel for configuration or maintenance.

[0041] 4. Automated operation and maintenance alarms are generated, and machine alarm information is promptly notified to relevant operation and maintenance personnel, which improves the timeliness of operation and maintenance services and reduces the risk of information forwarding errors. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 This is a flowchart illustrating a distributed monitoring and management method for operation and maintenance services provided in an embodiment of the present invention.

[0044] Figure 2 This is a network architecture diagram of a distributed monitoring and management method for operation and maintenance services provided in an embodiment of the present invention;

[0045] Figure 3 This is a network architecture diagram of a distributed monitoring and management method for operation and maintenance services provided in another embodiment of the present invention;

[0046] Figure 4 This is a schematic diagram of the structure of a distributed monitoring and management system for operation and maintenance services provided in an embodiment of the present invention;

[0047] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0048] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0049] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0050] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0051] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0052] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0053] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0054] Prometheus is an open-source system monitoring and alerting tool widely used for collecting, storing, and querying time-series data, offering a powerful query language and flexible alerting mechanisms. Prometheus monitoring and alerting rely on two configuration files: a target configuration file to identify which machines need monitoring, and a rules configuration file to store alerting rules. However, when applying Prometheus to the monitoring and management of operational data, the large number of machines and alerting rules, coupled with inconsistent configurations across different business lines, makes it difficult to achieve real-time monitoring status when new machines are purchased or reclaimed, posing significant challenges to management and maintenance. Furthermore, while most companies use HTTP clients to connect to servers for information acquisition and processing, medium to large companies have operations distributed across multiple regions, with different networks to ensure compliance. Therefore, traditional methods are not feasible. Consequently, machine work order information flows constructed in multiple environments (domestic, overseas, intranet) cannot be pushed to the business line's proprietary monitoring tools via an interface on a designated network.

[0055] Reference Figure 1 An embodiment of the present invention provides a distributed monitoring and management method for operation and maintenance services, the method specifically including:

[0056] S101: Obtain machine work order data from the operation and maintenance platform, and according to the CMDB system, label each machine work order with machine resources and store information to generate CMDB information.

[0057] In this embodiment, it should be noted that CMDB (Configuration Management Database) is a logical database that contains information about the entire lifecycle of configuration items and the relationships between them (including physical relationships, real-time communication relationships, non-real-time communication relationships, and dependencies). Compared to traditional databases that focus on the physical storage of information, CMDB systems focus on information management (collection, integration, recording, maintenance, verification, and updating). The management of configuration information is the core function of CMDB. Therefore, in operation and maintenance management, the application of CMDB systems is conducive to establishing a proactive and efficient operation and maintenance management mechanism.

[0058] In this embodiment, machine maintenance personnel can initiate requests to purchase or reclaim machine resources on the maintenance platform. The maintenance platform will convert these requests into machine work orders, which include user information and machine resource information. The machine resource information is annotated by the CMDB system to generate a unique allocation code, i.e., a unique number (sn) for the machine resource, so as to subsequently determine the maintenance personnel who need to maintain the machine. For example, when a user purchases a machine through a work order on the platform, they need to fill in the machine's business user and configuration information. Then, after the platform automates the purchase, it obtains the machine's unique number and binds this information with the purchasing personnel, storing it in the resource management information.

[0059] In this embodiment, the operation and maintenance platform can also reference workflow components or stream processing engines to establish process-oriented management for the generation of machine work orders, including user information filling, approval process, online delivery, etc. Specifically, process nodes can be set according to actual needs, and different workflows can be set for different types of machine work orders.

[0060] Furthermore, to achieve efficient and accurate data conversion and monitoring, it is necessary to establish a mapping relationship between structured data items and machine work orders. This allows the CMDB system to quickly convert machine work order data into CMDB information. In this embodiment, the step of labeling machine resources and storing information for each machine work order based on the CMDB system specifically includes:

[0061] In the CMDB system, several data items and the data type of each data item are set, and a mapping relationship is established between several work order attributes of the machine work order data and several data items of the CMDB system.

[0062] Assign a unique identifier to the machine resource corresponding to each machine work order in the machine work order data. The unique identifier is used to identify the maintenance personnel associated with the machine resource corresponding to each machine work order.

[0063] The machine resource information for each machine work order is stored in the CMDB system according to the mapping relationship. The machine resource information includes a unique identifier for the machine resource corresponding to each machine work order.

[0064] In this embodiment, data items such as machine name, IP address, operating system, configuration information, business user, and unique identifier can be set. Corresponding work order attributes are also set in the machine work order. The unique identifier can be an automatically generated number or identifier used to uniquely identify the machine resource corresponding to each work order, as well as to associate the machine resource with the work order and the associated maintenance personnel. By establishing a mapping relationship between the data items in the CMDB and the work order attributes, the consistency between the machine work order data and the data in the CMDB system is ensured, avoiding data mismatch problems. The unique identifier also helps to uniquely identify and track the machine resource of each work order, thereby improving the reliability of data management, realizing the association between machine work orders and machine resources, and facilitating the querying and monitoring of the resource status corresponding to the work order. The method provided in this embodiment achieves automated data management, improves data storage efficiency, reduces the risk of human error and data inconsistency, and helps to better support maintenance work.

[0065] S102: Periodically obtain several pieces of CMDB information from the CMDB system, classify each piece of CMDB information for business purposes and render the data, and then push it to the corresponding business nodes of the distributed management tool.

[0066] In this embodiment, since there are multiple CMDB entries, each representing a business line of a specific machine resource, a distributed management tool is needed to handle the large-scale CMDB data in order to monitor and manage these multiple business lines. Distributed management tools include, but are not limited to, ETCD clusters, ZooKeeper, Consul, and Nacos.

[0067] Preferably, to make data transmission and monitoring configuration management more flexible, controllable, and automated, this embodiment also includes:

[0068] Obtain the API information of the CMDB system, and periodically obtain a number of CMDB information entries based on the API information of the CMDB system;

[0069] Based on business categories, each CMDB message is grouped into data and rendered as a first JSON string;

[0070] Install and deploy the ETCD cluster, create a corresponding business node for each machine work order in the ETCD cluster, and push the first JSON string to the corresponding business node in the ETCD cluster.

[0071] In this embodiment, the ETCD cluster provides high availability, consistency, and powerful distributed data storage capabilities. It stores data in the form of key-value pairs, where each configuration item corresponds to a unique key, and the configuration value is stored in the location associated with that key. This key-value storage model is very suitable for saving configuration information because it provides fast read and update operations.

[0072] Since ETCD is a distributed, highly available, consistent key-value store system written in Go, a script can be constructed using Go to set up scheduled tasks, API connections, data rendering, and other functionalities. Specifically, a Go program is created, importing the `net / http` package (for initiating HTTP requests) and the `encoding / json` package (for processing JSON data). It then uses Go's `http.Get` function to initiate an API request to retrieve the necessary information (the CMDB system's API information). The program checks the API response for success, filters and organizes data according to business categories, creates appropriate data structures to store the categorized data, and uses Go's `json.Marshal` function to encode the CMDB information into JSON-formatted byte slices. Furthermore, a loop condition function can be set within the Go program to periodically execute the above operations. For example, to execute it every ten minutes, the `time.Sleep` function can be used to execute the statement `time.Sleep(10*time.Minute)`. Alternatively, a scheduled task can be set up in the operating system to execute the Go program periodically; the specific method is not limited here.

[0073] Specifically, to avoid conflicts between old and new data, the Go program can be configured to determine whether old data is expired based on hash comparison. This embodiment also includes:

[0074] When any service node in the ETCD cluster already has a second JSON string, the second JSON string is compared with the first JSON string to determine whether the second JSON string is expired information;

[0075] When the second JSON string is expired, delete the second JSON string and store the first JSON string in the corresponding business node.

[0076] In this embodiment, by comparing the structure fields of the JSON string, it is determined whether the second JSON string is expired information. If the structure fields are the same, it is not expired information; otherwise, it is expired information. The second JSON string is then deleted, and the first JSON string is stored.

[0077] S103: Deploy confd components in different network areas, monitor the information of the corresponding business nodes in the distributed management tool according to the confd components, and enable Prometheus to update the monitoring configuration information through the confd components.

[0078] In this embodiment, confd needs to be installed and configured on servers in each region to ensure it can connect to the distributed management tool, monitor changes to the backend storage, and render configuration files. The distributed management tool, with its distributed nature, can run on multiple nodes and provides data replication and redundancy to ensure high availability and data consistency. This is crucial for configuration storage, so monitoring rules, target configurations, and other configuration information can be stored in the distributed management tool as key-value pairs. When configuration information changes, the confd component can retrieve the latest configuration information from the distributed management tool, thus maintaining real-time performance.

[0079] In this embodiment, different network regions specifically refer to different network regions within China, overseas, and intranets. Due to potential network isolation between these networks, network communication may be restricted by strict firewall policies or network configurations. This can make it difficult to establish direct HTTP connections for data transmission. Furthermore, due to compliance requirements or data privacy regulations, companies may need to ensure that networks in different environments are not interconnected to protect sensitive data. This isolation between network environments is also why machine ticket information flow may not be able to be pushed to the business line's own monitoring tools via the interface. Therefore, the purpose of deploying the confd component in each region is to ensure that the management and updates of monitoring configurations are consistent across different geographical regions. Different regions may have different monitoring needs, and each geographical region can deploy its own confd component to manage local monitoring configurations. These confd components connect to a distributed management tool, monitor configuration changes, and automatically update the Prometheus monitoring configuration.

[0080] Furthermore, in this embodiment, the step of monitoring the information of the corresponding business nodes in the distributed management tool based on the confd component, and then using the confd component to update the monitoring configuration information of Prometheus, specifically includes:

[0081] Create a monitoring configuration template, which includes monitoring targets and Prometheus monitoring rules;

[0082] Configure parameters in the configuration file of the confd component. The configuration parameters include ETCD cluster connection information, the ETCD key to be monitored, the storage path of the monitoring configuration template, and the generation path of the target configuration file.

[0083] Based on the confd component, the corresponding business node is monitored through each ETCD key. When the storage information of any business node in the ETCD cluster changes, the target configuration file is generated according to the configuration items of the monitoring configuration template.

[0084] Based on the target configuration file, Prometheus updates its monitoring configuration information via hot reloading.

[0085] In this embodiment, in order to achieve automated monitoring configuration, it is necessary to define a monitoring configuration template, which contains the basic configuration structure of Prometheus, namely, the monitoring rules, target configuration and other information of Prometheus.

[0086] In this embodiment, the configuration file for the confd component configures confd to connect to the ETCD cluster to monitor specified ETCD keys (these keys contain various parts of the monitoring configuration, each key representing a business node). It also specifies the location of the template file and the target configuration file; the former serves as a reference for generating the latter. The configuration files are typically defined in TOML or YAML format. When the values ​​of the monitoring configuration keys in ETCD change, confd detects these changes and triggers a re-render of the template. During the rendering process, confd replaces placeholders in the template with key-value pairs from ETCD, generating a final target configuration file for monitoring. This final target configuration file contains the actual values ​​obtained from ETCD, ensuring dynamic updates to the monitoring configuration.

[0087] In this embodiment, the functions of the confd component include: First, confd allows the definition of templates for monitoring configurations. These templates are uniform and unaffected by geographical regions, ensuring that monitoring configurations remain consistent across different geographical regions because the template definitions are identical. Second, confd uses ETCD as the central storage backend for configurations. ETCD is a distributed key-value store that can be deployed across multiple geographical regions, ensuring the consistency and availability of configuration information. When configurations need to be changed, changes only need to be made in ETCD, and confd components in each geographical region can access the same configuration information. Third, confd can monitor changes to specific keys in ETCD in real time. When configuration information changes, confd automatically detects these changes and triggers a re-rendering of the template. This ensures that even in different geographical regions, once a configuration change occurs, all confd components will update their configurations promptly to maintain consistency.

[0088] Specifically, to ensure that Prometheus can automatically detect and trigger updates to configuration information, in this embodiment, the step of updating the monitoring configuration information of Prometheus through hot reloading based on the target configuration file specifically includes:

[0089] Specify the generation path of the target configuration file and the time interval for refreshing the configuration in the file_sd_configs configuration item of the Prometheus configuration file;

[0090] When a change is detected in the target configuration file, the monitoring configuration information of the target configuration file is reloaded.

[0091] In this embodiment, the Prometheus configuration file is opened, and some key configuration items are set to enable automatic hot reloading. The `file_sd_configs` section is a part of the Prometheus configuration file used to define the configuration for file service discovery. File service discovery is a mechanism that allows Prometheus to read target configuration information from files to dynamically discover and monitor targets. In the `file_sd_configs` section, the file paths to be monitored can be specified. These files contain information about the monitored targets, such as their tags, addresses, and other information. When the contents of these files change, Prometheus will detect this and reload the configuration.

[0092] Reference Figure 2 The method provided in one embodiment of the present invention further includes:

[0093] Install and configure the Alertmanager component;

[0094] When Prometheus updates the monitoring configuration information, it uses the unique identifier to identify the associated maintenance personnel.

[0095] The Alertmanager component receives the alarm information from Prometheus and forwards it to the relevant operations and maintenance personnel through the alarm channel.

[0096] In this embodiment, the Alertmanager component is a standalone component for processing and routing alerts, typically used in conjunction with Prometheus. The Alertmanager component can route alerts based on their tags and annotations, meaning it can send specific types of alerts to different recipients through custom rules. This allows for efficient management and processing of large numbers of alerts, ensuring they are delivered to the correct recipients.

[0097] In this embodiment, the address and port of Alertmanager are specified in the Prometheus configuration file, and the notification channel and recipient (i.e., operations and maintenance personnel) information are specified in the Alertmanager configuration file. Alertmanager is used to receive alarms from Prometheus and send notifications according to the configured rules. Simultaneously, alarm rules need to be configured in Prometheus to define when alarms are triggered. Alert rules can be defined based on thresholds, changes, and other conditions of monitoring metrics. Specifically, alarm notification templates can be created to customize the content and format of alarm notifications, including alarm messages, tag information, timestamps, etc. Alert channels include, but are not limited to, commonly used contact channels such as WeChat, WeChat Work, QQ email, and telephone.

[0098] The method described in this embodiment automates the implementation of operation and maintenance alarms, promptly notifying relevant operation and maintenance personnel of machine alarm information, thereby improving the timeliness of operation and maintenance services and reducing the risk of information forwarding errors.

[0099] As a summary of the above embodiments, refer to Figure 3Another embodiment of the present invention provides a network architecture diagram for a distributed monitoring and management method for operation and maintenance services. A user initiates an application on the operation and maintenance platform, generating machine work order data. For example, developer A applies for a machine to deploy services. The CMDB processes the machine work order data and converts it into CMDB information. A script retrieves the CMDB information periodically via an external API and then pushes it to the ETCD cluster. The ETCD cluster includes nodes A, B, C, D, E, F, etc. (only nodes A and B are shown in the diagram, but this is not a limitation). Both network region A and network region B deploy a Prometheus and a confd component. The confd component monitors changes in the corresponding nodes in the ETCD cluster in real time (e.g., the confd component in region A monitors node A, and the confd component in region B monitors node B). Prometheus monitors changes in the confd component, thus forming a series of monitoring processes. Finally, Prometheus transmits alarm messages to the alarm system, which can be the Alertmanager component. The alarm system then transmits the alarm messages to the user, i.e., developer A, informing them to maintain the machine.

[0100] Reference Figure 4 An embodiment of the present invention provides a distributed monitoring and management system 4 for operation and maintenance services, the system 4 specifically including:

[0101] The data acquisition module 401 is used to acquire machine work order data on the operation and maintenance platform, and to perform machine resource labeling and information storage on each machine work order in the CMDB system to generate CMDB information.

[0102] The data push module 402 is used to periodically obtain several pieces of CMDB information from the CMDB system, classify each piece of CMDB information for business purposes and render the data, and then push it to each corresponding business node of the distributed management tool.

[0103] The data update module 403 is used to deploy the confd component in different network areas, monitor the information of the corresponding business nodes in the distributed management tool according to the confd component, and enable Prometheus to update the monitoring configuration information through the confd component.

[0104] It is understandable that, such as Figure 1 The content of the distributed monitoring and management method embodiments of the operation and maintenance business shown are all applicable to the distributed monitoring and management system embodiments of this operation and maintenance business. The specific functions implemented by the distributed monitoring and management system embodiments of this operation and maintenance business are the same as those shown in the examples. Figure 1 The distributed monitoring and management method for the operation and maintenance business shown is the same as that implemented in this example, and the beneficial effects achieved are the same as those shown in the example. Figure 1 The beneficial effects achieved by the distributed monitoring and management method embodiment of the operation and maintenance business shown are also the same.

[0105] It should be noted that the information interaction and execution process between the above systems are based on the same concept as the method embodiments of the present invention. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.

[0106] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0107] Reference Figure 5 The present invention also provides a computer device 5, including: a memory 502 and a processor 501, and a computer program 503 stored on the memory 502. When the computer program 503 is executed on the processor 501, it implements the distributed monitoring and management method for operation and maintenance services as described in any of the above methods.

[0108] The computer device 5 may be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device 5 may include, but is not limited to, a processor 501 and a memory 502. Those skilled in the art will understand that... Figure 5 The computer device 5 is merely an example and does not constitute a limitation on the computer device 5. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0109] The processor 501 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0110] In some embodiments, the memory 502 may be an internal storage unit of the computer device 5, such as a hard disk or memory of the computer device 5. In other embodiments, the memory 502 may be an external storage device of the computer device 5, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 5. Further, the memory 502 may include both internal and external storage units of the computer device 5. The memory 502 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 502 can also be used to temporarily store data that has been output or will be output.

[0111] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a distributed monitoring and management method for operation and maintenance services as described in any of the above methods.

[0112] In this embodiment, if the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0113] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0114] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0115] In the embodiments disclosed in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0116] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

Claims

1. A distributed monitoring and management method for operation and maintenance services, characterized in that, The method specifically includes: Obtain machine work order data from the operation and maintenance platform, and according to the CMDB system, label each machine work order with machine resources and store information to generate CMDB information; Periodically retrieve several pieces of CMDB information from the CMDB system, classify and render each piece of CMDB information according to business requirements, and then push it to the corresponding business nodes of the distributed management tool. Specifically, this includes: Obtain the API information of the CMDB system, and periodically obtain a number of CMDB information entries based on the API information of the CMDB system; Based on business categories, each CMDB message is grouped into data and rendered as a first JSON string; Install and deploy the ETCD cluster, create a corresponding business node for each machine work order in the ETCD cluster, and push the first JSON string to the corresponding business node in the ETCD cluster; Deploy confd components in different network areas, monitor the information of the corresponding business nodes in the distributed management tool using the confd components, and enable Prometheus to update the monitoring configuration information through the confd components.

2. The method according to claim 1, characterized in that, The step of labeling and storing machine resources for each machine work order in the CMDB system specifically includes: In the CMDB system, several data items and the data type of each data item are set, and a mapping relationship is established between several work order attributes of the machine work order data and several data items of the CMDB system. Assign a unique identifier to the machine resource corresponding to each machine work order in the machine work order data. The unique identifier is used to identify the maintenance personnel associated with the machine resource corresponding to each machine work order. The machine resource information for each machine work order is stored in the CMDB system according to the mapping relationship. The machine resource information includes a unique identifier for the machine resource corresponding to each machine work order.

3. The method according to claim 1, characterized in that, The method further includes: When any service node in the ETCD cluster already has a second JSON string, the second JSON string is compared with the first JSON string to determine whether the second JSON string is expired information; When the second JSON string is expired, delete the second JSON string and store the first JSON string in the corresponding business node.

4. The method according to claim 1 or 3, characterized in that, The step of monitoring the information of the corresponding business nodes in the distributed management tool according to the confd component, and updating the monitoring configuration information of Prometheus through the confd component, specifically includes: Create a monitoring configuration template, which includes monitoring targets and Prometheus monitoring rules; Configure parameters in the configuration file of the confd component. The configuration parameters include ETCD cluster connection information, the ETCD key to be monitored, the storage path of the monitoring configuration template, and the generation path of the target configuration file. Based on the confd component, the corresponding business node is monitored through each ETCD key. When the storage information of any business node in the ETCD cluster changes, the target configuration file is generated according to the configuration items of the monitoring configuration template. Based on the target configuration file, Prometheus updates its monitoring configuration information via hot reloading.

5. The method according to claim 4, characterized in that, The process of updating Prometheus's monitoring configuration information via hot reloading based on the target configuration file specifically includes: Specify the generation path of the target configuration file and the time interval for refreshing the configuration in the file_sd_configs configuration item of the Prometheus configuration file; When a change is detected in the target configuration file, the monitoring configuration information of the target configuration file is reloaded.

6. The method according to claim 2, characterized in that, The method further includes: Install and configure the Alertmanager component; When Prometheus updates the monitoring configuration information, it uses the unique identifier to identify the associated maintenance personnel. The Alertmanager component receives the alarm information from Prometheus and forwards it to the relevant operations and maintenance personnel through the alarm channel.

7. A distributed monitoring and management system for operation and maintenance services, characterized in that, The system specifically includes: The data acquisition module is used to acquire machine work order data on the operation and maintenance platform, and to perform machine resource labeling and information storage for each machine work order in the CMDB system to generate CMDB information. The data push module is used to periodically retrieve several pieces of CMDB information from the CMDB system, classify and render each piece of CMDB information according to business requirements, and then push it to the corresponding business nodes of the distributed management tool. Specifically, it includes: Obtain the API information of the CMDB system, and periodically obtain a number of CMDB information entries based on the API information of the CMDB system; Based on business categories, each CMDB message is grouped into data and rendered as a first JSON string; Install and deploy the ETCD cluster, create a corresponding business node for each machine work order in the ETCD cluster, and push the first JSON string to the corresponding business node in the ETCD cluster; The data update module is used to deploy the confd component in different network areas, monitor the information of the corresponding business nodes in the distributed management tool according to the confd component, and enable Prometheus to update the monitoring configuration information through the confd component.

8. A computer device, characterized in that, include: The memory and processor, and the computer program stored in the memory, when the computer program is executed on the processor, implement the distributed monitoring and management method for operation and maintenance services as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements a distributed monitoring and management method for operation and maintenance services as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Micro-service monitoring method, device and system, computer equipment and storage medium

    CN112217864A

  • Confd-based dynamic configuration updating method and system

    CN112486564A

  • PROMETHEUS dynamic alarm rule management method realized based on CONFD

    CN114297023A