Monitoring alarm method, device, computer equipment and storage medium
By obtaining and processing monitoring information in the unitized system, determining alarm determination information and sending alarms, the problem of difficulty in monitoring abnormal operating conditions in the unitized system is solved, real-time monitoring and alarming of the unitized system is realized, and the efficiency of monitoring is improved. Immediacy and effectiveness.
Patent Information
- Application Number
- CN202211459535.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-16
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-11-16
AI Technical Summary
The existing technology lacks a monitoring and alarm method suitable for unitized systems, resulting in the inability to detect abnormal operation conditions of unitized systems in a timely manner.
A monitoring and alarm method is provided. By obtaining unitized monitoring information, based on preset data acquisition rules and alarm judgment rules, the alarm judgment information of the monitoring alarm category is determined, and the alarm information is sent to realize monitoring and alarming of the unitized system. The method includes intra-unit traffic alarms and cross-unit abnormal traffic alarms, using unit types, monitoring indicator calculations and alarm judgment information construction, and the application of alarm levels and sending rules.
It realizes real-time monitoring and abnormal alarms for unitized systems, improves the immediacy and effectiveness of monitoring alarms, and ensures that operation and maintenance personnel can intervene in time to prevent problems from expanding.
Smart Images

Figure CN115733733B
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a monitoring alarm method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] A unit is a self-contained collection that can complete all business operations. This collection contains all services required by all businesses and the data assigned to this unit. The unitized architecture uses the unit as the basic unit for system deployment. Several units are deployed in all computer rooms in the entire site. Any unit deploys all applications required by the system, and the data is a part of the total data after being horizontally divided according to a certain dimension (usually the customer dimension). Unitization is the process of designing and transforming services and data to conform to unit characteristics.
[0003] During the operation of the modular system, data such as business data and log data will be generated. In order to ensure the normal operation of the modular system, it is necessary to monitor the data of the modular system, so as to timely discover the abnormal operation of the modular system and notify the operation and maintenance personnel of the modular system with an alarm.
[0004] However, there is currently a lack of monitoring and alarm methods suitable for unitized systems. Summary of the invention
[0005] Based on this, it is necessary to provide a monitoring and alarm method, device, computer equipment, computer-readable storage medium and computer program product that can be applicable to the unitized system in order to solve the above-mentioned technical problems.
[0006] In a first aspect, the present application provides a monitoring alarm method. The method comprises:
[0007] Based on a preset data acquisition rule, the stored unitized monitoring information is acquired; the unitized monitoring information includes unitized metadata and monitoring data corresponding to the unitized metadata; the unitized metadata indicates a unit type of a unit in the unitized system;
[0008] Determine the alarm determination information corresponding to the monitoring alarm category according to the unitized monitoring information, the preset monitoring alarm category and the alarm determination rule corresponding to the monitoring alarm category;
[0009] According to the alarm determination information and the preset alarm mode rules, the alarm information corresponding to the monitoring alarm category is sent; the alarm information is used to monitor the unitized system.
[0010] In one of the embodiments, when the monitoring alarm category is an intra-unit traffic alarm, the determining the alarm determination information corresponding to the monitoring alarm category according to the unitized monitoring information, the preset monitoring alarm category and the alarm determination rule corresponding to the monitoring alarm category includes:
[0011] Classifying the unitized monitoring information according to unit types, and determining the unitized monitoring information corresponding to each unit type;
[0012] For each unit type, according to the unitized monitoring information corresponding to the unit type and the preset monitoring indicators, the calculation results of the monitoring indicators under the unit type are calculated;
[0013] For each monitoring indicator, according to the calculation result of the monitoring indicator, determine the alarm determination information corresponding to the monitoring indicator under the unit type; the alarm determination information is used to indicate whether to trigger an alarm action;
[0014] The alarm determination information corresponding to each of the monitoring indicators under each of the unit types constitutes the alarm determination information corresponding to the flow alarm within the unit.
[0015] In one embodiment, the calculation result of each monitoring indicator under the unit type according to the unitized monitoring information corresponding to the unit type and the preset monitoring indicator includes:
[0016] According to the unitized monitoring information corresponding to the unit type and the preset first monitoring indicator, calculate and store the calculation results of each first monitoring indicator under the unit type within a unit time;
[0017] Calculate the calculation results of each second monitoring indicator according to the stored calculation results of each first monitoring indicator under the unit type in each unit time and the preset second monitoring indicator; the second monitoring indicator includes the year-on-year increase of the first monitoring indicator and the month-on-month increase of the first monitoring indicator;
[0018] The calculation results of each of the first monitoring indicators and the calculation results of each of the second monitoring indicators constitute the calculation results of each of the monitoring indicators under the unit type.
[0019] In one of the embodiments, when the monitoring alarm category is an inter-unit abnormal traffic alarm, the determining the alarm determination information corresponding to the monitoring alarm category according to the unitized monitoring information, the preset monitoring alarm category and the alarm determination rule corresponding to the monitoring alarm category includes:
[0020] For each transaction in the unitized monitoring information, determining each node through which the transaction passes;
[0021] For each node, a mapping relationship is established between the timestamp of the node and the node information of the node; the node information at least includes a unit type;
[0022] Sorting the mapping relationships corresponding to the nodes in chronological order, and determining the node order of the transaction passing through the nodes according to the sorted mapping relationships;
[0023] Determining alarm determination information corresponding to the transaction according to the number of unit types of the unit types of the nodes in the node sequence; the alarm determination information is used to indicate whether an alarm action is triggered;
[0024] The alarm determination information corresponding to each of the transactions is used to constitute the alarm determination information corresponding to the cross-unit abnormal traffic alarm.
[0025] In one embodiment, the alarm mode rule includes an alarm level determination rule and an alarm sending rule; and sending the alarm information corresponding to the monitoring alarm category according to the alarm determination information and the preset alarm mode rule includes:
[0026] Generate alarm content according to the target alarm template and the alarm determination information; the alarm content includes the alarm type;
[0027] Determine the alarm level corresponding to the alarm content according to the alarm content and the preset alarm level determination rule;
[0028] According to the preset alarm sending rules, the alarm content and the alarm level, the alarm information corresponding to the monitoring alarm category is determined and sent.
[0029] In one embodiment, the determining and sending the alarm information corresponding to the monitoring alarm category according to the preset alarm sending rule, the alarm content and the alarm level includes:
[0030] Determine whether the alarm type exists in the alarm types corresponding to the alarm information that have been sent;
[0031] If the alarm type exists in the alarm types corresponding to the alarm information that has been sent, updating the alarm number of the alarm type;
[0032] According to the alarm content, the alarm level and the number of alarms of the alarm type within a preset scanning time, the alarm information corresponding to the monitoring alarm category is determined, and the alarm information is sent.
[0033] In one embodiment, the method further comprises:
[0034] Check whether there is a personalized alarm template;
[0035] In the case where the personalized alarm template exists, checking whether the personalized alarm template meets the preset alarm template condition;
[0036] In the case where the personalized alarm template meets the preset alarm template condition, the personalized alarm template is used as the target alarm template.
[0037] In one embodiment, sending the alarm information corresponding to the monitoring alarm category according to the alarm determination information and the preset alarm mode rule includes:
[0038] For each transaction, check whether the alarm information interface of the alarm determination information corresponding to the transaction is closed;
[0039] If the alarm information interface is not closed, the alarm information corresponding to the transaction is sent according to the alarm determination information corresponding to the transaction and the preset alarm mode rule.
[0040] In one embodiment, the method further comprises:
[0041] Receiving a switching alarm instruction sent by the modular system; the switching alarm instruction includes switching alarm information; the switching alarm information is alarm information generated by the modular system according to the node switching situation of the modular system;
[0042] In response to the switching alarm instruction, an alarm message is sent according to the switching alarm message and a preset alarm mode rule.
[0043] In a second aspect, the present application also provides a monitoring alarm device. The device comprises:
[0044] An acquisition module, configured to acquire stored unitized monitoring information based on a preset data acquisition rule; the unitized monitoring information includes unitized metadata and monitoring data corresponding to the unitized metadata; the unitized metadata indicates a unit type of a unit in the unitized system;
[0045] A first determination module, configured to determine the alarm determination information corresponding to the monitoring alarm category according to the unitized monitoring information, the preset monitoring alarm category and the alarm determination rule corresponding to the monitoring alarm category;
[0046] The first sending module is used to send the alarm information corresponding to the monitoring alarm category according to the alarm determination information and the preset alarm mode rule; the alarm information is used to monitor the unitized system.
[0047] In one embodiment, when the monitoring alarm category is an intra-unit flow alarm, the first determining module is specifically configured to:
[0048] Classifying the unitized monitoring information according to unit types, and determining the unitized monitoring information corresponding to each unit type;
[0049] For each unit type, according to the unitized monitoring information corresponding to the unit type and the preset monitoring indicators, the calculation results of the monitoring indicators under the unit type are calculated;
[0050] For each monitoring indicator, according to the calculation result of the monitoring indicator, determine the alarm determination information corresponding to the monitoring indicator under the unit type; the alarm determination information is used to indicate whether to trigger an alarm action;
[0051] The alarm determination information corresponding to each of the monitoring indicators under each of the unit types constitutes the alarm determination information corresponding to the flow alarm within the unit.
[0052] In one embodiment, the first determining module is specifically configured to:
[0053] Calculate and store, according to the unitized monitoring information corresponding to the unit type and the preset first monitoring indicator, the calculation results of each of the first monitoring indicators under the unit type within a unit time;
[0054] Calculate the calculation results of each second monitoring indicator according to the stored calculation results of each first monitoring indicator under the unit type in each unit time and the preset second monitoring indicator; the second monitoring indicator includes the year-on-year increase of the first monitoring indicator and the month-on-month increase of the first monitoring indicator;
[0055] The calculation results of each of the first monitoring indicators and the calculation results of each of the second monitoring indicators constitute the calculation results of each of the monitoring indicators under the unit type.
[0056] In one of the embodiments, when the monitoring alarm category is an inter-unit abnormal traffic alarm, the first determining module is specifically configured to:
[0057] For each transaction in the unitized monitoring information, determine each node through which the transaction passes;
[0058] For each node, a mapping relationship is established between the timestamp of the node and the node information of the node; the node information at least includes a unit type;
[0059] Sorting the mapping relationships corresponding to the nodes in chronological order, and determining the node order of the transaction passing through the nodes according to the sorted mapping relationships;
[0060] Determining alarm determination information corresponding to the transaction according to the number of unit types of the unit types of the nodes in the node sequence; the alarm determination information is used to indicate whether an alarm action is triggered;
[0061] The alarm determination information corresponding to each of the transactions is used to constitute the alarm determination information corresponding to the cross-unit abnormal traffic alarm.
[0062] In one embodiment, the alarm mode rule includes an alarm level determination rule and an alarm sending rule; the first sending module is specifically used to:
[0063] Generate alarm content according to the target alarm template and the alarm determination information; the alarm content includes the alarm type;
[0064] Determine the alarm level corresponding to the alarm content according to the alarm content and the preset alarm level determination rule;
[0065] According to the preset alarm sending rules, the alarm content and the alarm level, the alarm information corresponding to the monitoring alarm category is determined and sent.
[0066] In one embodiment, the first sending module is specifically used to:
[0067] Determine whether the alarm type exists in the alarm types corresponding to the alarm information that have been sent;
[0068] If the alarm type exists in the alarm types corresponding to the alarm information that has been sent, updating the alarm number of the alarm type;
[0069] According to the alarm content, the alarm level and the number of alarms of the alarm type within a preset scanning time, the alarm information corresponding to the monitoring alarm category is determined, and the alarm information is sent.
[0070] In one embodiment, the device further comprises:
[0071] The first checking module is used to check whether there is a personalized alarm template;
[0072] A second checking module is used to check whether the personalized alarm template meets the preset alarm template condition when the personalized alarm template exists;
[0073] The second determining module is used to use the personalized alarm template as a target alarm template if the personalized alarm template meets a preset alarm template condition.
[0074] In one embodiment, the first sending module is specifically used to:
[0075] For each transaction, check whether the alarm information interface of the alarm determination information corresponding to the transaction is closed;
[0076] If the alarm information interface is not closed, the alarm information corresponding to the transaction is sent according to the alarm determination information corresponding to the transaction and the preset alarm mode rule.
[0077] In one embodiment, the device further comprises:
[0078] A receiving module, configured to receive a switching alarm instruction sent by a modular system; the switching alarm instruction includes switching alarm information; the switching alarm information is alarm information generated by the modular system according to a node switching situation of the modular system;
[0079] The second sending module is used to respond to the switching alarm instruction and send alarm information according to the switching alarm information and a preset alarm mode rule.
[0080] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps described in the first aspect are implemented.
[0081] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps described in the first aspect are implemented.
[0082] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps described in the first aspect are implemented.
[0083] The above-mentioned monitoring alarm method, device, computer equipment, storage medium and computer program product obtain the stored unitized monitoring information based on the preset data acquisition rules; the unitized monitoring information includes unitized metadata and monitoring data corresponding to the unitized metadata; the unitized metadata represents the unit type of the unit in the unitized system; according to the unitized monitoring information, the preset monitoring alarm category and the alarm judgment rule corresponding to the monitoring alarm category, the alarm judgment information corresponding to the monitoring alarm category is determined; according to the alarm judgment information and the preset alarm mode rule, the alarm information corresponding to the monitoring alarm category is sent; the alarm information is used to monitor and alarm the unitized system. In this way, by determining the alarm judgment information corresponding to the preset monitoring alarm category according to the stored unitized monitoring information, and sending the alarm information corresponding to the monitoring alarm category according to the alarm judgment information corresponding to the monitoring alarm category, the abnormal operation of the unitized system can be discovered in time, and the monitoring and alarm of the data of the unitized system can be realized. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] Figure 1 A structural diagram of a unitized monitoring system in one embodiment;
[0085] Figure 2 is a structural diagram of a unitized system in one embodiment;
[0086] Figure 3 A flowchart of a monitoring alarm method in an embodiment;
[0087] Figure 4 A schematic diagram of a flow chart of a step of determining alarm determination information corresponding to a monitoring alarm category in an embodiment;
[0088] Figure 5 It is a flowchart of the steps of calculating the calculation results of each monitoring index under the unit type in one embodiment;
[0089] Figure 6 A schematic flow chart of a step of determining alarm determination information corresponding to a monitoring alarm category in another embodiment;
[0090] Figure 7 A schematic diagram of a flow chart of the steps of sending the alarm information corresponding to the monitoring alarm category in an embodiment;
[0091] Figure 8 A flowchart of the steps of determining and sending alarm information corresponding to a monitoring alarm category in an embodiment;
[0092] Fig. 9 A flowchart of a monitoring alarm method in another embodiment;
[0093] Fig.10A schematic flow chart of the step of sending the alarm information corresponding to the monitoring alarm category in another embodiment;
[0094] Fig.11 A flowchart of a monitoring alarm method in another embodiment;
[0095] Fig.12 A structural block diagram of a monitoring alarm device in an embodiment;
[0096] Fig.13 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0097] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0098] The monitoring alarm method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the unitized monitoring system 100 includes a collection terminal 102, a data processing node 104 and a server node 106. The unitized monitoring system is used to monitor the unitized system. The unitized monitoring system can be implemented through a cloud computing platform. For example, the unitized monitoring system can be implemented through a platform as a service (Platform as aService, PaaS). It is understandable that the collection terminal 102, the data processing node 104 and the server node 106 included in the unitized monitoring system 100 can be implemented with a separate hardware device or a software module. The unitized system is a system that uses the unit as the basic unit for system deployment. Any unit deploys all applications required by the system, and the data of any unit is a part of the system after the full amount of data is horizontally divided according to a certain dimension (usually the customer dimension). The unit is a self-contained set that can complete all business operations. This set contains all services required for all businesses and data assigned to this unit. The unit can be a physical unit or a logical unit. It is understandable that the unit can be a terminal or a server. The server can be implemented with an independent server or a server cluster consisting of multiple servers. In one embodiment, the unitized system includes: an access unit, a slicing unit, and a common unit, such as Figure 2 As shown. The access unit includes application node A1. The slicing unit includes application node B1, application node C1, application node B2 and application node C2. The public unit includes application B proxy layer and application node D1. Among them, the access unit is a unit for data access. The slicing unit is a unit for processing data. The public unit is a unit for performing public operations.
[0099] In one embodiment, Figure 3 As shown, a monitoring alarm method is provided, which is applied to Figure 1 The unitized monitoring system in the example is used to illustrate, including the following steps:
[0100] Step 301, based on preset data acquisition rules, acquire the stored unitized monitoring information.
[0101] The unitized monitoring information includes unitized metadata and monitoring data corresponding to the unitized metadata. The unitized metadata indicates the unit type of the unit in the unitized system.
[0102] In an embodiment of the present application, the monitoring data may be data of a unitized system. Unitized metadata is metadata representing unit attributes. Unitized metadata may include physical metadata and logical metadata. Physical metadata is metadata representing physical unit attributes. Logical metadata is metadata representing logical unit attributes. A physical unit is a unit where the physical location of a machine environment deployed by a server or the like is located. For example, A-001 is used to represent a server deployed at unit 001 at address A. A logical unit is a unit in a logical sense with a certain business meaning. For example, it can be divided into 10 units according to the card suffix of a personal account, and person-01 represents a unit with a card suffix of 1 for a personal account. The unit type is the type of unit in the unitized system. For example, a unitized system may include: an access unit, a sharding unit, and a public unit. An access unit is a unit for accessing data. A sharding unit is a unit for processing data. A public unit is a unit for performing public operations. Sharding units include: sharding unit 1, sharding unit 2, sharding unit 3, and sharding unit 4. The unit type of sharding unit 1 is sharding unit 1.
[0103] The server node obtains the unitized monitoring information from the storage space storing the unitized monitoring information, wherein the unitized monitoring information may be the monitoring information directly stored after being collected by the unitized monitoring system, or the monitoring information stored after the unitized monitoring system processes the collected data.
[0104] Step 302: Determine alarm determination information corresponding to the monitoring alarm category according to the unitized monitoring information, the preset monitoring alarm category and the alarm determination rule corresponding to the monitoring alarm category.
[0105] In an embodiment of the present application, the server node pre-sets the monitoring alarm category. Among them, the monitoring alarm category includes: intra-unit flow alarm and cross-unit abnormal flow alarm. Then, the server node determines the alarm determination information corresponding to the monitoring alarm category according to the unitized monitoring information, the monitoring alarm category and the alarm determination rule corresponding to the monitoring alarm category.
[0106] Step 303: Send the alarm information corresponding to the monitoring alarm category according to the alarm determination information and the preset alarm mode rule.
[0107] Among them, the alarm information is used to monitor and alarm the unitized system.
[0108] In the embodiment of the present application, the server node generates the alarm information corresponding to the monitoring alarm category according to the alarm determination information and the preset alarm mode rule. Then, the server node sends the alarm information corresponding to the monitoring alarm category.
[0109] In the above-mentioned flow observation method, based on the preset data acquisition rules, the stored unitized monitoring information is obtained; according to the unitized monitoring information, the preset monitoring alarm category and the alarm judgment rule corresponding to the monitoring alarm category, the alarm judgment information corresponding to the monitoring alarm category is determined; according to the alarm judgment information and the preset alarm mode rule, the alarm information corresponding to the monitoring alarm category is sent. In this way, by determining the alarm judgment information corresponding to the preset monitoring alarm category based on the stored unitized monitoring information, and sending the alarm information corresponding to the monitoring alarm category based on the alarm judgment information corresponding to the monitoring alarm category, the abnormal operation of the unitized system can be discovered in time, and the monitoring alarm of the data of the unitized system can be realized.
[0110] In one embodiment, Figure 4 As shown, in the case where the monitoring alarm category is a unit traffic alarm, the specific process of determining the alarm determination information corresponding to the monitoring alarm category according to the unitized monitoring information, the preset monitoring alarm category and the alarm determination rule corresponding to the monitoring alarm category includes the following steps:
[0111] Step 401: classify the unitized monitoring information according to the unit type, and determine the unitized monitoring information corresponding to each unit type.
[0112] In the embodiment of the present application, the server node classifies the unitized monitoring information according to the unit type, and obtains the unitized monitoring information corresponding to each unit type.
[0113] In one example, the server node pre-sets the normal data condition. Then, the server node determines the normal data in the unitized monitoring information according to the preset normal data condition and the unitized monitoring information. Specifically, the server node uses the unitized monitoring information that meets the preset normal data condition as the normal data in the unitized monitoring information. Then, the server node classifies the normal data in the unitized monitoring information according to the unit type, and obtains the unitized monitoring information corresponding to each unit type. Among them, the normal data condition is the condition for determining the normal data in the unitized monitoring information. The normal data condition can be the type identifier of the unitized indicator type included in the unitized monitoring information, and can also be the type identifier of the unitized indicator type included in the unitized monitoring information as a preset type identifier. The type identifier is used to indicate the unitized indicator type of the unitized monitoring information. The unitized indicator type can include an indicator class, a system class, and a link class. The unitized monitoring information of the indicator class is the unitized monitoring information related to the transaction action and does not involve the transaction link. The unitized monitoring information of the indicator class is used to measure whether a transaction is successful or not. The unitized monitoring information of the indicator class includes but is not limited to the transaction volume, the transaction time, whether the transaction is successful, and the transaction abnormality type. The unitized monitoring information of the system class is the data of the operating system related to the transaction. The unitized monitoring information of the system class includes but is not limited to the monitoring data of the Java Virtual Machine (JVM) of the operating system and the monitoring data of the operating system (OS). The unitized monitoring information of the link class is the unitized monitoring information related to the transaction action and involving the transaction link. The unitized monitoring information of the link class is used to represent the transaction link. The transaction link is a series of services involved in a transaction. For example, a payment transaction involves multiple services. Before payment, a series of services such as protocol query service, blacklist verification service, customer authentication service, etc. will be called. The data of the entire link is strung together to form a completed payment transaction. The unitized monitoring information of the link class includes but is not limited to link links and call relationships.
[0114] Step 402: for each unit type, according to the unitized monitoring information corresponding to the unit type and the preset monitoring indicators, the calculation results of the monitoring indicators under the unit type are calculated.
[0115] In an embodiment of the present application, the server node pre-sets monitoring indicators. Among them, the monitoring indicators are indicators for monitoring the unitized system. The monitoring indicators include but are not limited to the number of transactions, average response time, number of failures, type of failure exceptions, number of transaction jitters, number of sudden increases and decreases in transactions, and duration of sudden increases and decreases in transactions. Then, for each unit type, the server node calculates the calculation results of each monitoring indicator under the unit type according to the unitized monitoring information corresponding to the unit type, each monitoring indicator, and the calculation rules corresponding to each monitoring indicator.
[0116] Step 403: for each monitoring indicator, according to the calculation result of the monitoring indicator, determine the alarm judgment information corresponding to the monitoring indicator under the unit type.
[0117] The alarm determination information is used to indicate whether an alarm action is triggered.
[0118] In an embodiment of the present application, for each monitoring indicator, the server node pre-sets a threshold value of the monitoring indicator. Then, the server node compares the calculation result of the monitoring indicator with the threshold value of the monitoring indicator. If the calculation result of the monitoring indicator is greater than or equal to the threshold value of the monitoring indicator, an alarm action is triggered. If the calculation result of the monitoring indicator is less than the threshold value of the monitoring indicator, no alarm action is triggered.
[0119] In one embodiment, the monitoring indicator is an average response time. The server node pre-sets a threshold value of the average response time to 30 milliseconds. Then, the server node compares the calculation result of the monitoring indicator with the threshold value of the monitoring indicator. If the calculation result of the monitoring indicator is greater than or equal to the threshold value of the monitoring indicator, an alarm action is triggered. If the calculation result of the monitoring indicator is less than the threshold value of the monitoring indicator, no alarm action is triggered.
[0120] Then, the server node determines the alarm determination information corresponding to the monitoring indicator under the unit type according to whether the alarm action is triggered, wherein the alarm determination information at least includes whether the alarm action is triggered.
[0121] In one example, the server node uses whether to trigger an alarm action as alarm determination information corresponding to the monitoring indicator under the unit type.
[0122] In another example, the server node determines the indicator abnormality information corresponding to the monitoring indicator according to whether the monitoring indicator triggers an alarm action. The indicator abnormality information indicates an abnormal monitoring indicator. The indicator abnormality information includes a monitoring indicator identifier of the monitoring indicator. Then, the server node uses whether to trigger an alarm action and the indicator abnormality information as the alarm determination information corresponding to the monitoring indicator under the unit type.
[0123] Step 404, the alarm determination information corresponding to each monitoring indicator under each unit type is used to form the alarm determination information corresponding to the flow alarm within the unit.
[0124] In the embodiment of the present application, the server node constructs the alarm determination information corresponding to the traffic alarm within the unit by combining the alarm determination information corresponding to each monitoring indicator under each unit type.
[0125] In the above-mentioned flow observation method, the unitized monitoring information is classified according to the unit type, and the unitized monitoring information corresponding to each unit type is determined; for each unit type, the calculation results of each monitoring indicator under the unit type are calculated according to the unitized monitoring information corresponding to the unit type and the preset monitoring indicators; for each monitoring indicator, the alarm judgment information corresponding to the monitoring indicator under the unit type is determined according to the calculation result of the monitoring indicator; the alarm judgment information corresponding to each monitoring indicator under each unit type is used to form the alarm judgment information corresponding to the flow alarm in the unit. In this way, by performing convergence calculation on the stored unitized monitoring information according to the unit type, the alarm judgment information corresponding to each monitoring indicator under each unit type is determined respectively, and then the alarm judgment information corresponding to the monitoring alarm category is determined according to the alarm judgment information corresponding to each monitoring indicator under each unit type, the data of the unitized system can be monitored through various preset monitoring indicators, the abnormal operation of the flow in the unit of the unitized system can be discovered in real time, and an alarm can be issued, thereby improving the immediacy of monitoring alarms for the unitized system.
[0126] In one embodiment, Figure 5 As shown, according to the unitized monitoring information corresponding to the unit type and the preset monitoring indicators, the calculation results of each monitoring indicator under the unit type include:
[0127] Step 501 : Calculate and store the calculation results of each first monitoring indicator under the unit type within a unit time according to the unitized monitoring information corresponding to the unit type and the preset first monitoring indicator.
[0128] In the embodiment of the present application, the server node pre-sets the unit time.
[0129] In one example, the server node receives the set time selected by the user through the front-end interface, and then the server node can use the set time as the unit time.
[0130] In another example, if the server node does not receive the set time selected by the user through the front-end interface, the server node may use the default time as the unit time. For example, the default time may be 1 hour.
[0131] At the same time, the server node pre-sets the first monitoring indicator. Among them, the first monitoring indicator is an indicator for monitoring the unitized system within a unit time. The first monitoring indicator includes but is not limited to the number of transactions, the average response time, the number of failures, the type of failure exceptions, the number of transaction jitters, the number of sudden increases and decreases in transactions, and the duration of sudden increases and decreases in transactions. Then, the server node calculates the calculation results of each first monitoring indicator under the unit type within a unit time according to the unitized monitoring information corresponding to the unit type, each first monitoring indicator and the calculation rules corresponding to each first monitoring indicator. Then, the server node stores the calculation results of each first monitoring indicator under the unit type within a unit time.
[0132] In one example, the server node stores the calculation results of each first monitoring indicator under the unit type within the unit time into the intra-unit traffic warning hour table.
[0133] Step 502, calculating the calculation results of each second monitoring indicator according to the stored calculation results of each first monitoring indicator under the unit type in each unit time and the preset second monitoring indicator.
[0134] Among them, the second monitoring indicator includes the year-on-year growth of the first monitoring indicator and the month-on-month growth of the first monitoring indicator.
[0135] In an embodiment of the present application, the server node pre-sets a second monitoring indicator. The second monitoring indicator is used to represent the change of the first monitoring indicator in each unit time. Then, the server node obtains the calculation results of each first monitoring indicator stored in each unit time under the unit type. In one example, the server node can periodically scan the calculation results of the first monitoring indicator in the traffic warning hour table in the unit. Then, the server node calculates the calculation results of each second monitoring indicator based on the calculation results of each first monitoring indicator stored in each unit time under the unit type, each second monitoring indicator and the calculation rules corresponding to each second monitoring indicator.
[0136] Step 503: The calculation results of the first monitoring indicators and the calculation results of the second monitoring indicators are combined to form the calculation results of the monitoring indicators under the unit type.
[0137] In the embodiment of the present application, the server node combines the calculation results of each first monitoring indicator and the calculation results of each second monitoring indicator to form the calculation results of each monitoring indicator under the unit type.
[0138] In the above-mentioned flow observation method, according to the unitized monitoring information corresponding to the unit type and the preset first monitoring indicator, the calculation results of each first monitoring indicator under the unit type in the unit time are calculated and stored; according to the stored calculation results of each first monitoring indicator under the unit type in each unit time and the preset second monitoring indicator, the calculation results of each second monitoring indicator are calculated; the calculation results of each first monitoring indicator and the calculation results of each second monitoring indicator constitute the calculation results of each monitoring indicator under the unit type. In this way, by converging and calculating the stored unitized monitoring information according to the unit type, not only the calculation results of the first monitoring indicator but also the calculation results of the second monitoring indicator are calculated, not only the unitized system can be monitored in real time in each unit time, but also the changes in the first monitoring indicator in each unit time can be used to predict the upcoming abnormalities of the unitized system, so that the operation and maintenance personnel can intervene in advance to prevent problems before they happen, improve the predictability of the monitoring alarm of the unitized system, and further improve the immediacy and effectiveness of the monitoring alarm of the unitized system. At the same time, calculating the second monitoring index can analyze the monitoring data of the unitized system from a longer time range, from wider visual monitoring to data anomalies, and realize monitoring of the unitized system from multiple angles.
[0139] In one embodiment, the first monitoring indicator is the average response time, the unit time is 1 hour, and the first monitoring indicator is the month-on-month growth rate of the average response time. The server node obtains the stored average response time of 25 milliseconds 1 hour ago, the average response time of 15 milliseconds 2 hours ago, and the average response time of 14 milliseconds 3 hours ago. Then, the server node calculates the month-on-month growth rate of the average response time 1 hour ago as 66.7%, and the month-on-month growth rate of the average response time 2 hours ago as 7.1% according to the calculation results of each first monitoring indicator stored in each unit time under the unit type, the calculation rules corresponding to the second monitoring indicator and the second monitoring indicator. Then, the server node uses the calculation results of the first monitoring indicator and the calculation results of the second monitoring indicator to form the calculation results of the monitoring indicators under the unit type. Then, for the average response time of the first monitoring indicator, the server node compares each calculation result of the average response time with the threshold value of 30 milliseconds of the average response time. If each calculation result of the average response time is less than the threshold value of the average response time, no alarm action is triggered. At the same time, for the month-on-month growth rate of the average response time of the second monitoring indicator, the server node compares each calculation result of the month-on-month growth rate of the average response time with the threshold value of 30% of the month-on-month growth rate of the average response time. If the calculation result of the month-on-month growth rate of the average response time 2 hours ago is less than the threshold value of the month-on-month growth rate of the average response time, the alarm action is not triggered. If the calculation result of the month-on-month growth rate of the average response time 1 hour ago is greater than the threshold value of the month-on-month growth rate of the average response time, the alarm action is triggered. Then, the server node determines the alarm judgment information corresponding to each monitoring indicator under the unit type according to whether the alarm action is triggered. It can be seen that although the average response time in the past three hours is within the normal range of the monitoring threshold, the increase in the last hour is much larger than that in the past two hours. This abnormal increase is often a precursor to an abnormal program. In this way, by using the first monitoring indicator and the second monitoring indicator at the same time, these abnormalities can be analyzed through a wider range of monitoring, allowing operation and maintenance personnel to intervene in advance to prevent problems before they occur, improve the predictability of monitoring and alarming of the unitized system, and further improve the immediacy and effectiveness of monitoring and alarming of the unitized system.
[0140] In one embodiment, Figure 6 As shown, in the case where the monitoring alarm category is an abnormal cross-unit traffic alarm, the specific process of determining the alarm determination information corresponding to the monitoring alarm category according to the unitized monitoring information, the preset monitoring alarm category and the alarm determination rule corresponding to the monitoring alarm category includes the following steps:
[0141] Step 601, for each transaction in the unitized monitoring information, determine the nodes through which the transaction passes.
[0142] In the embodiment of the present application, for each transaction in the unitized monitoring information, the server node determines the nodes through which the transaction passes according to the transaction information of the transaction. Wherein, a unit of the unitized system includes multiple nodes. The node can be a server node.
[0143] Step 602: For each node, a mapping relationship is established between the timestamp of the node and the node information of the node.
[0144] The node information at least includes the unit type.
[0145] In an embodiment of the present application, the server node determines the timestamp corresponding to each node and the node information corresponding to each node according to the transaction information of the transaction. The node information is the information of the unit of the unitized system. The node information may also include the time consumption. Then, for each node, the server node establishes a mapping relationship between the timestamp of the node and the node information of the node.
[0146] Step 603, sorting the mapping relationships corresponding to each node in chronological order, and determining the node order of the transaction passing through each node according to the sorted mapping relationships.
[0147] In the embodiment of the present application, the server node sorts the mapping relationships corresponding to each node in chronological order. Then, the server node uses the order of each node in the sorted mapping relationship as the node order of the transaction passing through each node.
[0148] Step 604: determine the alarm determination information corresponding to the transaction according to the unit type quantity of the unit type of the node in the node sequence.
[0149] The alarm determination information is used to indicate whether an alarm action is triggered.
[0150] In an embodiment of the present application, the server node pre-sets a category number threshold corresponding to a transaction. The category number threshold may be 3, 4, or 5. For example, the category number threshold may be 5. Then, the server node calculates the number of categories of the unit type in the node sequence based on the unit type corresponding to each node in the node sequence. Then, the server node compares the number of categories corresponding to the node sequence with the category number threshold. If the number of categories corresponding to the node sequence is less than the category number threshold, no alarm action is triggered. If the number of categories corresponding to the node sequence is greater than or equal to the category number threshold, an alarm action is triggered.
[0151] In one example, the server node pre-sets a category number threshold and a shard unit number threshold corresponding to a transaction. The shard unit number threshold may be 2. Then, the server node calculates the category number of the unit type in the node sequence according to the unit type corresponding to each node in the node sequence. Then, the server node compares the category number corresponding to the node sequence with the category number threshold. If the category number corresponding to the node sequence is less than the category number threshold, no alarm action is triggered. If the category number corresponding to the node sequence is greater than or equal to the category number threshold, an alarm action is triggered. At the same time, the server node calculates the number of shard units whose unit type in the node sequence is a shard unit according to the unit type corresponding to each node in the node sequence. Then, the server node compares the shard unit number corresponding to the node sequence with the shard unit number threshold. If the shard unit number corresponding to the node sequence is less than the shard unit number threshold, no alarm action is triggered. If the shard unit number corresponding to the node sequence is greater than or equal to the shard unit number threshold, an alarm action is triggered.
[0152] Then, the server node determines the alarm determination information corresponding to the transaction according to whether the alarm action is triggered, wherein the alarm determination information at least includes whether the alarm action is triggered.
[0153] In one example, the server node uses whether to trigger an alarm action as alarm determination information corresponding to the transaction.
[0154] In another example, while triggering an alarm action, the server node generates a cross-unit abnormal traffic alarm identifier corresponding to the triggered alarm action. The cross-unit abnormal traffic alarm identifier is used to indicate the category of the cross-unit abnormal traffic alarm. The categories of cross-unit abnormal traffic alarms include abnormal number of unit type categories and abnormal number of shard units. Then, the server node determines the cross-unit abnormal information corresponding to the transaction based on the cross-unit abnormal traffic alarm identifier of the transaction. The cross-unit abnormal information includes the cross-unit abnormal traffic alarm identifier. Specifically, the server node can use the cross-unit abnormal traffic alarm identifier of the transaction as the cross-unit abnormal information corresponding to the transaction. Then, the server node uses whether to trigger the alarm action and the cross-unit abnormal information as the alarm judgment information corresponding to the transaction.
[0155] Step 605, the alarm determination information corresponding to each transaction is used to form the alarm determination information corresponding to the cross-unit abnormal traffic alarm.
[0156] In the embodiment of the present application, the server node combines the alarm determination information corresponding to each transaction into the alarm determination information corresponding to the cross-unit abnormal traffic alarm.
[0157] In the above-mentioned traffic observation method, for each transaction in the unitized monitoring information, determine the nodes through which the transaction passes; for each node, establish a mapping relationship between the timestamp of the node and the node information of the node; sort the mapping relationships corresponding to each node in chronological order, and determine the node order through which the transaction passes according to the sorted mapping relationships; determine the alarm determination information corresponding to the transaction according to the number of unit types of the node in the node order; and construct the alarm determination information corresponding to each transaction into the alarm determination information corresponding to the cross-unit abnormal traffic alarm. In this way, by judging whether there is a cross-unit abnormality in the transaction and whether an alarm action is triggered through the number of unit types of the nodes through which a transaction passes, the unitized system can be monitored and analyzed from multiple angles such as whether the traffic distribution in the unit dimension is balanced, the number of units through which the traffic passes, and the direction of the traffic flow, so as to realize the monitoring of the cross-unit abnormal traffic of the unitized system. In addition, by monitoring the data of the unitized system through the number of shard units of a transaction, the possible cross-unit abnormal operation of the unitized system can be discovered in time, and an alarm can be issued, further improving the immediacy of monitoring and alarming of the unitized system.
[0158] In one embodiment, Figure 7 As shown, the alarm mode rules include alarm level determination rules and alarm sending rules; according to the alarm determination information and the preset alarm mode rules, the specific process of sending the alarm information corresponding to the monitoring alarm category includes the following steps:
[0159] Step 701, generating alarm content according to the target alarm template and alarm determination information.
[0160] The alarm content includes the alarm type.
[0161] In an embodiment of the present application, the server node predetermines the target alarm template. In one example, the server node may pre-store a default alarm template. Then, the server node may use the default alarm template as the target alarm template. Among them, the default alarm template may include: alarm time and alarm type. For example, the default alarm template may be at alarm time A, alarm type B, number of transactions involved C, and impact range D. The alarm type is the type of abnormal event that triggers the alarm action. Alarm types may include: intra-unit traffic alarm and cross-unit abnormal traffic alarm. Intra-unit traffic alarms may include abnormal alarms for each monitoring indicator. Cross-unit abnormal traffic alarms may include abnormal alarms for the number of unit type categories and abnormal alarms for the number of shard units.
[0162] Then, the server node determines the alarm time and alarm type according to the alarm determination information. In one example, the server node uses the time when the alarm determination information is generated as the alarm time. At the same time, the server node determines the alarm type according to the monitoring indicator identifier or the cross-unit abnormal traffic alarm identifier included in the alarm determination information. Then, the server node converts the alarm time and alarm type into alarm content according to the target alarm template.
[0163] Step 702: Determine the alarm level corresponding to the alarm content according to the alarm content and the preset alarm level determination rule.
[0164] In the embodiment of the present application, the server node pre-sets the alarm level determination rule. Then, the server node determines the alarm level corresponding to the alarm content according to the alarm content and the alarm level determination rule. Among them, the alarm level determination rule is used to determine the alarm level corresponding to the alarm content. The alarm level indicates the urgency of the alarm.
[0165] In one example, the alarm level determination rule includes a correspondence between the alarm type and the alarm level. Then, the server node determines the alarm level corresponding to the alarm content according to the correspondence between the alarm type and the alarm level and the alarm type in the alarm content.
[0166] In one embodiment, the alarm level corresponding to the alarm type of the abnormal alarm of the second monitoring indicator is the alarm level second only to the emergency alarm. In this way, the operation and maintenance personnel can intervene in advance as soon as possible for the abnormality that is about to occur in the unitized system to prevent it from happening, further improving the predictability of the monitoring alarm of the unitized system, and further improving the immediacy and effectiveness of the monitoring alarm of the unitized system.
[0167] Step 703: Determine and send the alarm information corresponding to the monitoring alarm category according to the preset alarm sending rule, alarm content and alarm level.
[0168] In an embodiment of the present application, the server node pre-sets an alarm sending rule. The alarm sending rule indicates the sending method of the alarm information. Then, the server node forms the alarm information corresponding to the monitoring alarm category with the alarm content and the alarm level. Then, the server node stores the alarm information. In one example, the server node stores the alarm information in an alarm list. At the same time, the server node sends the alarm information according to the alarm sending rule.
[0169] In one example, the server node determines the sending time of the alarm information according to the alarm sending rule and the alarm level of the alarm information. Then, the server node sends the alarm information at the sending time of the alarm information.
[0170] In the above-mentioned traffic observation method, the alarm content is generated according to the target alarm template and the alarm judgment information; the alarm level corresponding to the alarm content is determined according to the alarm content and the preset alarm level judgment rules; the alarm information corresponding to the monitoring alarm category is determined and sent according to the preset alarm sending rules, alarm content and alarm level. In this way, by sending alarm information carrying the alarm type and alarm level, the staff can promptly determine the fault of the unitized system according to the alarm type, and reasonably arrange the handling time of the fault of the unitized system according to the alarm level, thereby improving the accuracy and effectiveness of the monitoring alarm of the unitized system.
[0171] In one embodiment, Figure 8 As shown, according to the preset alarm sending rules, alarm content and alarm level, the specific process of determining and sending the alarm information corresponding to the monitoring alarm category includes the following steps:
[0172] Step 801: Determine whether the alarm type exists in the alarm types corresponding to the alarm information that have been sent.
[0173] In an embodiment of the present application, the server node obtains each sent alarm information. In one example, the server node obtains each sent alarm information from an alarm list. Then, the server node compares the alarm type with the alarm types corresponding to each sent alarm information in turn, and determines whether the alarm type exists in the alarm types corresponding to each sent alarm information.
[0174] Step 802: If the alarm type exists in the alarm types corresponding to the alarm information that have been sent, the alarm number of the alarm type is updated.
[0175] In an embodiment of the present application, if the alarm type exists in the alarm types corresponding to the alarm information that has been sent, the server node adds 1 to the alarm number of the alarm type to complete the update of the alarm number of the alarm type.
[0176] Step 803: determine the alarm information corresponding to the monitoring alarm category according to the alarm content, alarm level and the number of alarms of the alarm type within a preset scanning time, and send the alarm information.
[0177] In an embodiment of the present application, the server node pre-sets a scanning time. The scanning time is a period of time. For example, the scanning time can be 5 minutes. Then, the server node counts the number of alarms of the alarm type within the preset scanning time. Then, the server node forms the alarm information corresponding to the monitoring alarm category with the alarm content, the alarm level and the number of alarms of the alarm type within the preset scanning time. Then, the server node stores the alarm information. In one example, the server node stores the alarm information in an alarm list. At the same time, the server node sends the alarm information according to the alarm sending rule.
[0178] In one embodiment, the alarm information corresponding to the monitoring alarm category is "node switching has occurred E times in the past five minutes, please handle it."
[0179] In the above-mentioned traffic observation method, it is determined whether the alarm type exists in the alarm types corresponding to the alarm information that have been sent; if the alarm type exists in the alarm types corresponding to the alarm information that have been sent, the alarm number of the alarm type is updated; according to the alarm content, the alarm level and the alarm number of the alarm type within the preset scanning time, the alarm information corresponding to the monitoring alarm category is determined, and the alarm information is sent. In this way, by compressing the alarm information of the same alarm type, a large number of repeated alarm information is not directly sent, but a large number of repeated alarm information is compressed into one and sent to the operation and maintenance personnel, which reduces the occurrence of alarm information tsunamis caused by frequent alarms after the abnormality of the unitized system occurs, allowing the operation and maintenance personnel to focus on useful alarm information and prevent being overwhelmed by a large amount of information, thereby improving the simplicity of the monitoring alarm of the unitized system and further improving the accuracy and effectiveness of the monitoring alarm of the unitized system.
[0180] In one embodiment, Fig. 9 As shown, the monitoring alarm method also includes the following steps:
[0181] Step 901, check whether there is a personalized alarm template.
[0182] In an embodiment of the present application, the server node checks whether there is a personalized alarm template. Specifically, the server node checks whether an identifier of a personalized alarm template is set. The personalized alarm template is an alarm template that is a non-default alarm template set by the user through the front-end interface.
[0183] Step 902: If there is a personalized alarm template, check whether the personalized alarm template meets the preset alarm template conditions.
[0184] In an embodiment of the present application, the server node pre-sets an alarm template condition. Among them, the alarm template condition is used to measure whether the alarm template is qualified. The alarm template condition may include the length of the alarm content and whether the alarm content contains illegal characters. For example, the alarm template condition may be whether the length of the alarm content is less than 1000 words and whether the alarm content of the numeric type contains illegal characters. In the case of a personalized alarm template, the server node checks whether the personalized alarm template meets the alarm template condition.
[0185] In the absence of a personalized alarm template, the server node uses the default alarm template as the target alarm template.
[0186] Step 903: When the personalized alarm template meets the preset alarm template conditions, the personalized alarm template is used as the target alarm template.
[0187] In the embodiment of the present application, when the personalized alarm template meets the preset alarm template conditions, the server node uses the personalized alarm template as the target alarm template.
[0188] When the personalized alarm template does not meet the preset alarm template conditions, the server node will use the default alarm template as the target alarm template.
[0189] In the above-mentioned traffic observation method, it is checked whether there is a personalized alarm template; if there is a personalized alarm template, it is checked whether the personalized alarm template meets the preset alarm template conditions; if the personalized alarm template meets the preset alarm template conditions, the personalized alarm template is used as the target alarm template. In this way, if there is a personalized alarm template, the personalized alarm template is checked, and the personalized alarm template that passes the check is used as the target alarm template, thereby improving the personalization of the monitoring alarm of the unitized system.
[0190] In one embodiment, Fig.10 As shown, according to the alarm determination information and the preset alarm mode rules, the specific process of sending the alarm information corresponding to the monitoring alarm category includes the following steps:
[0191] Step 1001: for each transaction, check whether the alarm information interface of the alarm determination information corresponding to the transaction is closed.
[0192] In the embodiment of the present application, the server node pre-provides an alarm information interface for the alarm determination information corresponding to each transaction. The alarm information interface is used for the user to turn on or off the alarm information corresponding to the alarm information interface. Then, for each transaction, the server node checks whether the alarm information interface of the alarm determination information corresponding to the transaction is closed.
[0193] Step 1002: If the alarm information interface is not closed, the alarm information corresponding to the transaction is sent according to the alarm determination information corresponding to the transaction and the preset alarm method rule.
[0194] In an embodiment of the present application, if the alarm information interface is not closed, the server node sends the alarm information corresponding to the transaction according to the alarm determination information corresponding to the transaction and the preset alarm method rules.
[0195] If the alarm information interface is closed, the server node will not send the alarm information corresponding to the transaction according to the preset alarm method rules.
[0196] In the above-mentioned traffic observation method, for each transaction, check whether the alarm information interface of the alarm judgment information corresponding to the transaction is closed; if the alarm information interface is not closed, the alarm information corresponding to the transaction is sent according to the alarm judgment information corresponding to the transaction and the preset alarm method rules. In some scenarios, the unitized system may cross units. For example, if a service in the unit is unavailable, the service of the backup unit takes over the transaction. At this time, the transaction will be forwarded to the backup unit. At this time, it is normal for a transaction to pass through two shard units. In this way, an alarm information interface is provided. When a cross-unit scenario occurs after switching, the operation and maintenance personnel can call the alarm information interface to turn off the alarm information. In addition, before sending the alarm information subsequently, the switch of the alarm information interface is detected to determine whether to send the alarm information. This can be combined with the actual situation of the unitized system to avoid repeated sending of erroneous alarm information, improve the mobility of monitoring and alarming of the unitized system, and further improve the accuracy and effectiveness of monitoring and alarming of the unitized system.
[0197] In one embodiment, Fig.11 As shown, the monitoring alarm method also includes the following steps:
[0198] Step 1101: Receive a switching alarm instruction sent by a modular system.
[0199] The switching alarm instruction includes switching alarm information. The switching alarm information is alarm information generated by the unitized system according to the node switching situation of the unitized system.
[0200] In the embodiment of the present application, the server node receives a switching alarm instruction sent by the unitized system. The switching alarm instruction is used to instruct the server node to issue a switching alarm for the unitized system. The switching alarm information indicates the switching status of the unitized system.
[0201] The modular system is a distributed service. When the services in the modular system are abnormal or unavailable, the modular system automatically identifies the currently available nodes and forwards the transactions to the available nodes for processing. At this time, the service operation state of the modular system is switched. Then, the modular system generates a switching alarm message based on the forwarding situation. For example, the transaction was originally conducted on machine X, but machine X failed due to other reasons such as machine performance, and the transaction can no longer be conducted. In this case, the modular system will forward the subsequent access transactions to machine Y, and the switching alarm message will be "X failure occurred at time Z and switched to Y". Then, the modular system sends a switching alarm instruction carrying the switching alarm information.
[0202] Step 1102, in response to the switching alarm instruction, sending alarm information according to the switching alarm information and the preset alarm mode rule.
[0203] In the embodiment of the present application, the server node generates alarm information in response to the switching alarm instruction according to the switching alarm information and the preset alarm mode rule. Then, the server node sends the alarm information according to the alarm mode rule.
[0204] In the above-mentioned traffic observation method, a switching alarm instruction sent by the unitized system is received; in response to the switching alarm instruction, an alarm message is sent according to the switching alarm information and the preset alarm method rules. In this way, by providing an interface, when an alarm is generated in the running state of the distributed service, the generated switching alarm information is notified to the server node by calling the interface, and the server node completes the alarm, thereby realizing the distributed traffic switching alarm monitored by the unitized system, and improving the diversity of monitoring alarms for the unitized system. In addition, since the unitized system is a distributed service, there are a large number of service nodes, and they are deployed in cloud containers. When the network layer jitter is unavailable, there are a large number of node switching scenarios. For example, thousands of switches may occur within 5 minutes. If thousands of alarm messages are sent directly, it will cause a great burden on the operation and maintenance personnel, and repeated similar alarms will cause the operation and maintenance personnel to ignore other useful alarms. If alarm compression is performed on alarm information of the same alarm type, instead of directly sending a large number of repeated alarm information, a large number of repeated alarm information are compressed into one and sent to the operation and maintenance personnel. This can reduce the occurrence of alarm information tsunamis caused by frequent alarms after an abnormality occurs in the unitized system, allow the operation and maintenance personnel to focus on useful alarm information, prevent being overwhelmed by a large amount of information, improve the simplicity of monitoring alarms for the unitized system, and further improve the accuracy and effectiveness of monitoring alarms for the unitized system.
[0205] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0206] Based on the same inventive concept, the embodiment of the present application also provides a monitoring alarm device for implementing the monitoring alarm method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more monitoring alarm device embodiments provided below can refer to the limitations of the monitoring alarm method above, and will not be repeated here.
[0207] In one embodiment, Fig.12 As shown, a monitoring alarm device 1200 is provided, including: an acquisition module 1210, a first determination module 1220 and a first sending module 1230, wherein:
[0208] The acquisition module 1210 is used to acquire the stored unitized monitoring information based on a preset data acquisition rule; the unitized monitoring information includes unitized metadata and monitoring data corresponding to the unitized metadata; the unitized metadata indicates the unit type of the unit in the unitized system;
[0209] A first determination module 1220, configured to determine the alarm determination information corresponding to the monitoring alarm category according to the unitized monitoring information, the preset monitoring alarm category and the alarm determination rule corresponding to the monitoring alarm category;
[0210] The first sending module 1230 is used to send the alarm information corresponding to the monitoring alarm category according to the alarm determination information and the preset alarm mode rule; the alarm information is used to monitor the unitized system.
[0211] Optionally, when the monitoring alarm category is an intra-unit flow alarm, the first determining module 1220 is specifically configured to:
[0212] Classifying the unitized monitoring information according to unit types, and determining the unitized monitoring information corresponding to each unit type;
[0213] For each unit type, according to the unitized monitoring information corresponding to the unit type and the preset monitoring indicators, the calculation results of the monitoring indicators under the unit type are calculated;
[0214] For each monitoring indicator, according to the calculation result of the monitoring indicator, determine the alarm determination information corresponding to the monitoring indicator under the unit type; the alarm determination information is used to indicate whether to trigger an alarm action;
[0215] The alarm determination information corresponding to each of the monitoring indicators under each of the unit types constitutes the alarm determination information corresponding to the flow alarm within the unit.
[0216] Optionally, the first determining module 1220 is specifically configured to:
[0217] According to the unitized monitoring information corresponding to the unit type and the preset first monitoring indicator, calculate and store the calculation results of each first monitoring indicator under the unit type within a unit time;
[0218] Calculate the calculation results of each second monitoring indicator according to the stored calculation results of each first monitoring indicator under the unit type in each unit time and the preset second monitoring indicator; the second monitoring indicator includes the year-on-year increase of the first monitoring indicator and the month-on-month increase of the first monitoring indicator;
[0219] The calculation results of each of the first monitoring indicators and the calculation results of each of the second monitoring indicators constitute the calculation results of each of the monitoring indicators under the unit type.
[0220] Optionally, when the monitoring alarm category is an inter-unit abnormal traffic alarm, the first determining module 1220 is specifically configured to:
[0221] For each transaction in the unitized monitoring information, determining each node through which the transaction passes;
[0222] For each node, a mapping relationship is established between the timestamp of the node and the node information of the node; the node information at least includes a unit type;
[0223] Sorting the mapping relationships corresponding to the nodes in chronological order, and determining the node order of the transaction passing through the nodes according to the sorted mapping relationships;
[0224] Determining alarm determination information corresponding to the transaction according to the number of unit types of the unit types of the nodes in the node sequence; the alarm determination information is used to indicate whether an alarm action is triggered;
[0225] The alarm determination information corresponding to each of the transactions is used to constitute the alarm determination information corresponding to the cross-unit abnormal traffic alarm.
[0226] Optionally, the alarm mode rule includes an alarm level determination rule and an alarm sending rule; the first sending module 1230 is specifically used to:
[0227] Generate alarm content according to the target alarm template and the alarm determination information; the alarm content includes the alarm type;
[0228] Determine the alarm level corresponding to the alarm content according to the alarm content and the preset alarm level determination rule;
[0229] According to the preset alarm sending rules, the alarm content and the alarm level, the alarm information corresponding to the monitoring alarm category is determined and sent.
[0230] Optionally, the first sending module 1230 is specifically configured to:
[0231] Determine whether the alarm type exists in the alarm types corresponding to the alarm information that have been sent;
[0232] If the alarm type exists in the alarm types corresponding to the alarm information that has been sent, updating the alarm number of the alarm type;
[0233] According to the alarm content, the alarm level and the number of alarms of the alarm type within a preset scanning time, the alarm information corresponding to the monitoring alarm category is determined, and the alarm information is sent.
[0234] Optionally, the device 1200 further includes:
[0235] The first checking module is used to check whether there is a personalized alarm template;
[0236] A second checking module is used to check whether the personalized alarm template meets the preset alarm template condition when the personalized alarm template exists;
[0237] The second determining module is used to use the personalized alarm template as a target alarm template if the personalized alarm template meets a preset alarm template condition.
[0238] Optionally, the first sending module 1230 is specifically configured to:
[0239] For each transaction, check whether the alarm information interface of the alarm determination information corresponding to the transaction is closed;
[0240] If the alarm information interface is not closed, the alarm information corresponding to the transaction is sent according to the alarm determination information corresponding to the transaction and the preset alarm mode rule.
[0241] Optionally, the device 1200 further includes:
[0242] A receiving module, configured to receive a switching alarm instruction sent by a modular system; the switching alarm instruction includes switching alarm information; the switching alarm information is alarm information generated by the modular system according to a node switching situation of the modular system;
[0243] The second sending module is used to respond to the switching alarm instruction and send alarm information according to the switching alarm information and a preset alarm mode rule.
[0244] Each module in the above monitoring alarm device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0245] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.13 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a monitoring alarm method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0246] Those skilled in the art will understand that Fig.13 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0247] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0248] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0249] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0250] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0251] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0252] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0253] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A monitoring and alarm method, It is characterized in that The method comprises: Based on a preset data acquisition rule, the stored unitized monitoring information is acquired; the unitized monitoring information includes unitized metadata and monitoring data corresponding to the unitized metadata; the unitized metadata indicates a unit type of a unit in the unitized system; Determine the alarm determination information corresponding to the monitoring alarm category according to the unitized monitoring information, the preset monitoring alarm category and the alarm determination rule corresponding to the monitoring alarm category; According to the alarm determination information and the preset alarm mode rules, the alarm information corresponding to the monitoring alarm category is sent; the alarm information is used to monitor the unitized system for alarm; Among them, in the case where the monitoring alarm category is an inter-unit abnormal traffic alarm, the alarm judgment information corresponding to the monitoring alarm category is determined according to the unitized monitoring information, the preset monitoring alarm category and the alarm judgment rule corresponding to the monitoring alarm category, including: for each transaction in the unitized monitoring information, determining the nodes through which the transaction passes; for each node, establishing a mapping relationship between the timestamp of the node and the node information of the node; the node information at least includes a unit type; sorting the mapping relationships corresponding to the nodes in chronological order, and determining the node sequence of the transactions passing through the nodes according to the sorted mapping relationships; if the number of categories of the unit type of the node in the node sequence is greater than or equal to the preset category number threshold, or the number of shard units whose unit type is a shard unit in the node sequence is greater than or equal to the preset shard unit number threshold, then an alarm action is triggered; according to whether the alarm action is triggered, determining the alarm judgment information corresponding to the transaction; the alarm judgment information corresponding to each of the transactions constitutes the alarm judgment information corresponding to the inter-unit abnormal traffic alarm.
2. The method according to claim 1, It is characterized in that In the case where the monitoring alarm category is an intra-unit traffic alarm, the determining the alarm determination information corresponding to the monitoring alarm category according to the unitized monitoring information, the preset monitoring alarm category and the alarm determination rule corresponding to the monitoring alarm category includes: Classifying the unitized monitoring information according to unit types, and determining the unitized monitoring information corresponding to each unit type; For each unit type, according to the unitized monitoring information corresponding to the unit type and the preset monitoring indicators, the calculation results of the monitoring indicators under the unit type are calculated; For each monitoring indicator, according to the calculation result of the monitoring indicator, determine the alarm determination information corresponding to the monitoring indicator under the unit type; the alarm determination information is used to indicate whether to trigger an alarm action; The alarm determination information corresponding to each of the monitoring indicators under each of the unit types constitutes the alarm determination information corresponding to the flow alarm within the unit.
3. The method according to claim 2, It is characterized in that The calculation result of each monitoring indicator under the unit type is calculated according to the unitized monitoring information corresponding to the unit type and the preset monitoring indicator, including: Calculate and store, according to the unitized monitoring information corresponding to the unit type and the preset first monitoring indicator, the calculation results of each of the first monitoring indicators under the unit type within a unit time; Calculate the calculation results of each second monitoring indicator according to the stored calculation results of each first monitoring indicator under the unit type in each unit time and the preset second monitoring indicator; the second monitoring indicator includes the year-on-year increase of the first monitoring indicator and the month-on-month increase of the first monitoring indicator; The calculation results of each of the first monitoring indicators and the calculation results of each of the second monitoring indicators constitute the calculation results of each of the monitoring indicators under the unit type.
4. The method according to claim 1, It is characterized in that The alarm mode rule includes an alarm level determination rule and an alarm sending rule; the sending of the alarm information corresponding to the monitoring alarm category according to the alarm determination information and the preset alarm mode rule includes: Generate alarm content according to the target alarm template and the alarm determination information; the alarm content includes the alarm type; Determine the alarm level corresponding to the alarm content according to the alarm content and the preset alarm level determination rule; According to the preset alarm sending rules, the alarm content and the alarm level, the alarm information corresponding to the monitoring alarm category is determined and sent.
5. The method according to claim 4, It is characterized in that The determining and sending the alarm information corresponding to the monitoring alarm category according to the preset alarm sending rule, the alarm content and the alarm level includes: Determine whether the alarm type exists in the alarm types corresponding to the alarm information that have been sent; If the alarm type exists in the alarm types corresponding to the alarm information that has been sent, updating the alarm number of the alarm type; According to the alarm content, the alarm level and the number of alarms of the alarm type within a preset scanning time, the alarm information corresponding to the monitoring alarm category is determined, and the alarm information is sent.
6. The method according to claim 4, It is characterized in that The method further comprises: Check whether there is a personalized alarm template; In the case where the personalized alarm template exists, checking whether the personalized alarm template meets the preset alarm template condition; In the case where the personalized alarm template meets the preset alarm template condition, the personalized alarm template is used as the target alarm template.
7. The method according to claim 1, It is characterized in that The sending of the alarm information corresponding to the monitoring alarm category according to the alarm determination information and the preset alarm mode rule includes: For each transaction, check whether the alarm information interface of the alarm determination information corresponding to the transaction is closed; If the alarm information interface is not closed, the alarm information corresponding to the transaction is sent according to the alarm determination information corresponding to the transaction and the preset alarm mode rule.
8. The method according to claim 1, It is characterized in that The method further comprises: Receiving a switching alarm instruction sent by the modular system; the switching alarm instruction includes switching alarm information; the switching alarm information is alarm information generated by the modular system according to the node switching situation of the modular system; In response to the switching alarm instruction, an alarm message is sent according to the switching alarm message and a preset alarm mode rule.
9. A monitoring and alarm device, It is characterized in that The device comprises: An acquisition module, configured to acquire stored unitized monitoring information based on a preset data acquisition rule; the unitized monitoring information includes unitized metadata and monitoring data corresponding to the unitized metadata; the unitized metadata indicates a unit type of a unit in the unitized system; A first determination module, configured to determine the alarm determination information corresponding to the monitoring alarm category according to the unitized monitoring information, the preset monitoring alarm category and the alarm determination rule corresponding to the monitoring alarm category; A first sending module, used for sending the alarm information corresponding to the monitoring alarm category according to the alarm determination information and the preset alarm mode rule; the alarm information is used for monitoring and alarming the unitized system; Among them, when the monitoring alarm category is an inter-unit abnormal traffic alarm, the first determination module is specifically used to: for each transaction in the unitized monitoring information, determine the nodes through which the transaction passes; for each node, establish a mapping relationship between the timestamp of the node and the node information of the node; the node information at least includes a unit type; sort the mapping relationships corresponding to the nodes in chronological order, and determine the node order of the transactions passing through the nodes based on the sorted mapping relationships; if the number of categories of the unit type of the nodes in the node sequence is greater than or equal to the preset category number threshold, or the number of shard units whose unit type is a shard unit in the node sequence is greater than or equal to the preset shard unit number threshold, then trigger an alarm action; determine the alarm judgment information corresponding to the transaction based on whether the alarm action is triggered; and use the alarm judgment information corresponding to each of the transactions to constitute the alarm judgment information corresponding to the inter-unit abnormal traffic alarm.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
