Monitoring method, device, computing equipment and medium

By configuring the server to receive and distribute alarm rules, the alarm server automatically writes to the monitoring program directory, solving the problem of manually logging in and modifying configuration files in the existing technology, and realizing the automated management and maintenance of alarm rules, which is easy to use and maintain.

CN113760639BActive Publication Date: 2024-12-27BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011121551.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-19
Publication Date
2024-12-27
Estimated Expiration
2040-10-19

AI Technical Summary

Technical Problem

The existing Prometheus monitoring system cooperates with the AlertManager component to complete the alarm function. It requires manual login to the server for configuration modification, which is inconvenient for maintenance.

Method used

Provide a monitoring method, by configuring the server to receive the user's rule creation request, generate preset format alarm rules, and send them to the alarm server. The independent program in the alarm server writes the rules into the monitoring program directory, thereby realizing that Automatic creation and management of alarm rules.

Benefits of technology

The creation and management of alarm rules can be completed without logging into the monitoring server, improving operation and maintenance efficiency and convenience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113760639B_ABST
    Figure CN113760639B_ABST
Patent Text Reader

Abstract

The present disclosure provides a monitoring method executed by a configuration server, including: receiving a rule creation request from a user end, the rule creation request including alarm rule information and monitoring object information; generating a first alarm rule in a preset format according to the alarm rule information; determining a network address of an alarm server corresponding to the monitoring object information; and sending the first alarm rule to the alarm server according to the network address, so that the alarm server monitors the monitoring object indicated by the monitoring object information according to the first alarm rule. The present disclosure also provides a monitoring alarm method executed by an alarm server, a monitoring device applied to a configuration server, a monitoring device applied to an alarm server, a computing device, and a medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and more specifically, to a monitoring method, apparatus, computing device and medium. Background Art

[0002] Currently, the Prometheus monitoring system uses the AlertManager component as the alarm module of the monitoring system. Prometheus cooperates with AlertManager-related components in the form of configuration files to complete the monitoring alarm function. If the Prometheus monitoring system completes the alarm with AlertManager-related components in the form of configuration files. When creating alarm rules, you need to manually log in to the server where the monitoring program is deployed and modify the configuration files in the server. This method is not convenient for use and maintenance. Summary of the invention

[0003] In view of this, the present disclosure provides a monitoring method, apparatus, computing device and medium.

[0004] One aspect of the present disclosure provides a monitoring method performed by a configuration server, comprising: receiving a rule creation request from a user terminal, the rule creation request including alarm rule information and monitoring object information; generating a first alarm rule in a preset format according to the alarm rule information; determining a network address of an alarm server corresponding to the monitoring object information; and sending the first alarm rule to the alarm server according to the network address, so that the alarm server monitors the monitoring object indicated by the monitoring object information according to the first alarm rule.

[0005] According to an embodiment of the present disclosure, the rule creation request also includes a first alarm rule identifier; the method also includes: obtaining a first preset prefix corresponding to the first alarm rule identifier; determining a first directory location of a database based on the first preset prefix and the first alarm rule identifier; and storing the first alarm rule at the first directory location.

[0006] According to an embodiment of the present disclosure, storing the first alarm rule at the first directory location includes: writing the first alarm rule into a cache; and writing the first alarm rule in the cache into the first directory location.

[0007] According to an embodiment of the present disclosure, the method also includes: receiving a rule query request from a user terminal; determining whether a second alarm rule corresponding to the rule query request is stored in a cache; if the second alarm rule is stored in the cache, reading the second alarm rule from the cache and sending the second alarm rule to the user terminal; if the second alarm rule is not stored in the cache, searching for the second alarm rule in a database and sending the found second alarm rule to the user terminal.

[0008] According to an embodiment of the present disclosure, the rule query request includes a second alarm rule identifier; searching for the second alarm rule in the database includes: obtaining a second preset prefix corresponding to the second alarm rule identifier; determining a second target location of the database based on the second preset prefix and the second alarm rule identifier; and searching for the second alarm rule at the second target location.

[0009] According to an embodiment of the present disclosure, the method also includes: receiving a rule editing request from a user terminal, wherein the rule editing request includes a third alarm rule identifier; obtaining a third preset prefix corresponding to the third alarm rule identifier; determining a third directory location based on the third preset prefix and the third alarm rule identifier; and editing the alarm rule at the third directory location.

[0010] According to an embodiment of the present disclosure, the preset format includes a YAML format.

[0011] Another aspect of the present disclosure provides a monitoring alarm method executed by an alarm server, wherein a monitoring program and a cross-compartment program independent of the monitoring program are installed in the alarm server; the method comprises: performing the following operations through the cross-compartment program: receiving alarm rules from a configuration server; obtaining a fourth directory location corresponding to the alarm monitoring program; and writing the alarm rules to the fourth directory location; and performing the following operations through the monitoring program: reading the alarm rules at the fourth directory location; and monitoring the monitored object according to the alarm rules.

[0012] Another aspect of the present disclosure provides a monitoring device applied to a configuration server, including: a receiving module for receiving a rule creation request from a user terminal, the rule creation request including alarm rule information and monitoring object information; a rule generation module for generating a first alarm rule in a preset format according to the alarm rule information; an address determination module for determining a network address of an alarm server corresponding to the monitoring object information; and a sending module for sending the first alarm rule to the alarm server according to the network address, so that the alarm server monitors the monitoring object indicated by the monitoring object information according to the first alarm rule.

[0013] Another aspect of the present disclosure provides a monitoring device applied to an alarm server, comprising: a monitoring program module and a cross-body program module independent of the monitoring program; wherein the cross-body program module comprises: a receiving submodule for receiving alarm rules from a configuration server; an obtaining submodule for obtaining a fourth directory location corresponding to the alarm monitoring program; and a writing submodule for writing the alarm rules to the fourth directory location; and the monitoring program module comprises: a reading submodule for reading the alarm rules at the fourth directory location; and a monitoring submodule for monitoring the monitored object according to the alarm rules.

[0014] Another aspect of the present disclosure provides a computing device, including: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.

[0015] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.

[0016] Another aspect of the present disclosure provides a computer program, which includes computer executable instructions, and the instructions are used to implement the method described above when executed.

[0017] According to an embodiment of the present disclosure, the configuration server receives a rule creation request from a user terminal, generates an alarm rule according to the rule configuration request, and distributes the alarm rule to the corresponding monitoring server. Then, the sidecar program installed in the monitoring server writes the alarm rule into the directory where the monitoring program stores the configuration rules, thereby creating the alarm rule without logging into the monitoring server. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0019] Figure 1 An exemplary system architecture to which the monitoring method according to an embodiment of the present disclosure can be applied is schematically shown;

[0020] Figure 2 A flowchart of a monitoring method performed by a configuration server according to an embodiment of the present disclosure is schematically shown;

[0021] Figure 3 A flowchart of a monitoring method executed by a configuration server according to another embodiment of the present disclosure is schematically shown;

[0022] Figure 4 A flowchart of a monitoring method executed by a configuration server according to another embodiment of the present disclosure is schematically shown;

[0023] Figure 5 A flowchart of a monitoring method executed by a configuration server according to another embodiment of the present disclosure is schematically shown;

[0024] Figure 6 The flowchart of the monitoring alarm method executed by the alarm server according to the embodiment of the present disclosure is schematically shown;

[0025] Figure 7 A block diagram schematically shows a monitoring device applied to a configuration server according to an embodiment of the present disclosure;

[0026] Figure 8 A block diagram schematically shows a monitoring device applied to an alarm server according to an embodiment of the present disclosure; and

[0027] Fig. 9 A block diagram of a computer system suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0028] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0029] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0030] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0031] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0032] The embodiment of the present disclosure provides a monitoring method and a device capable of applying the method. The method includes the following operations performed by a configuration server: receiving a rule creation request from a user terminal, the rule creation request including alarm rule information and monitoring object information; generating a first alarm rule in a preset format according to the alarm rule information; determining a network address of an alarm server corresponding to the monitoring object information; and sending the first alarm rule to the alarm server according to the network address, so that the alarm server monitors the monitoring object indicated by the monitoring object information according to the first alarm rule.

[0033] The alarm server performs the following operations: the sidecar program performs the following operations: receiving the alarm rule from the configuration server; obtaining the fourth directory location corresponding to the alarm monitoring program; and writing the alarm rule to the fourth directory location; and the monitoring program performs the following operations: reading the alarm rule at the fourth directory location; and monitoring the monitoring object according to the alarm rule. The alarm server is installed with a monitoring program and a sidecar program that is independent of the monitoring program.

[0034] Figure 1The exemplary system architecture 100 to which the monitoring method according to the embodiment of the present disclosure can be applied is schematically shown. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0035] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a user terminal (User) 101 , a configuration server (ConfigerServer) 102 , databases 103 , 104 and a monitoring server 105 .

[0036] Among them, the user terminal 101 can send various requests, such as rule creation requests, to the configuration server 102 through the Http Requset (HTTP request) method. The parameters of Http Requset include, for example, ConfigerServerUrl (the address of the configuration server). The content of the request includes, for example, the alarm rule name (policyName), the alarm rule information (policy), the alarm rule type (policyType) and the cluster information (cluster). Among them, the alarm rule name is used to distinguish different operations of different businesses. The alarm rule information includes a specific alarm comparison. The alarm rule type is used to indicate the type of the alarm rule. Cluster information is used to distinguish different monitoring objects, such as different computer rooms.

[0037] The database 103 may be used to store the network address of the alarm server, the monitoring object information, and the corresponding relationship between each alarm server and the monitoring object, for example, it may be a Mysql database.

[0038] The database 104 may be used to store alarm rules, for example, it may be an ETCD database.

[0039] The configuration server 102 is used to receive various requests from the user end and perform corresponding operations. For example, the configuration server 102 can receive a rule creation request from the client, generate an alarm rule in a preset format according to the alarm rule information, read (Read) the network address of the alarm server corresponding to the monitored object information from the database 103, and send the alarm rule to the alarm server 105 according to the network address. The configuration server 102 can also be used to write (Write) the alarm rule to the database 103 and / or the database 104 for archiving. When the request processing is completed, the configuration server 102 feeds back a success notification to the user end 101.

[0040] A monitoring program (e.g., Prometheus) and a sidecar program (e.g., SideCar) are installed in the monitoring server 105, and the monitoring program and the sidecar program are independent of each other. The sidecar program can be used to receive the alarm rules from the configuration server, and write the alarm rules into the directory location (Conf Path) where the monitoring program stores the alarm rules. The monitoring program can be used to read the alarm rules from the directory location to monitor the monitored object. In addition, an alarm module (e.g., AlertManager) can also be installed in the monitoring server 105, and the alarm module can cooperate with the monitoring program, and when the monitoring program detects that the alarm rule is triggered, the alarm module is notified, and the alarm module is used to alarm.

[0041] Figure 2 The flowchart of the monitoring method executed by the configuration server according to the embodiment of the present disclosure is schematically shown.

[0042] like Figure 2 As shown, the method includes, in operation S210, receiving a rule creation request from a user terminal.

[0043] According to an embodiment of the present disclosure, the rule creation request may include, for example, alarm rule information and monitoring object information. The rule creation request may also include an alarm rule identifier, an alarm rule type, and the like.

[0044] According to an embodiment of the present disclosure, the user terminal may send a rule creation request to the configuration server through the HTTP Request method.

[0045] Then, in operation S220, a first alarm rule in a preset format is generated according to the alarm rule information.

[0046] According to an embodiment of the present disclosure, the preset format may include, for example, a YAML format. The suffix of a YAML configuration file is .yml.

[0047] According to an embodiment of the present disclosure, the configuration server may receive multiple alarm rule information, generate an alarm rule from each of the alarm rule information, or may integrate any multiple of the alarm rule information to generate an alarm rule.

[0048] In operation S230, a network address of an alarm server corresponding to the monitoring object information is determined.

[0049] According to an embodiment of the present disclosure, the network address of the alarm server, the monitoring object information, and the corresponding relationship between each alarm server and the monitoring object are recorded in advance in the database. Based on this, the network address of the alarm server corresponding to the monitoring object information can be queried from the database.

[0050] In operation S240, the first alarm rule is sent to the alarm server according to the network address, so that the alarm server monitors the monitoring object indicated by the monitoring object information according to the first alarm rule.

[0051] According to an embodiment of the present disclosure, the configuration server may send the first alarm rule directly to the alarm server, or may store the first alarm rule in a database and synchronize it to the alarm server via the database.

[0052] Figure 3 A flowchart of a monitoring method executed by a configuration server according to another embodiment of the present disclosure is schematically shown.

[0053] like Figure 3 As shown, in addition to operations S210 to S240 , the method further includes operations S310 to S330 .

[0054] In operation S310, a first preset prefix corresponding to a first alarm rule is acquired.

[0055] According to an embodiment of the present disclosure, the correspondence between each alarm rule and a preset prefix may be stored in a cache in advance in the form of a key-value pair. Based on this, operation S210 may include, for example, reading a preset prefix corresponding to the alarm rule, ie, a first preset prefix, from the cache according to the alarm rule identifier.

[0056] In operation S320, a first directory location of a database is determined according to a first preset prefix and a first alarm rule identifier in a rule creation request.

[0057] According to an embodiment of the present disclosure, the preset prefix and the alarm rule identifier can be integrated to obtain a file directory name, thereby obtaining a corresponding directory location. Exemplarily, in this embodiment, the preset prefix and the alarm rule identifier are concatenated in the format of "AB" to obtain a file directory name. Wherein A is the preset prefix and B is the alarm rule identifier. By integrating the preset prefix and the alarm rule identifier to obtain a file directory name, it is possible to avoid a directory location name conflict in the database that causes a rule saving failure.

[0058] According to another embodiment of the present disclosure, the rule creation request may further include an alarm rule type. In the above operation, in addition to the preset prefix and the alarm rule identifier, the alarm rule type may also be integrated into the file directory name.

[0059] According to an embodiment of the present disclosure, the database may be, for example, an ETCD database.

[0060] In operation S330, the first alarm rule is stored in a first directory location.

[0061] According to an embodiment of the present disclosure, the alarm rules may be written into the cache, and then the alarm rules in the cache may be written into the first directory location. It should be noted that when multiple alarm rules are stored in the cache, the alarm rules may be written into the database in sequence according to the order in which they are written into the cache.

[0062] Figure 4 A flowchart of a monitoring method executed by a configuration server according to another embodiment of the present disclosure is schematically shown.

[0063] like Figure 4 As shown, in addition to operations S210 to S240 , the method further includes operations S410 to S440 .

[0064] In operation S410, a rule query request is received from a user terminal.

[0065] According to an embodiment of the present disclosure, the rule query request may include, for example, an alarm rule identifier. For ease of distinction, the alarm rule identifier in the rule query request is referred to as a second alarm rule identifier.

[0066] According to an embodiment of the present disclosure, the user terminal may send a rule query request to the configuration server through the HTTP Request method.

[0067] In operation S420, it is determined whether the cache stores a second alarm rule corresponding to the rule query request. If the cache stores the second alarm rule, operation S430 is performed, and if the cache does not store the first alarm rule, operation S440 is performed.

[0068] According to an embodiment of the present disclosure, it may be possible to search in the cache whether there is an alarm rule corresponding to the second alarm rule identifier, that is, the second alarm rule.

[0069] In operation S430, the first alarm rule is read from the cache, and the second alarm rule is sent to the user terminal.

[0070] In operation S440, a first alarm rule is searched in a database, and the found first alarm rule is sent to a user terminal.

[0071] According to an embodiment of the present disclosure, a second preset prefix corresponding to the second alarm rule identifier can be obtained. Next, similar to the operation of determining the first target location, the second target location of the database is determined according to the second preset prefix and the alarm rule identifier in the rule query request. Then, the first alarm rule is searched at the second target location, and the found first alarm rule is sent to the user end.

[0072] Figure 5 A flowchart of a monitoring method executed by a configuration server according to another embodiment of the present disclosure is schematically shown.

[0073] like Figure 5 As shown, in addition to operations S210 to S240, the method further includes operations S510 to S540.

[0074] In operation S510, a rule editing request is received from a user terminal.

[0075] According to an embodiment of the present disclosure, the rule editing request may include, for example, a third alarm rule identifier and an editing method, wherein the editing method may include, for example, deletion and modification.

[0076] According to an embodiment of the present disclosure, the user terminal may send a rule editing request to the configuration server through the HTTP Request method.

[0077] In operation S520, a third preset prefix corresponding to the third alarm rule identifier is acquired.

[0078] According to an embodiment of the present disclosure, a preset prefix corresponding to the third alarm rule identifier, that is, a third preset prefix, may be read from the cache.

[0079] In operation S530, a third directory location is determined according to the third preset prefix and the third alarm rule identifier.

[0080] According to an embodiment of the present disclosure, the third preset prefix and the third alarm rule identifier may be integrated to obtain a file directory name, thereby obtaining a corresponding directory location, that is, a third directory location.

[0081] In operation S540, the alarm rule at the third directory location is edited.

[0082] According to an embodiment of the present disclosure, according to the editing method in the rule editing request, the alarm rule at the third directory position is edited accordingly. For example, if the editing method is to delete, the corresponding editing operation will delete the alarm rule at the third directory position.

[0083] Figure 6 The flowchart of the monitoring alarm method executed by the alarm server according to the embodiment of the present disclosure is schematically shown.

[0084] like Figure 6 As shown, a monitoring program and a sidecar program (SideCar) independent of the monitoring program are installed in the alarm server. The method includes operations S610-S630 performed by the sidecar program and operations S640-S650 performed by the monitoring program.

[0085] In operation S610, an alarm rule is received from a configuration server.

[0086] In operation S620, a fourth directory location corresponding to the monitoring program is acquired.

[0087] According to an embodiment of the present disclosure, the fourth directory location is the directory location where the monitoring program stores the alarm rule file.

[0088] In operation S630, the alarm rule is written into the fourth directory location.

[0089] In operation S640, the alarm rule at the fourth directory location is read.

[0090] In operation S650, the monitoring object is monitored according to the alarm rule.

[0091] According to an embodiment of the present disclosure, the monitoring program may be, for example, a Prometheus monitoring program.

[0092] According to an embodiment of the present disclosure, the configuration server receives a rule creation request from a user terminal, generates an alarm rule according to the rule configuration request, and distributes the alarm rule to the corresponding monitoring server. Then, the sidecar program installed in the monitoring server writes the alarm rule into the directory where the monitoring program stores the configuration rules, thereby creating the alarm rule without logging into the monitoring server.

[0093] The following is a detailed description of the embodiments of the present invention. Figure 2 to Figure 6 Those skilled in the art will appreciate that the following exemplary embodiments are only used to understand the present disclosure, and the present disclosure is not limited thereto.

[0094] Table 1 schematically shows the interface information of the ConfigerServer service. When the user needs to perform operations such as creation, query, and deletion on the alarm rules, the URL address in Table 1 can be requested using the post or get method of the Http protocol.

[0095]

[0096] Table 1

[0097] As shown in Table 1, the user application calls the interface of the ConfigerServer service to trigger the rule creation operation. The interface calls the following method saveAlarmPolicy(HttpServletRequest request, HttpServletResponse response) to send the request to the configuration server.

[0098] There are four parameters that the configuration server obtains through HttpServletRequest, namely, the alarm rule name (policyName), alarm rule information (policy), alarm rule type (policyType), and cluster information (cluster). Then, the configuration server obtains the fixed prefix of the alarm rule from the cache to splice the directory location name of the ETCD database. After the ETCD directory location name is spliced, the saveKeyValue(etcdPath, policy) method in the ETCDKVUtils class is called to save the created alarm rule in the ETCD database. Next, the configuration server obtains the url address of the corresponding machine where SideCar is installed from Mysql and synchronizes the alarm rule to the machine served by SideCar. This process mainly uses the sendPost(url, policy, 3000, 3)) method of the Http protocol, where the first parameter url is the address of the SideCar obtained from Mysql, the second parameter policy is the alarm rule content, the third parameter is the set timeout, and the fourth parameter is the number of retries, that is, the number of retries set to avoid request failures due to network factors. When SideCar receives the request, it writes the alarm content to the specified directory location through the io input and output stream. In this embodiment, Prometheus is also deployed on the same machine where SideCar is deployed, and the directory location where Prometheus stores alarm rules is the specified directory location. Prometheus can perform alarm detection according to the alarm rule information.

[0099] The user application calls the interface of the ConfigerServer service to trigger the query rule operation. The configuration server receives the rule query request, and then splices the directory location name of ETCD in the same way as the rule creation operation, and queries the alarm rule content by calling the ETCDKVUtils.getValueByKey(etcdPath) method, where etcdPath is the directory location.

[0100] The user-side application calls the interface of the ConfigerServer service to trigger the rule deletion operation. The configuration server receives the rule editing request for the deletion operation, splices the directory path of ETCD in the same way as creating rules, and deletes the alarm rules in the corresponding directory of the SideCar machine by calling the sendPost(url, jsonData, 3000, 3)) method of the Http protocol. It should be noted that the difference between jsonData and policy is that there is an additional key-value pair in jsonData, namely: "method": "delete".

[0101] According to an embodiment of the present disclosure, after completing the creation, query or deletion operation of the alarm rule, you can log in to the correct directory of the corresponding SideCar machine to check whether the effect meets expectations.

[0102] Figure 7 A block diagram of a monitoring device applied to a configuration server according to an embodiment of the present disclosure is schematically shown.

[0103] like Figure 7 As shown, the apparatus 700 includes a receiving module 710 , a rule generating module 720 , an address determining module 730 and a sending module 740 .

[0104] The receiving module 710 is used to receive a rule creation request from a user terminal, where the rule creation request includes alarm rule information and monitoring object information.

[0105] The rule generation module 720 is used to generate a first alarm rule in a preset format according to the alarm rule information.

[0106] The address determination module 730 is used to determine the network address of the alarm server corresponding to the monitored object information.

[0107] The sending module 740 is used to send the first alarm rule to the alarm server according to the network address, so that the alarm server monitors the monitoring object indicated by the monitoring object information according to the first alarm rule.

[0108] Figure 8 A block diagram of a monitoring device applied to an alarm server according to an embodiment of the present disclosure is schematically shown.

[0109] like Figure 8 As shown, the apparatus 800 includes a monitoring program module 810 and a sidecar program module 820 that is independent of the monitoring program.

[0110] The sidecar program module 820 includes:

[0111] The receiving submodule 821 is used to receive the alarm rules from the configuration server.

[0112] The acquisition submodule 822 is used to acquire the fourth directory location corresponding to the alarm monitoring program.

[0113] The writing submodule 823 is used to write the alarm rules into the fourth directory location.

[0114] The monitoring program module 810 includes:

[0115] The reading submodule 811 is used to read the alarm rule at the fourth directory position.

[0116] The monitoring submodule 812 is used to monitor the monitoring object according to the alarm rules.

[0117] According to an embodiment of the present disclosure, the configuration server receives a rule creation request from a user terminal, generates an alarm rule according to the rule configuration request, and distributes the alarm rule to the corresponding monitoring server. Then, the sidecar program installed in the monitoring server writes the alarm rule into the directory where the monitoring program stores the configuration rules, thereby creating the alarm rule without logging into the monitoring server.

[0118] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.

[0119] For example, any multiple of the receiving module 710, the rule generation module 720, the address determination module 730, the sending module 740, the monitoring program module 810, and the cross-body program module 820 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the receiving module 710, the rule generation module 720, the address determination module 730, the sending module 740, the monitoring program module 810, and the cross-body program module 820 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware, and firmware or in an appropriate combination of any of them. Alternatively, at least one of the receiving module 710, the rule generating module 720, the address determining module 730, the sending module 740, the monitoring program module 810, and the sidecar program module 820 may be at least partially implemented as a computer program module, which may perform corresponding functions when the computer program module is executed.

[0120] Fig. 9 A block diagram of a computer system suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Fig. 9 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0121] like Fig. 9 As shown, the computer system 900 according to the embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 902 or the program loaded from the storage part 908 to the random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include an onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.

[0122] In RAM 903, various programs and data required for the operation of system 900 are stored. Processor 901, ROM 902 and RAM 903 are connected to each other through bus 904. Processor 901 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 902 and / or RAM 903. It should be noted that the program can also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0123] According to an embodiment of the present disclosure, the system 900 may further include an input / output (I / O) interface 905, which is also connected to the bus 904. The system 900 may further include one or more of the following components connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.

[0124] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the processor 901, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0125] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0126] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus, or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.

[0127] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0128] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0129] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A monitoring method performed by a configuration server, comprising: Receiving a rule creation request from a user terminal, wherein the rule creation request includes alarm rule information, monitoring object information, and a first alarm rule identifier; Generate a first alarm rule in a preset format according to the alarm rule information; Determine the network address of the alarm server corresponding to the monitored object information; as well as sending the first alarm rule to the alarm server according to the network address, so that the monitoring program and the crossbar program installed in the alarm server monitor the monitoring object indicated by the monitoring object information according to the first alarm rule; The method further comprises: According to the correspondence between the alarm rule and the preset prefix, obtaining a first preset prefix corresponding to the first alarm rule identifier; Determining a first directory location of a database according to the first preset prefix and the first alarm rule identifier; and The first alarm rule is stored in the first directory location.

2. The method according to claim 1, wherein: The storing the first alarm rule to the first directory location includes: Writing the first alarm rule into a cache; and The first alarm rule in the cache is written into the first directory location.

3. The method according to claim 2, further comprising: Receiving a rule query request from a user; Determining whether a second alarm rule corresponding to the rule query request is stored in the cache; In the case where the second alarm rule is stored in the cache, reading the second alarm rule from the cache, and sending the second alarm rule to the user terminal; In the case that the second alarm rule is not stored in the cache, the second alarm rule is searched in a database, and the found second alarm rule is sent to the user terminal.

4. The method according to claim 3, wherein: The rule query request includes a second alarm rule identifier; The searching the database for the second alarm rule includes: Obtaining a second preset prefix corresponding to the second alarm rule identifier; determining a second target location of the database according to the second preset prefix and the second alarm rule identifier; and The second alarm rule is searched at the second target location.

5. The method according to claim 2, further comprising: Receiving a rule editing request from a user terminal, wherein the rule editing request includes a third alarm rule identifier; Obtaining a third preset prefix corresponding to the third alarm rule identifier; Determining a third directory location according to the third preset prefix and the third alarm rule identifier; and Edit the alarm rules at the third directory location.

6. The method according to claim 1, wherein: The preset format includes a YAML format.

7. A monitoring alarm method executed by an alarm server, wherein: The alarm server is installed with a monitoring program and a crossbar program which is independent of the monitoring program; the method comprises: The sidecar procedure performs the following operations: Receive alarm rules from the configuration server; Obtaining a fourth directory location corresponding to the alarm monitoring program; and Writing the alarm rule into the fourth directory location; and The monitoring program performs the following operations: Reading the alarm rule at the fourth directory location; and The monitored object is monitored according to the alarm rule.

8. A monitoring device applied to a configuration server, comprising: A receiving module, configured to receive a rule creation request from a user terminal, wherein the rule creation request includes alarm rule information, monitoring object information, and a first alarm rule identifier; A rule generation module, used to generate a first alarm rule in a preset format according to the alarm rule information; An address determination module, used to determine the network address of the alarm server corresponding to the monitored object information; as well as A sending module, configured to send the first alarm rule to the alarm server according to the network address, so that the monitoring program and the cross-bucket program installed in the alarm server monitor the monitoring object indicated by the monitoring object information according to the first alarm rule; The device is also used to: obtain a first preset prefix corresponding to the first alarm rule identifier according to the correspondence between the alarm rule and the preset prefix; determine a first directory position of the database according to the first preset prefix and the first alarm rule identifier; And, storing the first alarm rule in the first directory location.

9. A monitoring device applied to an alarm server, comprising: A monitoring program module and a sidecar program module independent of the monitoring program; Wherein, the sidecar program module includes: A receiving submodule is used to receive alarm rules from a configuration server; An acquisition submodule, used to acquire a fourth directory location corresponding to the alarm monitoring program; and A writing submodule, used for writing the alarm rule into the fourth directory location; and The monitoring program module includes: a reading submodule, configured to read the alarm rule at the fourth directory location; and The monitoring submodule is used to monitor the monitoring object according to the alarm rules.

10. A computing device comprising: one or more processors; a storage device for storing one or more programs, Wherein, when the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method of any one of claims 1 to 6.

11. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to implement the method of any one of claims 1 to 6.