Alarm method, device and equipment of micro-service system and medium

By obtaining the call chain and identifying the connection relationship within the node group in the microservice system, aggregated alarm information is generated, which solves the problem of redundant alarms in the microservice system and improves the alarm troubleshooting efficiency of operation and maintenance personnel.

CN118748637APending Publication Date: 2024-10-08QINGDAO HISENSE TRANS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410920320.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-10-08

AI Technical Summary

Technical Problem

The dependencies between different services in the microservice system are complex, causing one exception to trigger multiple alarms. The existing technology ignores the relationship between system data when deduplicating and aggregating alarms, resulting in too much redundant alarm information and interfering with operation and maintenance personnel. investigation work.

Method used

By obtaining the call chain within the preset period, the alarm information is determined based on the node information, and the aggregated alarm information is generated based on the connection relationship within the node group, and the root cause topological relationship between the alarm information is identified to reduce the generation of redundant alarm information.

Benefits of technology

It effectively reduces the generation of redundant alarm information, improves the alarm troubleshooting efficiency of operation and maintenance personnel, and helps operation and maintenance personnel quickly find the cause of alarm information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118748637A_ABST
    Figure CN118748637A_ABST
Patent Text Reader

Abstract

The invention discloses an alarm method and device for a micro-service system, equipment and a medium, and the method comprises the steps: obtaining a call chain generated in a preset time period, and determining the first alarm information of the call chain according to the node information of each node in the call chain; and associating the first alarm information with the node group corresponding to the call chain of the detected first alarm information. And determining a first root cause topological relation between the first alarm information associated with the node group according to the connection relation of each node in the node group in the call chain, and generating aggregation alarm information corresponding to the node group based on the first root cause topological relation. Through the process, the first alarm information generated by the call chain containing the same node group is aggregated, the root cause topological relation between the alarm information is determined according to the connection relation of the nodes in the call chain, and the corresponding aggregated alarm information is generated, so that the generation of redundant alarm information is reduced, and the alarm troubleshooting efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an alarm method, device, equipment and medium for a microservice system. Background Art

[0002] Microservice systems have many advantages such as flexibility and scalability. More and more companies tend to use microservice system architecture. With the popularization of microservice systems, the number of applications carried in the system is increasing. In order to prevent failures and ensure the normal operation of the system, in actual applications, system data will be monitored based on pre-set alarm indicators (such as service request failure, request response timeout, etc.) to inform operation and maintenance personnel to conduct timely investigation when system data triggers an alarm.

[0003] Before submitting alarm information to operation and maintenance personnel, the alarms generated by the system are often deduplicated and aggregated to reduce the amount of troubleshooting by operation and maintenance personnel. In order to avoid missing information, the current processing method is to deduplicate the alarms that trigger the same or similar alarms. However, the dependencies between different services in the microservice system architecture are complex, and one abnormality often triggers multiple alarms. The above processing method often generates a large amount of redundant alarm information with the same alarm root cause, which greatly interferes with the alarm troubleshooting work of operation and maintenance personnel. Summary of the invention

[0004] The embodiment of the present application provides an alarm method, device, equipment and medium for a microservice system, which are used to reduce the generation of redundant alarm information and improve the efficiency of alarm investigation.

[0005] To achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides an alarm method for a microservice system, comprising:

[0007] In response to the alarm indication, acquiring a call chain generated within a preset time period; each call chain includes a plurality of connected nodes, and the nodes represent system operations triggered by the call chain;

[0008] Performing alarm detection on node information of each node in the call chain to obtain first alarm information generated by the call chain; the node information represents the execution environment and execution status of the corresponding node;

[0009] Associating the first alarm information with a node group corresponding to a call chain in which the first alarm information is detected; the node group corresponding to the call chain is composed of nodes in the call chain;

[0010] Determining a first root cause topological relationship between first alarm information associated with the node group according to a connection relationship between nodes in the node group in the call chain;

[0011] Based on the first root cause topological relationship, aggregated alarm information of the node group is generated.

[0012] In some embodiments, performing alarm detection on node information of each node in the call chain to obtain first alarm information of the call chain includes:

[0013] For each node in the call chain, determining whether the execution status of the node triggers a preset first-class alarm;

[0014] If the first type of alarm is triggered, first alarm information representing the first alarm generated by the node is determined according to the alarm triggering cause of the node.

[0015] In some embodiments, the method further comprises:

[0016] Performing alarm detection on the object to be detected within the preset time period to obtain the target object that triggers the preset second type of alarm;

[0017] According to the alarm triggering cause of the target object, second alarm information triggered by the target object is determined.

[0018] In some embodiments, the generating the aggregated alarm information of the node group based on the first root cause topological relationship includes:

[0019] Determining, from the second alarm information, target information causing the node group to trigger an alarm;

[0020] According to the target object of the target information, the first root cause topological relationship of the node group is expanded to obtain a second root cause topological relationship;

[0021] Based on the second root cause topological relationship, aggregated alarm information of the node group is generated.

[0022] In some embodiments, determining the first root cause topological relationship between the first alarm information associated with the node group according to the connection relationship between the nodes in the node group in the call chain includes:

[0023] Determine an abnormal node in the node group according to the first alarm information associated with the node group; the abnormal node is a node that generates the first alarm information;

[0024] According to the sorting order of each abnormal node in the node group, the root cause of the alarm triggered by each abnormal node is determined; the sorting order of each node in the node group is determined according to the connection relationship of each node in the corresponding call chain of the node group; among any two abnormal nodes with adjacent sorting, the abnormal node with the former sorting is the root cause of the alarm that causes the abnormal node with the latter sorting to trigger the alarm;

[0025] According to the alarm root cause of each abnormal node triggering the alarm, the first alarm information associated with the node group is aggregated to obtain the first root cause topological relationship.

[0026] In some embodiments, the object to be tested includes a host and a service; and determining, from the second alarm information, target information causing the node group to trigger an alarm includes:

[0027] Determine the host identifier and service identifier of the target node in the execution environment according to the node information of the target node in the node group; the target node is the abnormal node ranked first in the node group;

[0028] The target object carries the host identifier of the target node, or carries the second alarm information of the service identifier of the target node, as the target information.

[0029] In some embodiments, the expanding the first root topological relationship of the node group according to the target object of the target information includes:

[0030] If the target information of the node group includes first information that the target object is a service, or second information that the target object is a host, determining the alarm root cause of the target node of the node group triggering the alarm according to the alarm triggering cause of the target object in the target information;

[0031] The first root cause topological relationship is expanded according to the alarm root cause of the target node to obtain the second root cause topological relationship.

[0032] In some embodiments, the expanding the first root topological relationship of the node group according to the target object of the target information includes:

[0033] If the target information of the node group includes first information that the target object is a service, and second information that the target object is a host, determining the alarm root cause of the target node of the node group triggering the alarm according to the alarm triggering cause of the target object of the first information;

[0034] Determining the root cause of the alarm triggered by the target object of the first information according to the alarm triggering cause of the target object of the second information;

[0035] According to the alarm root cause of the target node and the alarm root cause of the target object of the first information triggering the alarm, the first root cause topological relationship is expanded to obtain the second root cause topological relationship.

[0036] In a second aspect, an embodiment of the present application further provides an alarm device for a microservice system, including:

[0037] The data acquisition unit is configured to: in response to the alarm indication, acquire the call chains generated within a preset period; each call chain includes a plurality of connected nodes, and the nodes represent the system operation triggered by the call chain;

[0038] The information confirmation unit is configured to: perform alarm detection on the node information of each node in the call chain to obtain the first alarm information generated by the call chain; the node information represents the execution environment and execution status of the corresponding node;

[0039] The information processing unit is configured to: associate the first alarm information with a node group corresponding to a call chain in which the first alarm information is detected; the node group corresponding to the call chain is composed of nodes in the call chain;

[0040] A root cause topology unit is configured to: determine a first root cause topology relationship between first alarm information associated with the node group according to a connection relationship between nodes in the node group in a call chain;

[0041] The aggregate alarm unit is configured to generate aggregate alarm information of the node group based on the first root cause topological relationship.

[0042] In a third aspect, an embodiment of the present application further provides an electronic device, including a data transmission unit and a processor:

[0043] The data transmission unit is configured to: receive an alarm indication;

[0044] The processor is configured to: in response to an alarm indication, obtain a call chain generated within a preset period; each call chain includes a plurality of connected nodes, and the nodes represent system operations triggered by the call chain;

[0045] Performing alarm detection on node information of each node in the call chain to obtain first alarm information generated by the call chain; the node information represents the execution environment and execution status of the corresponding node;

[0046] Associating the first alarm information with a node group corresponding to a call chain in which the first alarm information is detected; the node group corresponding to the call chain is composed of nodes in the call chain;

[0047] Determining a first root cause topological relationship between first alarm information associated with the node group according to a connection relationship between nodes in the node group in the call chain;

[0048] Based on the first root cause topological relationship, aggregated alarm information of the node group is generated.

[0049] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes any one of the methods described in the first aspect.

[0050] In a fifth aspect, an embodiment of the present application further provides a computer program product, comprising: a computer program code, which, when executed on a computer, enables the computer to execute any one of the methods described in the first aspect.

[0051] In an embodiment of the present application, in response to an alarm indication, a call chain generated within a preset period of time is obtained to determine the first alarm information of the call chain according to the node information of each node in the call chain. Then, the first alarm information is associated with the node group corresponding to the call chain in which the first alarm information is detected, and the first root cause topological relationship between the first alarm information associated with the node group is determined according to the connection relationship between each node in the node group in the call chain, and then based on the first root cause topological relationship, the aggregate alarm information corresponding to the node group is generated. The above process aggregates the first alarm information generated by the call chain containing the same node group to determine the root cause topological relationship between the first alarm information associated with the node group according to the connection relationship of the nodes in the group, and generates the corresponding aggregate alarm information based on the root cause topological relationship, thereby reducing the generation of redundant alarm information. In addition, the aggregate alarm information obtained thereby indicates the root cause topological relationship between the first alarm information, which facilitates the operation and maintenance personnel to find the cause of the first alarm information in a timely manner, and can effectively improve the alarm troubleshooting efficiency of the operation and maintenance personnel.

[0052] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0054] Figure 1 A schematic diagram of alarm deduplication provided in an embodiment of the present application;

[0055] Figure 2 A schematic diagram of a hot song search process provided in an embodiment of the present application;

[0056] Figure 3 An overall flow chart of an alarm method for a microservice system provided in an embodiment of the present application;

[0057] Figure 4 A schematic diagram of node information of each node in a call chain provided in an embodiment of the present application;

[0058] Figure 5 A schematic diagram of generating the first alarm information provided in an embodiment of the present application;

[0059] Figure 6 A schematic diagram of a process for associating first alarm information with a node group provided in an embodiment of the present application;

[0060] Figure 7 A schematic diagram of the root cause of an alarm of a node provided in an embodiment of the present application;

[0061] Figure 8 A schematic diagram of a process for determining target information through node information provided in an embodiment of the present application;

[0062] Fig. 9 A schematic diagram of the expanded second root topology relationship provided in an embodiment of the present application;

[0063] Fig.10 Another schematic diagram of the expanded second root topology relationship provided in an embodiment of the present application;

[0064] Fig.11 A structural diagram of an alarm device for a microservice system provided in an embodiment of the present application;

[0065] Fig.12 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0067] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0068] To facilitate understanding of the technical solution of this application, the following is an expanded description of the background technology:

[0069] As mentioned above, in order to prevent failures, in actual applications, system data is monitored based on pre-set alarm indicators, so that when system data triggers an alarm, the operation and maintenance personnel can be notified to conduct timely investigation. Before submitting alarm information to the operation and maintenance personnel, the alarms generated by the system are often deduplicated and aggregated to reduce the amount of investigation required by the operation and maintenance personnel.

[0070] Take the example of a user browsing the hot song rankings to explain. When a user applies for the traffic hot song rankings, he needs to send a hot song search request to the back-end song service A through the front-end page. After receiving the request route, song service A runs the preset query method B. Through query method B, it executes a hot song ranking query to database service C. Database service C executes the SQL statement for the hot song query and returns the query result to the front-end page.

[0071] For example Figure 1 As shown in the figure, it is assumed that the client has executed 10 search operations to browse the hot song rankings on the front-end page within a period of time. During this period, 6 alarms were generated, of which 3 were response timeouts of song service A, 2 were call failures of database service C, and 1 was response timeout of database service C. In order to avoid missing information, the current processing method is to deduplicate the alarms that trigger the same or similar alarms. For example, the above 6 alarms are deduplicated to obtain three alarm messages: response timeout of song service A, call failure of database service C, and response timeout of database service C.

[0072] However, the dependencies between different services in the microservice system architecture are complex, and one exception often triggers multiple alarms. If the above method is used to simply deduplicate the alarms that trigger the same or similar alarms, a large number of redundant alarm information with the same alarm root cause will be generated. The current alarm method ignores the relationship between the system data that triggers the alarm, and simply displays all the triggered alarms without duplication.

[0073] For example Figure 2As shown in the figure, in the aforementioned hot song query process, the call of database service C is implemented based on the preset query method B running by song service A, which means that most of the abnormalities of database service C are caused by problems in the call of song service A. That is, the root cause of the call failure alarm and response timeout alarm of database service C is the response timeout of song service A.

[0074] If only the same or similar alarms are deduplicated, at least three alarm messages need to be generated, such as the response timeout of song service A, the call failure of database service C, and the response timeout of database service C. Obviously, this method ignores the relationship between the system data that triggers the alarm, and requires the operation and maintenance personnel to check the system data that generates these alarm messages one by one, which greatly interferes with the alarm troubleshooting work of the operation and maintenance personnel.

[0075] To solve the above problems, the invention of the present application is conceived as follows: by obtaining the call chain generated within a preset period of time, the first alarm information of the call chain is determined according to the node information of each node in the call chain. Then, the first alarm information is associated with the node group corresponding to the call chain in which the first alarm information is detected, and the first root cause topological relationship between the first alarm information associated with the node group is determined according to the connection relationship between the nodes in the node group in the call chain, and then based on the first root cause topological relationship, the aggregate alarm information corresponding to the node group is generated. The above process aggregates the first alarm information generated by the call chain containing the same node group, so as to determine the root cause topological relationship between the first alarm information associated with the node group according to the connection relationship of the nodes in the group, and generate the corresponding aggregate alarm information based on the root cause topological relationship, thereby reducing the generation of redundant alarm information. In addition, the aggregate alarm information thus obtained indicates the root cause topological relationship between the first alarm information, which is convenient for the operation and maintenance personnel to find the cause of the first alarm information in time, and can effectively improve the alarm troubleshooting efficiency of the operation and maintenance personnel.

[0076] The following Figure 3 As shown, Figure 3 The overall process of an alarm method for a microservice system provided in an embodiment of the present application is shown, including the following steps:

[0077] Step 301: in response to an alarm indication, obtaining a call chain generated within a preset period; each call chain includes a plurality of connected nodes, and the nodes represent system operations triggered by the call chain;

[0078] Step 302: Perform alarm detection on node information of each node in the call chain to obtain first alarm information generated by the call chain; the node information represents the execution environment and execution status of the corresponding node;

[0079] The call chain refers to the process of logging the call information (time, interface, level, and result) between services during a business call, and then chaining all the node data in the order of the call. Each node in the call chain represents a system operation, such as a function call or a database query.

[0080] Taking the above-mentioned user browsing the hot song ranking as an example, this behavior will generate a corresponding call chain, which can be as follows Figure 4 As shown, it includes node 1 representing that the client sends a hot song search request through the front-end page, node 2 representing that the song service A is called based on the search request, node 3 representing that the song service A runs the preset query method B after receiving the route of the request, node 4 representing that a connection is established with the database service C, node 5 representing that the database service C executes the SQL statement about the hot song query, and node 6 representing that the database updates the SQL query record.

[0081] The node information corresponding to each node includes the node ID, parent node ID, service ID, host ID, node status, etc., which is used to reflect the execution environment and execution status of the node corresponding to the system operation. Among them, the node ID Spanid represents the unique key of the node, the parent node ID paretSpanid represents the unique key of the previous node that calls the node, the service ID Serviceid represents the unique key of the service to which the node belongs, the host ID Hostid represents the unique key of the host where the node is located, and the node status represents the execution status of the node object system operation, such as whether the call fails isError, the response time startTime / endTime, etc.

[0082] In the embodiment of the present application, an alarm indication is automatically triggered every preset time period. In response to the alarm indication, the microservice system obtains all call chains generated within the preset time period, and then obtains the first alarm information of the call chain by performing alarm detection on the node information of each node in the call chain.

[0083] As mentioned above, in actual applications, system data is monitored based on pre-set alarm indicators, mainly including real-time alarms and statistical alarms. Real-time alarms are mostly based on the execution status of the call chain, such as call failure, response timeout, etc. Statistical alarms are obtained by analyzing system data within a period of time. For example, the host disk space is insufficient, the service call success rate is less than 95%, etc.

[0084] The first alarm information in the embodiment of the present application refers to the alarm information generated based on the real-time alarm. When executing step 302, for each node in the call chain, it is determined whether the execution state of the node triggers the preset first type of alarm. If the first type of alarm is triggered, the first alarm information representing the generation of the node is determined according to the alarm triggering reason of the node.

[0085] With the aforementioned Figure 4 Take this as an example to explain. Figure 5 For example, the field "isError" in the node information of node 2 indicating whether the call failed is assigned a value of "true", which means that the call to song service A failed. At this time, the call chain triggers the first type of alarm. The alarm triggering reason is obtained by analyzing the system data that triggers the alarm, which is that node 2 fails to call song service A. Node 2 is the abnormal node that generates the alarm, and the first alarm information indicating that node 2 of the call chain fails to call song service A is obtained.

[0086] By performing alarm detection on all call chains generated within a preset period through the above process, the first alarm information generated by the call chain within the preset period can be obtained. In specific implementation, the node information corresponding to the node that triggers the alarm can be added to the first alarm information, so that the abnormal node that generates the first alarm information can be quickly located by identifying the first alarm information.

[0087] Step 303: Associating the first alarm information with a node group corresponding to a call chain in which the first alarm information is detected; the node group corresponding to the call chain is composed of nodes in the call chain;

[0088] During implementation, each call chain within a preset period is converted into a corresponding node group according to its node connection relationship. Figure 4 Taking the call chain shown as an example, the corresponding node group is [node 1, node 2, node 3, node 4, node 5, node 6]. In the embodiment of the present application, the sorting order of the nodes in the node group from first to last is determined according to the connection order of the nodes in the chain from first to last.

[0089] Then, each first alarm information is associated with a node group corresponding to the call chain in which the first alarm information is detected. A call chain represents a business process of a system, and in actual applications, call chains containing the same nodes may trigger different alarms.

[0090] Still taking the above hot song query process as an example, each time a user queries a hot song, Figure 1 If the query process is as shown in the figure, the call chain generated by each execution of the query process may contain the same nodes. However, the call chain containing the same nodes may trigger different alarms.

[0091] Through the above process, the call chain can be converted into a node group, and the first alarm information generated by each business process within a period of time can be counted in the dimension of the node group. Figure 6 As shown, both call chain 1 and call chain 2 include nodes 1 to 4, that is, the node groups corresponding to call chain 1 and call chain 2 are [node 1, node 2, node 3, node 4]. Assume that there is a service response timeout problem in node 2 of call chain 1, and the first alarm information 1 representing the service response timeout in node 2 is generated. The method B response timeout in node 3 of call chain 2 generates the first alarm information 2 representing the method response timeout in node 3, and there is a service call failure problem in node 4 of call chain 2, and the first alarm information 3 representing the service call failure in node 4 is generated.

[0092] Since the node groups of call chain 1 and call chain 2 are the same, by associating the first alarm information with the node group corresponding to the call chain that detected the first alarm information, the three first alarm messages 1 to 3 generated by the two call chains can be associated with the node group [node 1, node 2, node 3, node 4, node 5, node 6]. This allows statistics of all first alarm messages generated by each business process within a period of time based on the dimension of node groups, making it easier to dig out the root cause topological relationship between the first alarm messages through the subsequent steps of this application.

[0093] Step 304: determining a first root cause topological relationship between first alarm information associated with the node group according to a connection relationship between nodes in the node group in the call chain;

[0094] In actual applications, the alarms triggered by the call chain are mostly root-cause related. Figure 2 As shown, the call of database service C is implemented based on the preset query method B running by song service A, which means that most of the abnormalities of database service C are caused by problems in the call of song service A. That is, the root cause of the call failure alarm and response timeout alarm for database service C is the response timeout of song service A.

[0095] In the embodiment of the present application, the abnormal node generating the first alarm information in the node group is determined according to the first alarm information associated with the node group. Then, according to the sorting order of the abnormal nodes in the node group, the root cause of the alarm for each abnormal node to trigger the alarm is determined. Among any two abnormal nodes with adjacent sorting, the abnormal node in the first sorting order is the root cause of the alarm for causing the abnormal node in the second sorting order to trigger the alarm.

[0096] Continue with the above Figure 6 The following example illustrates the Figure 7As shown. Since the nodes that trigger the alarm information in the node group [node 1, node 2, node 3, node 4] are nodes 2 to 4, nodes 2 to 4 are abnormal nodes of the node group. As mentioned above, in the embodiment of the present application, the sorting order of the nodes in the node group from first to last is determined according to the connection order of the nodes in the chain from first to last. Therefore, node 2 is the parent node of node 3, and node 3 is the parent node of node 4.

[0097] For each abnormal node, the root cause of the abnormal node's alarm can be determined based on the alarm triggering causes of abnormal nodes in the node group that are adjacent to the abnormal node and ranked before the abnormal node. Figure 7 For node 4, the nearest abnormal node before node 4 in the node group is node 3, and the alarm triggering reason of node 3 is the response timeout of method B, which means that the root cause of the alarm of node 4 may be caused by the response timeout of node 3 during the call of method B. Figure 7 For node 3, the nearest abnormal node before node 3 in the node group is node 2, and the alarm triggering reason of node 2 is service A response timeout, which means that the root cause of the alarm of node 3 may be due to the response timeout of node 2 during the service A call process.

[0098] In addition, for the first abnormal node in the node group, the alarm triggering cause of the abnormal node can be used as the alarm root cause of the abnormal node itself. After obtaining the alarm root cause of each abnormal node in the node group through the above process, the first alarm information associated with the node group is aggregated to obtain the first root cause topological relationship. Figure 7 As shown in , during implementation, the alarm root cause of each abnormal node in the node group and the alarm triggering cause in the first alarm information triggered by each abnormal node can be integrated to obtain the corresponding first root cause topological relationship.

[0099] Step 305: Generate aggregated alarm information of the node group based on the first root cause topological relationship.

[0100] During implementation, the first root topological relationship of the node group can be converted into a text description to generate corresponding aggregate alarm information, for example Figure 7 The first root cause topology relationship shown is converted into a text description, and for example, service C call fails, method B response times out. These problems may be caused by service A response timeout in node 2.

[0101] As mentioned above, in addition to the alarm indicators of real-time detection, in actual applications, statistical alarm indicators are often set for the system. Such alarm indicators are mainly comprehensive assessments of the service operation status and resource usage. Based on this, the embodiment of the present application further aggregates the statistical alarm information based on the aggregation of the real-time alarms generated within the preset time period, that is, the first alarm information, through the above process, to generate an aggregated alarm message that is convenient for operation and maintenance personnel to conduct abnormality investigation.

[0102] During implementation, alarm detection can be performed on the object to be detected within a preset time period to obtain the target object that triggers the preset second type of alarm, and the second alarm information triggered by the target object can be determined based on the alarm triggering cause of the target object.

[0103] In actual applications, statistical alarms mainly correspond to services and hosts in microservice systems. For example, the service call success rate is too low, the host memory usage is abnormal, the host disk space is insufficient, etc. Based on this, the embodiment of the present application sets the object to be tested as the service and host in the microservice system. The above-mentioned second type of alarm is a statistical alarm, and the target object is the object to be tested that triggers the second type of alarm. The second alarm information is generated according to the alarm triggering reason of the target object. For example, host 1 triggers the second type of alarm, and the alarm triggering reason is insufficient host disk space. The corresponding second alarm information is insufficient host disk space of host 1.

[0104] After the first root cause topological relationship of the node group is obtained through the aforementioned step 304, the target information causing the node group to trigger an alarm can be determined from all the second alarm information generated within a preset period of time.

[0105] Specifically, the host identifier and service identifier of the target node in the execution environment may be determined according to the node information of the target node in the node group; wherein the target node is the abnormal node ranked first in the node group.

[0106] With the aforementioned Figure 4 Take the call chain shown in the figure as an example, and its corresponding node group is [node 1, node 2, node 3, node 4, node 5, node 6]. Assume that the abnormal nodes in the node group are nodes 2 to 4, and the alarm triggering reason of nodes 2 and 4 is the corresponding service response timeout, and the alarm triggering reason of node 3 is the method B response timeout. Figure 8 As shown, first, the abnormal node ranked first in the node group is taken as the target node, that is, node 2 is the target node. Then, from the second alarm information 1 to N generated within the preset time period, the information of the corresponding target object carrying the host identifier or service identifier of the target node is found, that is, Figure 8 Information 1 to 4 and information 5 shown are used as target information.

[0107] As mentioned above, the target object in the second alarm information is the object to be tested that triggers the second alarm information, and the object to be tested is a host or a service. In specific implementation, the second alarm information whose host id of the corresponding target object is the same as the host id carried in the node information of node 2, and the second alarm information whose service id of the corresponding target object is the same as the service id carried in the node information of node 2 can be used as the target information corresponding to the node group.

[0108] Next, according to the target object of the target information, the first root topological relationship of the node group is expanded to obtain a second root topological relationship.

[0109] Considering that in a microservice system, most service anomalies are caused by insufficient configuration of the host itself, the target information corresponding to the node group can be analyzed in advance during implementation, and the first root cause topology can be expanded according to the type of target object in the target information.

[0110] If the target information of the node group is relatively simple, including only the first information that the target object is a service, or only the second information that the target object is a host, then the root cause of the alarm triggering the target node of the node group is determined according to the alarm triggering cause of the target object of the target information. Figure 8 For example, assuming that the target information corresponding to the node group [node 1, node 2, node 3, node 4, node 5, node 6] is that the call success rate of the main service A is too low, the call success rate of service A is too low as the target node, that is, the alarm root cause of node 2 triggering the alarm. Then, according to the alarm root cause of the target node, the first root cause topological relationship of the node group is expanded to obtain the following: Fig. 9 The second root cause topological relationship is shown.

[0111] Based on the second root cause topological relationship, the aggregated alarm information of the node group can be generated. For example, the response timeout of node 4 calling service C, the response timeout of node 3 calling method B, and the response timeout of node 2 calling service A may be caused by the low success rate of node 2 calling service A.

[0112] Correspondingly, if the target information of the node group includes both the first information that the target object is a service and the second information that the target object is a host, the root cause of the alarm for the target node of the node group to trigger the alarm is determined according to the alarm triggering cause of the target object of the first information, and the root cause of the alarm for the target object of the first information to trigger the alarm is determined according to the alarm triggering cause of the target object of the second information. Then, according to the root cause of the alarm of the target node and the root cause of the alarm for the target object of the first information to trigger the alarm, the first root cause topological relationship is expanded to obtain the second root cause topological relationship.

[0113] Still with the above Figure 8For example, assume that the first information corresponding to the node group [node 1, node 2, node 3, node 4, node 5, node 6] is that the call success rate of service A is too low, and the second information is that the disk space of host 1 is insufficient. During implementation, the low call success rate of service A can be used as the alarm root cause of the target node, that is, node 2, and the insufficient disk of host 1 can be used as the alarm root cause of the low call success rate of service A. Then, according to the alarm root cause of the target node, the first root cause topological relationship of the node group is expanded to obtain the following: Fig.10 The second root cause topological relationship is shown.

[0114] Based on the second root cause topology, aggregated alarm information of the node group can be generated. For example, the response timeout of node 4 calling service C, the response timeout of node 3 calling method B, the response timeout of node 2 calling service A, and the success rate of service A calling are too low. These problems may be caused by insufficient disk space on the host of node 2.

[0115] Therefore, the embodiment of the present application collects data on the call chain generated in the system within a period of time, analyzes and tracks the data in real time, determines the alarm information with the alarm root cause topology relationship within the dynamic time window, and aggregates the alarm information based on the root cause topology relationship.

[0116] Based on the same inventive concept, the embodiment of the present application also provides an alarm device for a microservice system, specifically as follows: Fig.11 As shown, including:

[0117] The data acquisition unit 111 is configured to: in response to the alarm indication, acquire the call chain generated within a preset period; each call chain includes a plurality of connected nodes, and the nodes represent the system operation triggered by the call chain;

[0118] The information confirmation unit 112 is configured to: perform alarm detection on the node information of each node in the call chain to obtain the first alarm information generated by the call chain; the node information represents the execution environment and execution status of the corresponding node;

[0119] The information processing unit 113 is configured to: associate the first alarm information with a node group corresponding to a call chain in which the first alarm information is detected; the node group corresponding to the call chain is composed of nodes in the call chain;

[0120] The root cause topology unit 114 is configured to: determine a first root cause topology relationship between first alarm information associated with the node group according to a connection relationship between nodes in the node group in the call chain;

[0121] The aggregate alarm unit 115 is configured to generate aggregate alarm information of the node group based on the first root cause topological relationship.

[0122] In some embodiments, the alarm detection is performed on the node information of each node in the call chain to obtain the first alarm information of the call chain, and the information confirmation unit 112 is specifically configured to:

[0123] For each node in the call chain, determining whether the execution status of the node triggers a preset first-class alarm;

[0124] If the first type of alarm is triggered, first alarm information representing the first alarm generated by the node is determined according to the alarm triggering cause of the node.

[0125] In some embodiments, the root cause topology unit 114 is further configured to:

[0126] Performing alarm detection on the object to be detected within the preset time period to obtain the target object that triggers the preset second type of alarm;

[0127] According to the alarm triggering cause of the target object, second alarm information triggered by the target object is determined.

[0128] In some embodiments, the generating of the aggregated alarm information of the node group based on the first root cause topology relationship is performed, and the root cause topology unit 114 is specifically configured to:

[0129] Determining, from the second alarm information, target information causing the node group to trigger an alarm;

[0130] According to the target object of the target information, the first root cause topological relationship of the node group is expanded to obtain a second root cause topological relationship;

[0131] Based on the second root cause topological relationship, aggregated alarm information of the node group is generated.

[0132] In some embodiments, the step of determining the first root cause topology relationship between the first alarm information associated with the node group according to the connection relationship between the nodes in the node group in the call chain is performed, and the root cause topology unit 114 is specifically configured as follows:

[0133] Determine an abnormal node in the node group according to the first alarm information associated with the node group; the abnormal node is a node that generates the first alarm information;

[0134] According to the sorting order of each abnormal node in the node group, the root cause of the alarm triggered by each abnormal node is determined; the sorting order of each node in the node group is determined according to the connection relationship of each node in the corresponding call chain of the node group; among any two abnormal nodes with adjacent sorting, the abnormal node with the former sorting is the root cause of the alarm that causes the abnormal node with the latter sorting to trigger the alarm;

[0135] According to the alarm root cause of each abnormal node triggering the alarm, the first alarm information associated with the node group is aggregated to obtain the first root cause topological relationship.

[0136] In some embodiments, the object to be tested includes a host and a service; and the target information causing the node group to trigger an alarm is determined from the second alarm information. The root cause topology unit 114 is specifically configured as follows:

[0137] Determine the host identifier and service identifier of the target node in the execution environment according to the node information of the target node in the node group; the target node is the abnormal node ranked first in the node group;

[0138] The target object carries the host identifier of the target node, or carries the second alarm information of the service identifier of the target node, as the target information.

[0139] In some embodiments, the first root cause topology relationship of the node group is expanded according to the target object of the target information, and the root cause topology unit 114 is specifically configured as follows:

[0140] If the target information of the node group includes first information that the target object is a service, or second information that the target object is a host, determining the alarm root cause of the target node of the node group triggering the alarm according to the alarm triggering cause of the target object in the target information;

[0141] The first root cause topological relationship is expanded according to the alarm root cause of the target node to obtain the second root cause topological relationship.

[0142] In some embodiments, the first root cause topology relationship of the node group is expanded according to the target object of the target information, and the root cause topology unit 114 is specifically configured as follows:

[0143] If the target information of the node group includes first information that the target object is a service, and second information that the target object is a host, determining the alarm root cause of the target node of the node group triggering the alarm according to the alarm triggering cause of the target object of the first information;

[0144] Determining the root cause of the alarm triggered by the target object of the first information according to the alarm triggering cause of the target object of the second information;

[0145] According to the alarm root cause of the target node and the alarm root cause of the target object of the first information triggering the alarm, the first root cause topological relationship is expanded to obtain the second root cause topological relationship.

[0146] Based on the same inventive concept, the present application embodiment also provides an electronic device, specifically Fig.12 As shown, the electronic device includes a data transmission unit 121 and a processor 122:

[0147] The data transmission unit 121 is configured to: receive an alarm indication;

[0148] The processor 122 is configured to: in response to the alarm indication, obtain a call chain generated within a preset period; each call chain includes a plurality of connected nodes, and the nodes represent the system operation triggered by the call chain;

[0149] Performing alarm detection on node information of each node in the call chain to obtain first alarm information generated by the call chain; the node information represents the execution environment and execution status of the corresponding node;

[0150] Associating the first alarm information with a node group corresponding to a call chain in which the first alarm information is detected; the node group corresponding to the call chain is composed of nodes in the call chain;

[0151] Determining a first root cause topological relationship between first alarm information associated with the node group according to a connection relationship between nodes in the node group in the call chain;

[0152] Based on the first root cause topological relationship, aggregated alarm information of the node group is generated.

[0153] In some embodiments, the processor 122 is specifically configured to:

[0154] For each node in the call chain, determining whether the execution status of the node triggers a preset first-class alarm;

[0155] If the first type of alarm is triggered, first alarm information representing the first alarm generated by the node is determined according to the alarm triggering cause of the node.

[0156] In some embodiments, the processor 122 is further configured to:

[0157] Performing alarm detection on the object to be detected within the preset time period to obtain the target object that triggers the preset second type of alarm;

[0158] According to the alarm triggering cause of the target object, second alarm information triggered by the target object is determined.

[0159] In some embodiments, the processor 122 is specifically configured to:

[0160] Determining, from the second alarm information, target information causing the node group to trigger an alarm;

[0161] According to the target object of the target information, the first root cause topological relationship of the node group is expanded to obtain a second root cause topological relationship;

[0162] Based on the second root cause topological relationship, aggregated alarm information of the node group is generated.

[0163] In some embodiments, the processor 122 is specifically configured to:

[0164] Determine an abnormal node in the node group according to the first alarm information associated with the node group; the abnormal node is a node that generates the first alarm information;

[0165] According to the sorting order of each abnormal node in the node group, the root cause of the alarm triggered by each abnormal node is determined; the sorting order of each node in the node group is determined according to the connection relationship of each node in the corresponding call chain of the node group; among any two abnormal nodes with adjacent sorting, the abnormal node with the former sorting is the root cause of the alarm that causes the abnormal node with the latter sorting to trigger the alarm;

[0166] According to the alarm root cause of each abnormal node triggering the alarm, the first alarm information associated with the node group is aggregated to obtain the first root cause topological relationship.

[0167] In some embodiments, the object to be tested includes a host and a service; and the target information causing the node group to trigger an alarm is determined from the second alarm information, and the processor 122 is specifically configured to:

[0168] Determine the host identifier and service identifier of the target node in the execution environment according to the node information of the target node in the node group; the target node is the abnormal node ranked first in the node group;

[0169] The target object carries the host identifier of the target node, or carries the second alarm information of the service identifier of the target node, as the target information.

[0170] In some embodiments, the processor 122 is specifically configured to perform the expansion of the first root topological relationship of the node group according to the target object of the target information:

[0171] If the target information of the node group includes first information that the target object is a service, or second information that the target object is a host, determining the alarm root cause of the target node of the node group triggering the alarm according to the alarm triggering cause of the target object in the target information;

[0172] The first root cause topological relationship is expanded according to the alarm root cause of the target node to obtain the second root cause topological relationship.

[0173] In some embodiments, the processor 122 is specifically configured to perform the expansion of the first root topological relationship of the node group according to the target object of the target information:

[0174] If the target information of the node group includes first information that the target object is a service, and second information that the target object is a host, determining the alarm root cause of the target node of the node group triggering the alarm according to the alarm triggering cause of the target object of the first information;

[0175] Determining the root cause of the alarm triggered by the target object of the first information according to the alarm triggering cause of the target object of the second information;

[0176] According to the alarm root cause of the target node and the alarm root cause of the target object of the first information triggering the alarm, the first root cause topological relationship is expanded to obtain the second root cause topological relationship.

[0177] The embodiment of the present application also provides a computer storage medium, in which computer program instructions are stored. When the instructions are executed on a computer, the computer executes any one of the steps of the alarm method for the microservice system described above.

[0178] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0179] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0180] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0181] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0182] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. An alarm method for a microservice system, characterized in that: include: In response to the alarm indication, obtaining the call chain generated within a preset time period; Each call chain includes a plurality of connected nodes, wherein the nodes represent system operations triggered by the call chain; Performing alarm detection on node information of each node in the call chain to obtain first alarm information generated by the call chain; The node information represents the execution environment and execution status of the corresponding node; Associating the first alarm information with a node group corresponding to a call chain in which the first alarm information is detected; The node group corresponding to the call chain is composed of the nodes in the call chain; Determining a first root cause topological relationship between first alarm information associated with the node group according to a connection relationship between nodes in the node group in the call chain; Based on the first root cause topological relationship, aggregated alarm information of the node group is generated.

2. The method according to claim 1, characterized in that The step of performing alarm detection on node information of each node in the call chain to obtain first alarm information of the call chain includes: For each node in the call chain, determining whether the execution status of the node triggers a preset first-class alarm; If the first type of alarm is triggered, first alarm information representing the first alarm generated by the node is determined according to the alarm triggering cause of the node.

3. The method according to claim 1, characterized in that The method further comprises: Performing alarm detection on the object to be detected within the preset time period to obtain the target object that triggers the preset second type of alarm; According to the alarm triggering cause of the target object, second alarm information triggered by the target object is determined.

4. The method according to claim 3, characterized in that The generating, based on the first root cause topological relationship, aggregated alarm information of the node group includes: Determining, from the second alarm information, target information causing the node group to trigger an alarm; According to the target object of the target information, the first root cause topological relationship of the node group is expanded to obtain a second root cause topological relationship; Based on the second root cause topological relationship, aggregated alarm information of the node group is generated.

5. The method according to any one of claims 2 to 4, characterized in that: The determining, according to the connection relationship between the nodes in the node group in the call chain, a first root cause topological relationship between the first alarm information associated with the node group includes: Determine an abnormal node in the node group according to the first alarm information associated with the node group; the abnormal node is a node that generates the first alarm information; According to the sorting order of each abnormal node in the node group, the root cause of the alarm triggered by each abnormal node is determined; the sorting order of each node in the node group is determined according to the connection relationship of each node in the corresponding call chain of the node group; among any two abnormal nodes with adjacent sorting, the abnormal node with the former sorting is the root cause of the alarm that causes the abnormal node with the latter sorting to trigger the alarm; According to the alarm root cause of each abnormal node triggering the alarm, the first alarm information associated with the node group is aggregated to obtain the first root cause topological relationship.

6. The method according to claim 5, characterized in that The object to be tested includes a host and a service; and determining, from the second alarm information, target information causing the node group to trigger an alarm includes: Determine the host identifier and service identifier of the target node in the execution environment according to the node information of the target node in the node group; the target node is the abnormal node ranked first in the node group; The target object carries the host identifier of the target node, or carries the second alarm information of the service identifier of the target node, as the target information.

7. The method according to claim 6, characterized in that The step of expanding the first root topological relationship of the node group according to the target object of the target information includes: If the target information of the node group includes first information that the target object is a service, or second information that the target object is a host, determining the alarm root cause of the target node of the node group triggering the alarm according to the alarm triggering cause of the target object in the target information; The first root cause topological relationship is expanded according to the alarm root cause of the target node to obtain the second root cause topological relationship.

8. The method according to claim 6, characterized in that The step of expanding the first root topological relationship of the node group according to the target object of the target information includes: If the target information of the node group includes first information that the target object is a service, and second information that the target object is a host, determining the alarm root cause of the target node of the node group triggering the alarm according to the alarm triggering cause of the target object of the first information; Determining the root cause of the alarm triggered by the target object of the first information according to the alarm triggering cause of the target object of the second information; According to the alarm root cause of the target node and the alarm root cause of the target object of the first information triggering the alarm, the first root cause topological relationship is expanded to obtain the second root cause topological relationship.

9. An electronic device, characterized in that: Including data transmission unit and processor: The data transmission unit is configured to: receive an alarm indication; The processor is configured to: in response to an alarm indication, obtain a call chain generated within a preset period; each call chain includes a plurality of connected nodes, and the nodes represent system operations triggered by the call chain; Performing alarm detection on node information of each node in the call chain to obtain first alarm information generated by the call chain; The node information represents the execution environment and execution status of the corresponding node; Associating the first alarm information with a node group corresponding to a call chain in which the first alarm information is detected; The node group corresponding to the call chain is composed of the nodes in the call chain; Determining a first root cause topological relationship between first alarm information associated with the node group according to a connection relationship between nodes in the node group in the call chain; Based on the first root cause topological relationship, aggregated alarm information of the node group is generated.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method according to any one of claims 1 to 8.