CN113760639A - Monitoring method, monitoring device, computing equipment and medium - Google Patents

Monitoring method, monitoring device, computing equipment and medium Download PDF

Info

Publication number
CN113760639A
CN113760639A CN202011121551.5A CN202011121551A CN113760639A CN 113760639 A CN113760639 A CN 113760639A CN 202011121551 A CN202011121551 A CN 202011121551A CN 113760639 A CN113760639 A CN 113760639A
Authority
CN
China
Prior art keywords
alarm
rule
alarm rule
monitoring
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011121551.5A
Other languages
Chinese (zh)
Inventor
王毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202011121551.5A priority Critical patent/CN113760639A/en
Publication of CN113760639A publication Critical patent/CN113760639A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display

Abstract

The present disclosure provides a monitoring method performed by a configuration server, including: receiving a rule creating request from a user side, wherein the rule creating request comprises 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 monitored object information; and sending the first alarm rule to an alarm server according to the network address so that the alarm server monitors the monitored object indicated by the monitored object information according to the first alarm rule. The present disclosure also provides a monitoring alarm method performed 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.

Description

Monitoring method, monitoring device, computing equipment and medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a monitoring method, an apparatus, a computing device, and a medium.
Background
Currently, an alert manager component is used in a Prometheus monitoring system as an alarm module of the monitoring system. Prometheus cooperates with AlertManager related components in a configuration file form to complete the monitoring and alarming function. If the Prometheus monitoring system completes the alarm with the AlertManager related component through the form of the configuration file. When an alarm rule is created, a user needs to manually log in a server with a monitoring program, and modify a configuration file in the server. This approach is inconvenient to use and maintain.
Disclosure of Invention
In view of the above, the present disclosure provides a monitoring method, apparatus, computing device and medium.
One aspect of the present disclosure provides a monitoring method performed by a configuration server, including: receiving a rule creating request from a user side, wherein the rule creating request comprises 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 monitored object information; and sending the first alarm rule to the alarm server according to the network address, so that the alarm server monitors the monitored object indicated by the monitored object information according to the first alarm rule.
According to the embodiment of the disclosure, the rule creating request further comprises a first alarm rule identifier; the method further comprises the following steps: acquiring a first preset prefix corresponding to the first alarm rule identifier; determining a first directory position of a database according to the first preset prefix and the first alarm rule identifier; and storing the first alert rule at the first directory location.
According to an embodiment of the present disclosure, the storing the first alarm rule at the first directory location comprises: writing the first alarm rule into a cache; and writing the first alarm rule in the cache into the first directory location.
According to an embodiment of the present disclosure, the method further comprises: receiving a rule query request from a user side; determining whether a second alarm rule corresponding to the rule query request is stored in a cache; under the condition that 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 side; and under the condition that the second alarm rule is not stored in the cache, searching the second alarm rule in a database, and sending the searched second alarm rule to the user side.
According to an embodiment of the present disclosure, the rule query request includes an alert second alarm rule identification; the searching the second alarm rule in the database includes: acquiring a second preset prefix corresponding to the second alarm rule identifier; determining a second target position of the database according to the second preset prefix and the second alarm rule identifier; and looking up the second alarm rule at the second target location.
According to an embodiment of the present disclosure, the method further comprises: receiving a rule editing request from a user side, wherein the rule editing request comprises a third alarm rule identifier; acquiring 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 editing the alarm rule at the third directory location.
According to an embodiment of the present disclosure, the preset format includes a YAML format.
Another aspect of the present disclosure provides a monitoring alarm method performed by an alarm server, wherein a monitoring program and a sidecar program independent of the monitoring program are installed in the alarm server; the method comprises the following steps: performing the following operations by the sidecar program: receiving an alarm rule from a configuration server; acquiring a fourth directory position corresponding to the alarm monitoring program; and writing the alarm rule into the fourth directory location; and executing the following operations by the monitoring program: reading an alarm rule at the fourth directory location; and monitoring the monitored object according to the alarm rule.
Another aspect of the present disclosure provides a monitoring apparatus applied to a configuration server, including: the system comprises a receiving module, a rule creating module and a monitoring module, wherein the receiving module is used for receiving a rule creating request from a user side, and the rule creating request comprises alarm rule information and monitoring object information; the rule generating module is used for generating a first alarm rule in a preset format according to the alarm rule information; the address determination module is used for determining the network address of the alarm server corresponding to the monitored object information; and the sending module is used for sending the first alarm rule to the alarm server according to the network address so that the alarm server monitors the monitored object indicated by the monitored object information according to the first alarm rule.
Another aspect of the present disclosure provides a monitoring apparatus applied to an alarm server, including: the monitoring system comprises a monitoring program module and a cross bucket program module which is independent from the monitoring program; wherein the sidecar program module comprises: the receiving submodule is used for receiving the alarm rule from the configuration server; the acquisition submodule is used for acquiring a fourth directory position corresponding to the alarm monitoring program; the writing sub-module is used for writing the alarm rule into the fourth directory position; and the monitor program module includes: the reading sub-module is used for reading the alarm rule at the position of the fourth directory; and the monitoring submodule is used for monitoring the monitored object according to the alarm rule.
Another aspect of the disclosure provides a computing device comprising: one or more processors; storage means for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of the disclosure provides a computer program comprising computer executable instructions for implementing the method as described above when executed.
According to the embodiment of the disclosure, the configuration server receives a rule creation request from a user side, generates an alarm rule according to the rule configuration request, distributes the alarm rule to the corresponding monitoring server, and writes the alarm rule into the directory of the monitoring program storage configuration rule by the sidecar program installed in the monitoring server, so that the alarm rule can be created without logging in the monitoring server.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
fig. 1 schematically illustrates an exemplary system architecture to which a monitoring method may be applied, according to an embodiment of the present disclosure;
fig. 2 schematically shows a flow chart of a monitoring method performed by a configuration server according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow diagram of a monitoring method performed by a configuration server according to another embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow diagram of a monitoring method performed by a configuration server according to another embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow diagram of a monitoring method performed by a configuration server according to another embodiment of the present disclosure;
FIG. 6 schematically illustrates a flow chart of a monitoring alarm method performed by an alarm server according to an embodiment of the present disclosure;
FIG. 7 schematically shows a block diagram of a monitoring device applied to a configuration server according to an embodiment of the present disclosure;
FIG. 8 schematically shows a block diagram of a monitoring device applied to an alert server according to an embodiment of the present disclosure; and
FIG. 9 schematically illustrates a block diagram of a computer system suitable for implementing the above-described method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The embodiment of the disclosure provides a monitoring method and a device capable of applying the method. The method comprises the following operations executed by a configuration server: receiving a rule creating request from a user side, wherein the rule creating request comprises 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 monitored object information; and sending the first alarm rule to the alarm server according to the network address, so that the alarm server monitors the monitored object indicated by the monitored object information according to the first alarm rule.
Performing, by the alert server: performing the following operations by the sidecar program: receiving an alarm rule from a configuration server; acquiring a fourth directory position corresponding to the alarm monitoring program; and writing the alarm rule into the fourth directory location; and executing the following operations by the monitoring program: reading an alarm rule at the fourth directory location; and monitoring the monitored object according to the alarm rule. The alarm server is internally provided with a monitoring program and a sidecar program which is mutually independent from the monitoring program.
Fig. 1 schematically illustrates an exemplary system architecture 100 to which the monitoring method may be applied, according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to the embodiment may include a User end (User)101, a configuration server (configureserver) 102, databases 103, 104, and a monitoring server 105.
The user terminal 101 may send various requests, such as a rule creation request, to the configuration server 102 by using Http request. The parameter of Http requuset includes, for example, ConfigerServerUrl (address of configuration server). The content of the request includes, for example, an alarm rule name (policyName), alarm rule information (policy), alarm rule type (policyType), and cluster information (cluster). Wherein, the alarm rule name is used for distinguishing different operations of different services. The alarm rule information includes specific alarm contrast. The alarm rule type is used to indicate the type of the alarm rule. And the cluster information is used for distinguishing different monitoring objects, such as different machine rooms.
The database 103 may be used to store network addresses of the alarm servers, monitoring object information, and corresponding relationships between the alarm servers and the monitoring objects, and may be a Mysql database, for example.
The database 104 may be used to store alarm rules, and may be, for example, an ETCD database.
The configuration server 102 is used for receiving various requests from the user terminal and performing corresponding operations. For example, the configuration server 102 may receive a rule creation request from a client, generate an alarm rule in a preset format according to the alarm rule information, Read (Read) a network address of an 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. Configuration server 102 may also be used to Write (Write) alarm rules to database 103 and/or database 104 for archiving. When the request processing is completed, the configuration server 102 feeds back a notification of Success (Success) to the user terminal 101.
The monitoring server 105 has a monitoring program (e.g., Prometheus) and a SideCar program (e.g., SideCar) installed therein, and the monitoring program and the SideCar program are independent from each other. The cross bucket program can be used for receiving the alarm rule from the configuration server and writing the alarm rule into a directory location (Conf Path) where the alarm rule is stored by the monitoring program. The monitoring program can be used for reading the alarm rule from the directory position to monitor the monitored object. In addition, the monitoring server 105 may further include an alarm module (e.g., alert manager), which may cooperate with the monitoring program, and notify the alarm module when the monitoring program detects that the alarm rule is triggered, so that the alarm module performs an alarm.
Fig. 2 schematically shows a flow chart of a monitoring method performed by a configuration server according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes receiving a rule creation request from a user terminal in operation S210.
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 identification, an alarm rule type, and the like.
According to an embodiment of the present disclosure, the user terminal may send the rule creation request to the configuration server through the HTTP Requset method.
Then, in operation S220, a first alarm rule in a preset format is generated according to the alarm rule information.
According to an embodiment of the present disclosure, the preset format may include, for example, a YAML format. YAML has a profile suffix of. yml.
According to the embodiment of the disclosure, the configuration server may receive a plurality of alarm rule information, generate an alarm rule for each of the alarm rule information, and integrate any plurality of the alarm rule information to generate an alarm rule.
In operation S230, a network address of an alert server corresponding to the monitored object information is determined.
According to the embodiment of the disclosure, the network address of the alarm server, the information of the monitored object, and the corresponding relation between each alarm server and the monitored object are recorded in the database in advance. Based on this, the network address of the alarm server corresponding to the monitored object information can be queried from the database.
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 monitored object indicated by the monitored object information according to the first alarm rule.
According to the embodiment of the disclosure, the configuration server may directly send the first alarm rule to the alarm server, or may store the first alarm rule in the database and synchronize the first alarm rule with the alarm server via the database.
Fig. 3 schematically shows a flow chart of a monitoring method performed by a configuration server according to another embodiment of the present disclosure.
As shown in fig. 3, the method includes operations S310 to S330 in addition to operations S210 to S240.
In operation S310, a first preset prefix corresponding to the first alarm rule is obtained.
According to the embodiment of the disclosure, the corresponding relation between each alarm rule and the preset prefix can be stored in a cache in advance in a key value pair mode. Based on this, operation S210 may include, for example, reading a preset prefix corresponding to the alarm rule, i.e., a first preset prefix, from the cache according to the alarm rule identifier.
In operation S320, a first directory location of the database is determined according to the first preset prefix and the first alarm rule identifier in the rule creation request.
According to the embodiment of the disclosure, the preset prefix and the alarm rule identifier can be integrated to obtain the file directory name, so as to obtain the corresponding directory location. Exemplarily, in this embodiment, the preset prefix and the alarm rule identifier are character-spliced by using an "AB" format to obtain a file directory name. Wherein, A is a preset prefix, and B is an alarm rule identifier. By integrating the preset prefix and the alarm rule identifier to obtain the file directory name, the failure of the storage rule caused by the directory location name conflict of the database can be avoided.
According to another embodiment of the present disclosure, the rule creation request may further include an alarm rule type, and 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.
According to an embodiment of the present disclosure, the database may be, for example, an ETCD database.
In operation S330, a first alert rule is stored to a first directory location.
According to embodiments of the present disclosure, the alarm rule may be written into the cache, and then the alarm rule in the cache may be written into the first directory location. It should be noted that, when a plurality of alarm rules are stored in the cache, the alarm rules may be written into the database in sequence according to the sequence of writing into the cache of the alarm rules.
Fig. 4 schematically shows a flow chart of a monitoring method performed by a configuration server according to another embodiment of the present disclosure.
As shown in fig. 4, the method includes operations S410 to S440 in addition to operations S210 to S240.
In operation S410, a rule query request is received from a user terminal.
For the sake of distinction, the alarm rule identification in the rule query request is referred to as a second alarm rule identification.
According to an embodiment of the present disclosure, the user terminal may send a rule query request to the configuration server through the HTTP Requset method.
In operation S420, it is determined 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, operation S430 is performed, and in the case where the first alarm rule is not stored in the cache, operation S440 is performed.
According to the embodiment of the disclosure, whether the alarm rule corresponding to the second alarm rule identifier exists, that is, the second alarm rule, can be searched in the cache.
In operation S430, the first alarm rule is read from the cache, and the second alarm rule is sent to the user side.
In operation S440, the first alarm rule is searched in the database, and the searched first alarm rule is sent to the user side.
According to the embodiment of the disclosure, a second preset prefix corresponding to the second alarm rule identifier may be obtained. And then, similarly to the operation of determining the first target position, determining a second target position of the database according to the second preset prefix and the alarm rule identifier in the rule query request. And then searching the first alarm rule at the second target position, and sending the searched first alarm rule to the user side.
Fig. 5 schematically shows a flow chart of a monitoring method performed by a configuration server according to another embodiment of the present disclosure.
As shown in fig. 5, the method includes operations S510 to S540 in addition to operations S210 to S240.
In operation S510, a rule edit request is received from a user side.
According to an embodiment of the present disclosure, the rule edit request may include, for example, a third alarm rule identification and an editing method. Editing methods may include deletion and modification, for example.
According to an embodiment of the present disclosure, the user terminal may send a rule edit request to the configuration server through the HTTP Requset method.
In operation S520, a third preset prefix corresponding to the third alarm rule identifier is obtained.
According to the embodiment of the present disclosure, the preset prefix corresponding to the third warning rule identifier, that is, the third preset prefix, may be read from the cache.
In operation S530, a third directory location is determined according to a third preset prefix and a third alarm rule identifier.
According to the embodiment of the disclosure, the third preset prefix and the third alarm rule identifier may be integrated to obtain a file directory name, so as to obtain a corresponding directory location, that is, a third directory location.
In operation S540, the alert rule at the third directory location is edited.
According to the embodiment of the disclosure, according to the editing method in the rule editing request, the corresponding editing operation is performed on the alarm rule at the third directory location. For example, if the editing method is deleting, the corresponding editing operation will delete the alarm rule at the third directory location.
Fig. 6 schematically shows a flow chart of a monitoring alarm method performed by an alarm server according to an embodiment of the present disclosure.
As shown in fig. 6, the alarm server is installed with a monitoring program and a SideCar program (SideCar) independent of the monitoring program. The method includes operations S610 to S630 performed by the sidecar program, and operations S640 to S650 performed by the monitoring program.
In operation S610, an alarm rule is received from a configuration server.
In operation S620, a fourth directory location corresponding to the monitoring program is acquired.
According to the embodiment of the disclosure, the fourth directory location is a directory location where the alarm rule file is stored by the monitoring program.
In operation S630, the alert rule is written at a fourth directory location.
In operation S640, the alarm rule at the fourth directory location is read.
In operation S650, the monitoring object is monitored according to the alarm rule.
According to an embodiment of the present disclosure, the monitoring program may be, for example, a Prometheus monitoring program.
According to the embodiment of the disclosure, the configuration server receives a rule creation request from a user side, generates an alarm rule according to the rule configuration request, distributes the alarm rule to the corresponding monitoring server, and writes the alarm rule into the directory of the monitoring program storage configuration rule by the sidecar program installed in the monitoring server, so that the alarm rule can be created without logging in the monitoring server.
The method shown in fig. 2 to 6 will be further explained with reference to specific embodiments. Those skilled in the art will appreciate that the following example embodiments are only for the understanding of the present disclosure, and the present disclosure is not limited thereto.
Table 1 schematically shows interface information of the ConfigerServer service. When the user needs to perform operations such as creating, querying, deleting, etc. on the alarm rule, the user may request the Url address in Table 1 in a post or get manner of the Http protocol.
Figure BDA0002731034620000111
TABLE 1
As shown in table 1, the client application calls the interface of the ConfigerServer service to trigger the create rule operation. The interface calls the following method savealmarmpolicy (http request, http response) to send the request to the configuration server.
The configuration server obtains four parameters, namely an alarm rule name (policyName), alarm rule information (policy), an alarm rule type (policyType) and cluster information (cluster), through the http server. And then, the configuration server acquires the fixed prefix of the alarm rule from the cache and is used for splicing the directory location name of the ETCD database. And after the ETCD directory location names are spliced, calling a saveKeyValue (etcdPath, policy) method in the ETCDVutils class, and storing the created alarm rules in an ETCD database. And then, the configuration server acquires the url address of the corresponding machine for installing the SideCar from the Mysql, and synchronizes the alarm rule to the machine served by the SideCar. The process mainly uses sendPost (url, policy, 3000, 3)) method of Http protocol, wherein the first parameter url is the address of the SideCar obtained from Mysql, the second parameter policy is the content of the alarm rule, the third parameter is the set timeout time, and the fourth parameter is the retry number, i.e. the retry number set for avoiding the request failure due to network and other factors. When the SideCar receives the request, the alarm content is written to the specified directory position in an io input and output stream mode. In this embodiment, Prometheus is also deployed on the same machine on which the siedcar is deployed, and the directory location where the alarm rule is stored by Prometheus is the designated directory location. And the Prometheus can perform alarm detection according to the alarm rule information.
And the user application calls an interface of the ConfigerServer service to trigger the operation of the query rule. The configuration server receives the rule query request, then splices the directory location name of the ETCD in the same way as the rule creating operation, and queries the alarm rule content by calling ETCDVutils.
And the user application calls an interface of the ConfigerServer service to trigger the rule deletion operation. The configuration server receives a rule editing request aiming at deletion operation, splices a directory path of the ETCD in the same way as a rule creating method, and deletes an alarm rule under a corresponding directory of the SideCar machine by calling a sendPost (url, jsonnData, 3000, 3)) method of an Http protocol. It should be noted that the difference between jsonndata and policy is that there is one more key-value pair in jsonndata, namely: "method": "delete".
According to the embodiment of the disclosure, after the creation, query or deletion operation of the alarm rule is completed, whether the checking effect meets the expectation or not can be checked by logging in the correct directory of the corresponding SideCar machine.
Fig. 7 schematically shows a block diagram of a monitoring device applied to a configuration server according to an embodiment of the present disclosure.
As shown in fig. 7, the apparatus 700 includes a receiving module 710, a rule generating module 720, an address determining module 730, and a sending module 740.
The receiving module 710 is configured to receive a rule creating request from a user side, where the rule creating request includes alarm rule information and monitoring object information.
The rule generating module 720 is configured to generate a first alarm rule in a preset format according to the alarm rule information.
And an address determining module 730, configured to determine a network address of the alarm server corresponding to the monitored object information.
The sending module 740 is configured to send the first alarm rule to the alarm server according to the network address, so that the alarm server monitors the monitored object indicated by the monitored object information according to the first alarm rule.
Fig. 8 schematically shows a block diagram of a monitoring device applied to an alert server according to an embodiment of the present disclosure.
As shown in fig. 8, the apparatus 800 includes a monitor module 810 and a sidecar module 820 independent of the monitor.
Wherein, the sidecar program module 820 includes:
the receiving sub-module 821 is used for receiving the alarm rule from the configuration server.
The obtaining submodule 822 is configured to obtain a fourth directory location corresponding to the alarm monitoring program.
The write submodule 823 is configured to write the alarm rule into the fourth directory location.
The monitor module 810 includes:
a reading sub-module 811 for reading the alarm rules at the fourth directory location.
And a monitoring submodule 812, configured to monitor the monitored object according to the alarm rule.
According to the embodiment of the disclosure, the configuration server receives a rule creation request from a user side, generates an alarm rule according to the rule configuration request, distributes the alarm rule to the corresponding monitoring server, and writes the alarm rule into the directory of the monitoring program storage configuration rule by the sidecar program installed in the monitoring server, so that the alarm rule can be created without logging in the monitoring server.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part 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 may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any number 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 fighting program module 820 may be combined and implemented in one module, or any one of them may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the 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 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 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 may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware, and firmware, or by a suitable combination of any several 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, the fighting program module 820 may be at least partially implemented as a computer program module which, when executed, may perform a corresponding function.
FIG. 9 schematically illustrates a block diagram of a computer system suitable for implementing the above-described method according to an embodiment of the present disclosure. The computer system illustrated in FIG. 9 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the disclosure.
As shown in fig. 9, a computer system 900 according to an embodiment of the present disclosure includes a processor 901 which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. Processor 901 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 901 may also include on-board memory for caching purposes. The processor 901 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 903, various programs and data necessary for the operation of the system 900 are stored. The processor 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. The processor 901 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 902 and/or the RAM 903. Note that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
System 900 may also include an input/output (I/O) interface 905, input/output (I/O) interface 905 also connected to bus 904, according to an embodiment of the present disclosure. The system 900 may also include one or more of the following components connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The computer program, when executed by the processor 901, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 902 and/or the RAM 903 described above and/or one or more memories other than the ROM 902 and the RAM 903.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (12)

1. A monitoring method performed by a configuration server, comprising:
receiving a rule creating request from a user side, wherein the rule creating request comprises 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 monitored object information; and
and sending the first alarm rule to the alarm server according to the network address, so that the alarm server monitors the monitored object indicated by the monitored object information according to the first alarm rule.
2. The method of claim 1, wherein the rule creation request further comprises a first alarm rule identification;
the method further comprises the following steps:
acquiring a first preset prefix corresponding to the first alarm rule identifier;
determining a first directory position of a database according to the first preset prefix and the first alarm rule identifier; and
storing the first alert rule at the first directory location.
3. The method of claim 2, wherein the storing the first alert rule at the first directory location comprises:
writing the first alarm rule into a cache; and
and writing the first alarm rule in the cache into the first directory position.
4. The method of claim 3, further comprising:
receiving a rule query request from a user side;
determining whether a second alarm rule corresponding to the rule query request is stored in a cache;
under the condition that 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 side;
and under the condition that the second alarm rule is not stored in the cache, searching the second alarm rule in a database, and sending the searched second alarm rule to the user side.
5. The method of claim 4, wherein the rule query request includes an alert second alarm rule identification;
the searching the second alarm rule in the database includes:
acquiring a second preset prefix corresponding to the second alarm rule identifier;
determining a second target position of the database according to the second preset prefix and the second alarm rule identifier; and
and searching the second alarm rule at the second target position.
6. The method of claim 3, further comprising:
receiving a rule editing request from a user side, wherein the rule editing request comprises a third alarm rule identifier;
acquiring 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
editing an alarm rule at the third directory location.
7. The method of claim 1 wherein the preset format comprises a YAML format.
8. A monitoring alarm method executed by an alarm server is disclosed, wherein a monitoring program and a sidecar program which is independent from the monitoring program are installed in the alarm server; the method comprises the following steps:
performing the following operations by the sidecar program:
receiving an alarm rule from a configuration server;
acquiring a fourth directory position corresponding to the alarm monitoring program; and
writing the alarm rule at the fourth directory location; and
executing the following operations by the monitoring program:
reading an alarm rule at the fourth directory location; and
and monitoring the monitored object according to the alarm rule.
9. A monitoring apparatus applied to a configuration server, comprising:
the system comprises a receiving module, a rule creating module and a monitoring module, wherein the receiving module is used for receiving a rule creating request from a user side, and the rule creating request comprises alarm rule information and monitoring object information;
the rule generating module is used for generating a first alarm rule in a preset format according to the alarm rule information;
the address determination module is used for determining the network address of the alarm server corresponding to the monitored object information; and
and the sending module is used for sending the first alarm rule to the alarm server according to the network address so that the alarm server monitors the monitored object indicated by the monitored object information according to the first alarm rule.
10. A monitoring device applied to an alarm server comprises:
the monitoring system comprises a monitoring program module and a cross bucket program module which is independent from the monitoring program;
wherein the sidecar program module comprises:
the receiving submodule is used for receiving the alarm rule from the configuration server;
the acquisition submodule is used for acquiring a fourth directory position corresponding to the alarm monitoring program; and
a writing submodule, configured to write the alarm rule into the fourth directory location; and
the monitor program module includes:
the reading sub-module is used for reading the alarm rule at the position of the fourth directory; and
and the monitoring submodule is used for monitoring the monitored object according to the alarm rule.
11. A computing device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1 to 7.
12. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 7.
CN202011121551.5A 2020-10-19 2020-10-19 Monitoring method, monitoring device, computing equipment and medium Pending CN113760639A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011121551.5A CN113760639A (en) 2020-10-19 2020-10-19 Monitoring method, monitoring device, computing equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011121551.5A CN113760639A (en) 2020-10-19 2020-10-19 Monitoring method, monitoring device, computing equipment and medium

Publications (1)

Publication Number Publication Date
CN113760639A true CN113760639A (en) 2021-12-07

Family

ID=78785872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011121551.5A Pending CN113760639A (en) 2020-10-19 2020-10-19 Monitoring method, monitoring device, computing equipment and medium

Country Status (1)

Country Link
CN (1) CN113760639A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115473783A (en) * 2022-08-04 2022-12-13 浪潮软件集团有限公司 Prometheus-based index alarm management system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102347864A (en) * 2011-11-02 2012-02-08 网宿科技股份有限公司 System and method for monitoring service quality of content distribution networks
US20120222047A1 (en) * 2007-01-15 2012-08-30 Froehlich Andreas Monitoring a Software System Using an Interpretation Rule of an Ontology
CN110688281A (en) * 2019-09-25 2020-01-14 凡普数字技术有限公司 Alarm method and device in monitoring system and storage medium
CN111666189A (en) * 2020-06-12 2020-09-15 中信银行股份有限公司 Method and system for declaratively visually configuring Prometheus monitoring alarm

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120222047A1 (en) * 2007-01-15 2012-08-30 Froehlich Andreas Monitoring a Software System Using an Interpretation Rule of an Ontology
CN102347864A (en) * 2011-11-02 2012-02-08 网宿科技股份有限公司 System and method for monitoring service quality of content distribution networks
CN110688281A (en) * 2019-09-25 2020-01-14 凡普数字技术有限公司 Alarm method and device in monitoring system and storage medium
CN111666189A (en) * 2020-06-12 2020-09-15 中信银行股份有限公司 Method and system for declaratively visually configuring Prometheus monitoring alarm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
任帅;: "动环集中运维管理平台应用探析", 通信电源技术, no. 03, 10 February 2020 (2020-02-10) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115473783A (en) * 2022-08-04 2022-12-13 浪潮软件集团有限公司 Prometheus-based index alarm management system and method

Similar Documents

Publication Publication Date Title
US11012339B2 (en) Web site reachability management for content browsing
CN111221521B (en) Method, device, computer system and readable storage medium for generating log code
CN108038039B (en) Method for recording log and micro-service system
CN107644075B (en) Method and device for collecting page information
US9514176B2 (en) Database update notification method
CN112364110A (en) Metadata management method, device and equipment and computer storage medium
CN110460584B (en) Access request processing method and device, electronic equipment and computer readable medium
CN113138757B (en) Front-end code automatic generation method, device, server, system and medium
CN113900834A (en) Data processing method, device, equipment and storage medium based on Internet of things technology
CN112579307A (en) Physical lock resource allocation detection method and device and electronic equipment
CN112433921A (en) Method and apparatus for dynamic point burying
CN111158945A (en) Kernel fault processing method and device, network security equipment and readable storage medium
CN113760639A (en) Monitoring method, monitoring device, computing equipment and medium
CN114153703A (en) Micro-service exception positioning method and device, electronic equipment and program product
CN113886264A (en) Embedded method, device, equipment and storage medium of distributed database
CN113343312A (en) Page tamper-proofing method and system based on front-end point burying technology
CN111783005A (en) Method, apparatus and system for displaying web page, computer system and medium
CN109286532B (en) Management method and device for alarm information in cloud computing system
CN111198853B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN111031126A (en) Cluster cache sharing method, system, equipment and storage medium
US9075845B1 (en) Correlating and reconciling descriptor data associated with computing systems
CN115098469A (en) Database migration method and device, electronic equipment and readable storage medium
CN110515803B (en) Processing method and device for log message and electronic equipment
US9075844B1 (en) Correlating and reconciling descriptor data associated with computing systems
CN111786828A (en) Log processing method executed in network device and network device

Legal Events

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