An alarm rule issuing system and method, an electronic device, and a storage medium
By monitoring the collaborative work of the configuration center and the agent module, batch distribution of alarm rule files was achieved, which solved the problem of low efficiency in the existing Prometheus monitoring system and improved the efficiency and speed of alarm rule distribution.
Patent Information
- Application Number
- CN202211625189.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-16
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-12-16
AI Technical Summary
The existing Prometheus monitoring system requires each Prometheus node to be operated separately when issuing alarm rules, which results in low efficiency and long processing time.
An alarm rule distribution system is provided, including a monitoring configuration center and an agent module. The monitoring configuration center configures alarm rule files through a template management interface and distributes them in batches to selected Prometheus nodes or node groups. The agent module is responsible for pushing alarm rule files to the corresponding nodes or node groups.
It enables batch distribution of alarm rule files, improving efficiency, saving time, and avoiding the inefficiency of operating each Prometheus node individually.
Smart Images

Figure CN116032722B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of system monitoring, and in particular to an alarm rule issuing system and method, an electronic device, and a storage medium. BACKGROUND
[0002] Under the background of cloud-native environment, the index monitoring system constructed by prometheus is becoming more and more popular in the field of cloud-native monitoring. Through the index monitoring system, the service running status and service health status can be better understood. Users using prometheus often need to perform the same operation or configuration editing on multiple prometheuses, such as editing alarm rules, modifying configurations or statement queries, etc.
[0003] However, the existing prometheus monitoring system is usually a large monolithic application. When issuing alarm rules using prometheus, alarm rule issuing and configuration changes need to be performed on prometheuses one by one, which has the problems of low efficiency and long time consumption. SUMMARY
[0004] The present application provides an alarm rule issuing system and method, an electronic device, and a storage medium, which are used to solve the technical problems that the existing technology needs to perform alarm rule issuing and configuration changes on prometheuses one by one when issuing alarm rules using prometheus, resulting in low efficiency and long time consumption.
[0005] Therefore, the first aspect of the present application provides an alarm rule issuing system, which comprises a monitoring configuration center and a proxy module, the monitoring configuration center is configured with a template management interface, and the proxy module is in communication connection with the monitoring configuration center.
[0006] The monitoring configuration center is configured to, in response to a user configuring an alarm rule file in the template management interface and selecting a prometheus node or a prometheus node group to be issued, batch-issuing the generated alarm rule file to the corresponding proxy module of the prometheus node or the prometheus node group to be issued.
[0007] The proxy module is configured to push the received alarm rule file to the corresponding prometheus node or prometheus node group to load the alarm rule file content.
[0008] Optionally, the proxy module is further configured to:
[0009] obtain an index data list and target information of the prometheus node, and generate a hash value of the index data list according to the index data list;
[0010] The index data list hash value and the target information are pushed to the monitoring configuration center for registration to establish a connection with the monitoring configuration center.
[0011] Optionally, the monitoring configuration center is further configured with a group management interface, and the group management interface displays various object types and prometheus nodes.
[0012] The monitoring configuration center is further configured to respond to category division and grouping operations of a user on the group management interface, classify the prometheus nodes, associate the prometheus nodes with the object types, and generate prometheus nodes or prometheus node groups associated with the object types.
[0013] Optionally, the monitoring configuration center is specifically configured to respond to configuration of an alarm rule file by a user on the template management interface and selection of to-be-downloaded prometheus nodes or prometheus node groups, and determine whether the to-be-downloaded prometheus nodes or prometheus node groups selected by the user are empty.
[0014] If yes, the prometheus nodes or prometheus node groups associated with the object types in the alarm rule file are selected as the to-be-downloaded prometheus nodes or prometheus node groups, and the generated alarm rule file is batch-downloaded to the agent modules corresponding to the to-be-downloaded prometheus nodes or prometheus node groups.
[0015] If no, the generated alarm rule file is batch-downloaded to the agent modules corresponding to the to-be-downloaded prometheus nodes or prometheus node groups selected by the user.
[0016] Optionally, the agent module is further configured to:
[0017] cache a version of an alarm rule file currently loaded by the prometheus node, synchronize the generated version cache file to the monitoring configuration center for storage, and clean up the version cache file at a regular time.
[0018] Optionally, the agent module is further configured to:
[0019] acquire a space dataset with a target label name at a regular time, and update the space dataset to a file corresponding to a collection task.
[0020] The second aspect of the application provides an alarm rule issuing method, applied to any alarm rule issuing system of the first aspect, and the method comprises the following steps:
[0021] The monitoring configuration center responds to the user configuring the alarm rule file in the template management interface and selecting the prometheus node or the prometheus node group to be issued, and then the generated alarm rule file is batch-issued to the corresponding agent module of the prometheus node or the prometheus node group to be issued;
[0022] The agent module pushes the received alarm rule file to the corresponding prometheus node or prometheus node group to load the content of the alarm rule file.
[0023] Optionally, the method further comprises the following steps:
[0024] The agent module acquires the target information and the index data list of the prometheus node, and generates an index data list hash value according to the index data list;
[0025] The agent module pushes the target information and the index data list hash value to the monitoring configuration center for registration, so as to establish a connection with the monitoring configuration center.
[0026] The third aspect of the application provides an electronic device, which comprises a processor and a memory;
[0027] The memory is used for storing program code and transmitting the program code to the processor;
[0028] The processor is used for executing the alarm rule issuing method according to the instructions in the program code.
[0029] The fourth aspect of the application provides a computer readable storage medium, which is used for storing program code, and the program code is executed by a processor to realize the alarm rule issuing method of any one of the second aspect.
[0030] From the above technical solutions, the application has the following advantages:
[0031] The application provides an alarm rule issuing system, comprising: a monitoring configuration center and an agent module, the monitoring configuration center is configured with a template management interface, and the agent module is in communication connection with the monitoring configuration center; the monitoring configuration center is used for, in response to the user configuring an alarm rule file in the template management interface and selecting a prometheus node or a prometheus node group to be issued, issuing the generated alarm rule file to the corresponding agent module of the prometheus node or the prometheus node group to be issued in batches; and the agent module is used for pushing the received alarm rule file to the corresponding prometheus node or prometheus node group to load the alarm rule file content.
[0032] In the application, the template management interface is configured in the monitoring configuration center, so that the user can configure the alarm rule file in the template management interface and select one or more prometheus nodes to be issued, the generated alarm configuration file is issued to the corresponding agent module of the selected prometheus node or prometheus node group in batches through the monitoring configuration center, and the alarm rule file is pushed to the corresponding prometheus node or prometheus node group through the agent module, so that the alarm rule file can be issued to multiple prometheus nodes in batches, the prometheus is prevented from being configured and changed one by one for alarm rule issuing, the alarm rule issuing efficiency is improved, time is saved, and thus the technical problems of low efficiency and long time in the prior art when the prometheus is used to issue the alarm rule are solved. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0034] Figure 1 A structural schematic diagram of an alarm rule issuing system provided by the embodiments of the application;
[0035] Figure 2 An associated result schematic diagram of an object type and a prometheus node provided by the embodiments of the application;
[0036] Figure 3 A template management interface schematic diagram provided by the embodiments of the application;
[0037] Figure 4 A flowchart of a method for issuing an alarm rule provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0038] The present application provides an alarm rule issuing system, method, electronic device and storage medium, which is used to improve the technical problem of low efficiency and long time consumption in the prior art when prometheus is used to issue alarm rules.
[0039] In order for those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0040] Cloud native evolves from single cloud, private cloud, domestic hybrid cloud, international hybrid cross cloud, multi-tenant hybrid cloud and other architectures in the process of business development. Prometheus, as a monolithic application, is used to cope with more and more complex hybrid cloud and multi-tenant business architecture monitoring scenarios, and the management cost of multiple teams also increases exponentially. The existing prometheus monitoring system is usually a large monolithic application. When using prometheus to issue alarm rules, it is usually one prometheus at a time, that is, selecting one prometheus at a time, editing the rule file to be loaded, and reloading the service. This way is low in efficiency, complex in operation and time-consuming. The collected data can be written remotely to a prometheus-server in prometheus-agent mode for centralized processing. However, this method requires manual deployment of prometheus-agent and pre-configuration of remote writing configuration, which is very cumbersome, especially for services with large amounts of data, which increases the bandwidth consumption of a large number of network parameters. Some third-party tools can also be used to perform batch file operations to deploy prometheus on multiple hosts to perform alarm rule file batch operations. However, because the third-party tools cannot obtain the relevant information of the prometheus in the container, this method cannot issue alarm rule files to the prometheus deployed in the container.
[0041] In order to improve the above problems, please refer to Figure 1The embodiment of the application provides an alarm rule issuing system, comprising: a monitoring configuration center and an agent module, the monitoring configuration center is configured with a template management interface, and the agent module is in communication connection with the monitoring configuration center;
[0042] The monitoring configuration center is used for, in response to the user configuring an alarm rule file in the template management interface and selecting a prometheus node or a prometheus node group to be issued, issuing the generated alarm rule file to the corresponding agent module of the prometheus node or the prometheus node group to be issued in batches;
[0043] The agent module is used for pushing the received alarm rule file to the corresponding prometheus node or prometheus node group to load the alarm rule file content.
[0044] The alarm rule issuing system in the embodiment of the application mainly comprises two components, namely the monitoring configuration center and the agent module, and the agent module is in communication connection with the monitoring configuration center. Specifically, the agent module is used for acquiring a target information (including the name of a prometheus node, service information and the like) and a metric data list of the prometheus node, and generating a hash value of the metric data list according to the metric data list; the agent module pushes the hash value of the metric data list and the target information to the monitoring configuration center for registration, so as to establish a connection with the monitoring configuration center. The agent module can be deployed in the same container or host as the prometheus node, therefore, the agent module can acquire all the metric data of the prometheus node in the same container / host by calling a corresponding interface to obtain the metric data list; the agent module generates the hash value of the metric data list and sends the hash value and the target information of the prometheus node to the monitoring configuration center for registration, so as to establish a connection with the monitoring configuration center, and the monitoring configuration center can directly issue an alarm rule file or collect a task by using the connection.
[0045] The monitoring configuration center is configured with a corresponding system management interface, and a host management interface in the system management interface can display the registration conditions of various detailed prometheus nodes, and provides a corresponding detail button and a delete button for each prometheus node, and the user can check the connection conditions of the various prometheus nodes through a health state bar in the interface.
[0046] Further, the system management interface further includes a group management interface for displaying various object types and prometheus nodes, and a user can divide categories of prometheus nodes by editing groups in the group management interface, and specifically, the categories can be divided according to regions and scenarios in which the prometheus nodes are located, and the object types and the prometheus nodes are associated in one-to-one, one-to-many, many-to-one or many-to-many manner; correspondingly, the monitoring configuration center is further configured to classify the prometheus nodes and associate the prometheus nodes with the object types in response to the category division and group operation of the user in the group management interface, to generate prometheus nodes or prometheus node groups associated with the object types, and the association result of the object types and the prometheus nodes can be specifically referred to Figure 2 . By classifying and grouping the prometheus nodes and associating the object types with the prometheus nodes, the prometheus nodes can be managed in batches in the form of tenants, the purpose of tenant management is achieved, data between tenants is isolated from each other, the coverage range is expanded to rules and rule files by setting different object types, and then tenant isolation is achieved by setting tenant attribution ranges; the complexity of a heterogeneous environment (referring to prometheus that can be deployed on a host and prometheus that can be deployed in a k8s cluster) can be weakened, and the shared attributes of general scenarios are combined, so that users can use the system at low cost; prometheus nodes in different regions and different scenarios can be controlled and managed in various combination modes of sets, and complex prometheus node control work can be efficiently and cost-effectively completed in a large-scale hybrid cloud scenario.
[0047] The template management interface in the system management interface provides template names (i.e., alarm rule file names), object types, pushed node groups, nodes, tag information and rule lists, and the details can be referred to Figure 3The user can configure the alarm rule file in the template management interface. Specifically, the monitoring configuration center is configured with a rule pool, and each rule is stored in the rule pool. When the user edits the alarm rule file, the user can select the corresponding rule through an input box, and each rule is provided with buttons such as save, edit, and delete. The save, edit, and delete buttons after the selected rule list can be used to operate the rule. The user can select the prometheus node to which the alarm rule file is to be pushed by selecting the node group or node to be pushed. After clicking the save button, the monitoring configuration center is configured to determine whether the prometheus node or prometheus node group selected by the user is empty in response to the user configuring the alarm rule file in the template management interface and selecting the prometheus node or prometheus node group to be pushed. If the prometheus node or prometheus node group selected by the user is not empty, the monitoring configuration center will batch push the generated alarm rule file to the corresponding proxy module of the prometheus node or prometheus node group selected by the user. The monitoring configuration center can determine the proxy module corresponding to the prometheus node or prometheus node group to be pushed according to the registration information of the proxy module. If the prometheus node or prometheus node group selected by the user is empty, the monitoring configuration center will obtain the prometheus node or prometheus node group associated with the object type selected by the user when configuring the alarm rule file, and use the prometheus node or prometheus node group as the default group for alarm rule file push. That is, the monitoring configuration center selects the prometheus node or prometheus node group associated with the object type in the alarm rule file as the prometheus node or prometheus node group to be pushed, and batch pushes the generated alarm rule file to the corresponding proxy module of the prometheus node or prometheus node group.
[0048] The monitoring configuration center in the embodiments of the present application can support multiple users to simultaneously operate prometheus nodes in different regions and different scenarios in the interface, and can realize multi-tenant parallelism. The monitoring configuration center can grant different permissions to different role users in the same scenario, and limit the operation range of the user to avoid service unavailability caused by high-risk operations.
[0049] Further, the monitoring configuration center is further configured to store the generated alarm rule file in the rule pool, so as to directly call the alarm rule file next time the alarm rule file is configured.
[0050] After receiving the alarm rule file issued by the monitoring configuration center, the agent module pushes the alarm rule file to the corresponding prometheus node or prometheus node group, so that the prometheus node or prometheus node group loads the content of the alarm rule file.
[0051] Further, the agent module is further configured to:
[0052] The version of the alarm rule file currently loaded by the prometheus node is cached, and the generated version cache file is synchronized to the monitoring configuration center for storage, and the version cache file is cleaned up regularly.
[0053] Further, the agent module is further configured to:
[0054] The space data set with the target tag name is obtained regularly, and the space data set is updated to the file corresponding to the collection task.
[0055] In the embodiment of the application, the agent module acquires the strategy configuration of the monitoring configuration center asynchronously, and combines the local environment to calculate the local management and control strategy to make autonomous decisions, and combines and controls the prometheus service and surrounding components, so that the agent module has the ability of edge autonomy. For example, in the scenario related to the prometheus alarm rule file, the monitoring configuration center issues an alarm rule file related task, and after the task is processed, the agent module caches the version of the alarm rule file currently loaded by the corresponding prometheus node, and synchronizes the generated version cache file (the version cache file caches the version number) to the monitoring configuration center for version number storage; and the agent module automatically cleans up old and obsolete version cache files regularly, and this operation is not affected by the connection state between the monitoring configuration center and the agent module, that is, whether the connection between the monitoring configuration center and the agent module is normal or not, the agent module can process by itself. For example, in the scenario related to the prometheus collection task file, according to the specification agreed by each service in the enterprise, the agent module regularly obtains a space data set with a certain tag name, and updates the space data set to the file content of the collection task, and this process is initiated and controlled by the agent module. It should be noted that the monitoring configuration center is also used to issue a collection task to the agent module, and the agent module forwards the collection task to the corresponding prometheus node or prometheus node group to execute the collection task.
[0056] In the embodiments of the present application, the monitoring configuration center is configured with a template management interface, so that the user can configure the alarm rule file in the template management interface and select one or more prometheus nodes to be issued, generate the alarm configuration file through the monitoring configuration center, and batch issue the alarm configuration file to the corresponding agent module of the selected prometheus node or prometheus node group, and push the alarm rule file to the corresponding prometheus node or prometheus node group through the agent module, so that the alarm rule file can be batch issued to multiple prometheus nodes, avoiding the alarm rule issuing and configuration changing of one by one prometheus, improving the alarm rule issuing efficiency, saving time, and thus improving the technical problems of low efficiency and long time in the prior art when using prometheus to issue the alarm rule.
[0057] The above is an embodiment of an alarm rule issuing system provided by the present application, and the following is an embodiment of an alarm rule issuing method provided by the present application.
[0058] Please refer to Figure 4 The alarm rule issuing method provided by the present application is applied to the alarm rule issuing system in the foregoing embodiments, and the method comprises the following steps.
[0059] In step 101, the monitoring configuration center responds to the user configuring the alarm rule file in the template management interface and selecting the prometheus node or prometheus node group to be issued, and batch issues the generated alarm rule file to the agent module corresponding to the prometheus node or prometheus node group to be issued.
[0060] The monitoring configuration center is configured with a corresponding system management interface, and the host management interface in the system management interface can display the registration situation of each detailed prometheus node, and provide a corresponding detail button and a delete button for each prometheus node, so that the user can check the connection situation of each prometheus node through the health state bar in the interface.
[0061] The system management interface further comprises a group management interface for displaying various object types and prometheus nodes, and a user can divide categories of prometheus nodes by editing groups in the group management interface, and specifically, the categories can be divided according to regions and scenarios where the prometheus nodes are located, and the object types and the prometheus nodes are associated in a one-to-one, one-to-many, many-to-one or many-to-many manner; correspondingly, the monitoring configuration center is further configured to classify the prometheus nodes and associate the prometheus nodes with the object types in response to the category division and group operation of the user in the group management interface, and generate prometheus nodes or prometheus node groups associated with the object types. By classifying and grouping the prometheus nodes and associating the object types with the prometheus nodes, the prometheus nodes can be managed in batches in the form of tenants, the purpose of tenant management is achieved, the data of each tenant is isolated from each other, the coverage range is expanded to rules and rule files by setting different object types, and then the tenant isolation is achieved by setting the tenant attribution range; the prometheus nodes in different regions and different scenarios can be controlled and managed in various combination modes of sets, and the complex prometheus node control work can be efficiently and low-costly completed in the scene of a large-scale hybrid cloud.
[0062] The template management interface in the system management interface provides options of a template name (i.e., an alarm rule file name), an object type, a pushed node group, a node, tag information, and a rule list, and a user can configure an alarm rule file in the template management interface. Specifically, the monitoring configuration center is configured with a rule pool, the rule pool stores various rules, and when the user edits an alarm rule file, the user can select a corresponding rule through an input box, each rule is provided with buttons of save as, edit, and delete, and the save as, edit, and delete buttons after the selected rule list can be used to operate the rule. The user can select prometheus nodes to which the alarm rule file is to be pushed by selecting a node group or a node, and after clicking a save button, the monitoring configuration center determines whether the prometheus nodes or the prometheus node group selected by the user to be pushed are empty in response to the user configuring the alarm rule file in the template management interface and selecting the prometheus nodes or the prometheus node group to be pushed. If the prometheus nodes or the prometheus node group selected by the user to be pushed are not empty, the monitoring configuration center batch-pushes the generated alarm rule file to agent modules corresponding to the prometheus nodes or the prometheus node group selected by the user to be pushed, and the monitoring configuration center can determine the agent modules corresponding to the prometheus nodes or the prometheus node group to be pushed according to registration information of the agent modules. If the prometheus nodes or the prometheus node group selected by the user to be pushed are empty, the monitoring configuration center acquires prometheus nodes or prometheus node groups associated with an object type selected by the user when configuring the alarm rule file, and uses the prometheus nodes or the prometheus node groups as default groups to push the alarm rule file, that is, the monitoring configuration center selects prometheus nodes or prometheus node groups associated with the object type in the alarm rule file as the prometheus nodes or the prometheus node group to be pushed, and batch-pushes the generated alarm rule file to agent modules corresponding to the prometheus nodes or the prometheus node group to be pushed.
[0063] The monitoring configuration center also stores the generated alarm rule file in the rule pool, so as to directly call the alarm rule file next time when the alarm rule file is configured.
[0064] In step 102, the agent module pushes the received alarm rule file to corresponding prometheus nodes or prometheus node groups to load the content of the alarm rule file.
[0065] The agent module obtains a list of metric data of the prometheus node and target information, and generates a hash value of the list of metric data according to the list of metric data; the agent module pushes the hash value of the list of metric data and the target information to the monitoring configuration center for registration, to establish a connection with the monitoring configuration center. The agent module can be deployed in the same container as the prometheus node, and therefore the agent module can obtain all metric data of the prometheus node in the same container by calling a corresponding interface to obtain the list of metric data; the agent module generates a hash value of the list of metric data and sends the hash value and target information of the prometheus node to the monitoring configuration center for registration, to establish a connection with the monitoring configuration center, and the monitoring configuration center can directly use the connection to issue an alarm rule file or collect a task in the future.
[0066] After the agent module receives the alarm rule file issued by the monitoring configuration center, the agent module pushes the alarm rule file to the corresponding prometheus node or prometheus node group, so that the prometheus node or prometheus node group loads the content of the alarm rule file.
[0067] In the embodiment of the application, the template management interface is configured in the monitoring configuration center, so that the user can configure the alarm rule file and select one or more prometheus nodes to be issued in the template management interface, and the generated alarm configuration file is batch issued to the agent module corresponding to the selected prometheus node or prometheus node group through the monitoring configuration center, and the alarm rule file is pushed to the corresponding prometheus node or prometheus node group through the agent module, so that the alarm rule file can be batch issued to multiple prometheus nodes, avoiding the need to issue and configure the alarm rule for prometheus one by one, improving the efficiency of issuing the alarm rule and saving time, thereby improving the technical problem of low efficiency and long time in the prior art when issuing the alarm rule using prometheus.
[0068] The embodiment of the application also provides an electronic device, which comprises a processor and a memory;
[0069] The memory is used to store program code and transmit the program code to the processor;
[0070] The processor is used to execute the alarm rule issuing method in the foregoing method embodiment according to instructions in the program code.
[0071] The embodiment of the present application further provides a computer readable storage medium for storing program codes, the program codes being executed by a processor to implement the alarm rule issuing method in the foregoing method embodiment.
[0072] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the method processes described above can refer to the corresponding processes of the system in the foregoing embodiments, which will not be repeated here.
[0073] The terms "first", "second", "third", "fourth" and the like in the description of the application and the above drawings, if any, are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0074] It should be understood that in the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the association between the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases: only A, only B, and A and B at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including single or multiple combinations of any combination. For example, at least one of a, b or c, can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0075] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be omitted or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed objects can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0076] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e. may be located in one place, or may be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0077] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0078] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the essential part or all or part of the technical solutions that make contributions to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for executing all or part of the steps of the method described in each embodiment of the present application by a computer device (which can be a personal computer, a server, or a network device, etc.). The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (English full name: Read-Only Memory, English abbreviation: ROM), a random access memory (English full name: Random Access Memory, English abbreviation: RAM), a magnetic disk or an optical disk, and various program code storage media.
[0079] The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An alarm rule issuing system, characterized by, Comprising: A monitoring configuration center configured with a template management interface, and a proxy module in communication connection with the monitoring configuration center; The monitoring configuration center is further configured with a grouping management interface, and the grouping management interface displays various object types and prometheus nodes; The monitoring configuration center is configured to classify the prometheus nodes and associate the prometheus nodes with the object types in response to user classification and grouping operations on the grouping management interface, and to generate prometheus nodes or prometheus node groups associated with the object types; The monitoring configuration center is configured to batch issue the generated alarm rule file to the proxy module corresponding to the prometheus nodes or prometheus node groups to be issued in response to user configuration of the alarm rule file on the template management interface and selection of the prometheus nodes or prometheus node groups to be issued, and specifically for: In response to user configuration of the alarm rule file on the template management interface and selection of the prometheus nodes or prometheus node groups to be issued, determining whether the prometheus nodes or prometheus node groups to be issued selected by the user are empty; If yes, selecting the prometheus nodes or prometheus node groups associated with the object types in the alarm rule file as the prometheus nodes or prometheus node groups to be issued, and batch issuing the generated alarm rule file to the proxy module corresponding to the prometheus nodes or prometheus node groups to be issued; If no, batch issuing the generated alarm rule file to the proxy module corresponding to the prometheus nodes or prometheus node groups to be issued selected by the user; The proxy module is configured to push the received alarm rule file to the corresponding prometheus nodes or prometheus node groups for loading of the alarm rule file content.
2. The alarm rule issuing system according to claim 1, characterized in that, The proxy module is further configured to: Obtain a list of index data and target information of the prometheus nodes, and generate a hash value of the list of index data according to the list of index data; Push the hash value of the list of index data and the target information to the monitoring configuration center for registration to establish a connection with the monitoring configuration center.
3. The alarm rule issuing system according to claim 1, characterized in that, The proxy module is further configured to: Cache the version of the alarm rule file currently loaded by the prometheus nodes, synchronize the generated version cache file to the monitoring configuration center for storage, and regularly clean up the version cache file.
4. The alarm rule issuing system according to claim 1, characterized in that, The proxy module is further configured to: Regularly obtain a space data set with a target label name, and update the space data set to a file corresponding to a collection task.
5. An alarm rule issuing method, characterized in that, The method is applied to the alarm rule issuing system of any one of claims 1-4, and the method comprises: The prometheus nodes are classified and associated with object types by the monitoring configuration center in response to the user's category division and grouping operation in the grouping management interface, and the prometheus nodes or prometheus node groups associated with the object types are generated; The generated alarm rule file is batched to the corresponding agent module of the prometheus node or prometheus node group to be delivered by the monitoring configuration center in response to the user's configuration of the alarm rule file in the template management interface and selection of the prometheus node or prometheus node group to be delivered, including: The monitoring configuration center determines whether the prometheus node or prometheus node group to be delivered selected by the user is empty in response to the user's configuration of the alarm rule file in the template management interface and selection of the prometheus node or prometheus node group to be delivered; If yes, the prometheus node or prometheus node group associated with the object type in the alarm rule file is selected as the prometheus node or prometheus node group to be delivered, and the generated alarm rule file is batched to the corresponding agent module of the prometheus node or prometheus node group to be delivered; If no, the generated alarm rule file is batched to the corresponding agent module of the prometheus node or prometheus node group to be delivered selected by the user; The received alarm rule file is pushed to the corresponding prometheus node or prometheus node group by the agent module to load the alarm rule file content.
6. The alarm rule issuing method of claim 5, wherein, The method further comprises: The agent module obtains the target information and the index data list of the prometheus node, and generates an index data list hash value according to the index data list; The agent module pushes the target information and the index data list hash value to the monitoring configuration center for registration to establish a connection with the monitoring configuration center.
7. An electronic device, comprising: The device comprises a processor and a memory; The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the alarm rule delivery method according to the instructions in the program code.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium is used to store program code, and the program code is executed by the processor to realize the alarm rule delivery method. The computer readable storage medium is used to store program code, and the program code is executed by the processor to realize the alarm rule delivery method.
Citation Information
Patent Citations
Enterprise service and application intelligent monitoring system
CN110968482A
Alarm notification management system and alarm notification management method
CN114785665A