Cluster health state evaluation method, device, equipment, medium and program product
By acquiring and processing the cluster system's detection metrics and combining them with the health assessment results of hierarchical objects, the problem of users not being able to intuitively understand the system's health status is solved, enabling comprehensive health assessment and anomaly detection of the cluster system.
Patent Information
- Application Number
- CN202510726319.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-06-03
AI Technical Summary
Existing technologies cannot provide users with an intuitive understanding of the health status of a cluster system. The detection indicators are fragmented and cannot comprehensively assess the health level of the system.
By acquiring multiple detection indicators of the current level object, the first health assessment result is determined, and based on the target health assessment result of the previous level object, the overall health status of the cluster, node or container is reflected. Various methods such as preprocessing, weight calculation and anomaly detection model are used to determine the health assessment score.
It enables a more intuitive reflection of the health status of clusters, nodes, or containers, allowing for timely detection of anomalies and root cause diagnosis, thus improving the accuracy and real-time performance of system health status assessment.
Smart Images

Figure CN120256266B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and particularly relates to a cluster health state evaluation method and device, equipment, medium and program product. BACKGROUND
[0002] For a cluster system, the cluster is a collection of multiple nodes, and as a unified computing resource pool, the node is a physical or virtual machine in the cluster, the node includes multiple containers, the container is a lightweight runtime environment, contains application code and its dependent configuration file, and is started based on an image.
[0003] The related technology collects various detection indexes of the cluster, the node and / or the container, and the detection indexes include detection indexes that can reflect the health state of the cluster to a certain extent and detection indexes that are difficult for ordinary users to understand. At present, the related technology collects various detection indexes separately, and cannot enable a user to intuitively understand whether the system is healthy. SUMMARY
[0004] The present application provides a cluster health state evaluation method, device, equipment, medium and program product, which can enable a user to intuitively understand whether the system is healthy.
[0005] In a first aspect, the present application provides a cluster health state evaluation method, comprising:
[0006] obtaining multiple detection indexes of a current hierarchical object;
[0007] determining a first health evaluation result of the current hierarchical object according to the multiple detection indexes;
[0008] if the current hierarchical object has a previous hierarchical object, obtaining a target health evaluation result of the previous hierarchical object;
[0009] determining the target health evaluation result of the current hierarchical object according to the first health evaluation result and the target health evaluation result of the previous hierarchical object, the target health evaluation result of the current hierarchical object representing a health state of the current hierarchical object;
[0010] if the current hierarchical object does not have the previous hierarchical object, determining the first health evaluation result as the target health evaluation result of the current hierarchical object;
[0011] If the current hierarchical object is a cluster, the previous hierarchical object of the cluster is multiple nodes included in the cluster; if the current hierarchical object is a node, the previous hierarchical object of the node is multiple containers included in the node; and if the current hierarchical object is a container, the container does not have the previous hierarchical object.
[0012] Optionally, the first health evaluation result of the current hierarchical object is determined according to the multiple detection indexes, comprising:
[0013] The plurality of detection indexes are preprocessed to obtain a plurality of inspection items, and an inspection item in the plurality of inspection items corresponds to at least one detection index;
[0014] For an inspection item in the plurality of inspection items, a second health assessment result of the inspection item is determined according to at least one detection index corresponding to the inspection item;
[0015] A first health assessment result of the current hierarchical object is determined according to the second health assessment results of the plurality of inspection items.
[0016] Optionally, the first health assessment result includes a first health assessment score, and the second health assessment result includes a second health assessment score. The first health assessment result of the current hierarchical object is determined according to the second health assessment results of the plurality of inspection items, including:
[0017] According to the plurality of first score thresholds and the second health assessment scores, a first number of inspection items in different score intervals is determined from the plurality of inspection items. Different first score thresholds in the at least one first score threshold are not equal in size.
[0018] The first health assessment score of the current hierarchical object is determined according to the first number and a second number. The second number is a total number of the plurality of inspection items.
[0019] Optionally, the first health assessment result includes a first health assessment score, and the second health assessment result includes a second health assessment score. The first health assessment result of the current hierarchical object is determined according to the second health assessment results of the plurality of inspection items, including:
[0020] For an inspection item in the plurality of inspection items, a target weight of the inspection item is obtained;
[0021] The first health assessment score is determined according to the second health assessment scores of the plurality of inspection items and the target weights of the plurality of inspection items.
[0022] Optionally, the target weight of the inspection item is obtained, including:
[0023] A standard deviation of the second health assessment score of the inspection item is determined;
[0024] A first correlation coefficient of the inspection item and other inspection items in the plurality of inspection items is determined;
[0025] The first weight of the inspection item is determined according to the standard deviation and the first correlation coefficient;
[0026] The target weight is determined according to the first weight.
[0027] Optionally, the target weight is determined according to the first weight, including:
[0028] determining an average value of second health assessment scores of a plurality of target objects for the check item, the plurality of target objects including the current level object and belonging to the same level;
[0029] determining a second weight of the check item according to the average value and the first weight;
[0030] normalizing the second weights of the plurality of check items to obtain a target weight of the check item.
[0031] Optionally, the second health assessment result includes a second health assessment score, and the second health assessment result of the check item is determined according to at least one detection index corresponding to the check item, including:
[0032] obtaining an index value threshold corresponding to the detection index in the at least one check item corresponding to the check item;
[0033] determining a size relationship between the detection index and the index value threshold;
[0034] determining the second health assessment score of the corresponding check item according to the size relationship corresponding to the at least one check item, the size relationship corresponding to the at least one check item and the second health assessment score having a corresponding relationship.
[0035] Optionally, the second health assessment result of the check item is determined according to at least one detection index corresponding to the check item, including:
[0036] processing the at least one detection index through a preconfigured detection index processing model to obtain the second health assessment result of the check item.
[0037] Optionally, the current level object includes a plurality of previous level objects, and the target health assessment result of the current level object is determined according to the first health assessment result and a target health assessment result of the previous level object, including:
[0038] determining a third health assessment result according to the target health assessment results of the plurality of previous level objects;
[0039] determining the target health assessment result of the current level object according to the first health assessment result and the third health assessment result.
[0040] Optionally, the target health assessment result includes a target health assessment score, and the third health assessment result includes a third health assessment score, and the third health assessment result is determined according to the target health assessment results of the plurality of previous level objects, including:
[0041] determining a third number of previous level objects with a target health assessment score less than a second score threshold in the plurality of previous level objects according to the second score threshold and the target health assessment scores of the plurality of previous level objects;
[0042] determining a ratio of the third quantity and a fourth quantity, the fourth quantity being a total quantity of the plurality of previous level objects;
[0043] determining the third health assessment score according to the ratio threshold, the ratio, and the third quantity.
[0044] In a second aspect, the present application provides a health state evaluation device of a cluster, comprising:
[0045] a first obtaining module, configured to obtain a plurality of detection indexes of a current level object;
[0046] a first determining module, configured to determine a first health assessment result of the current level object according to the plurality of detection indexes;
[0047] a second obtaining module, configured to, if the current level object has a previous level object, obtain a target health assessment result of the previous level object;
[0048] a second determining module, configured to determine a target health assessment result of the current level object according to the first health assessment result and the target health assessment result of the previous level object, the target health assessment result of the current level object representing a health state of the current level object;
[0049] a third determining module, configured to, if the current level object does not have the previous level object, determine the first health assessment result as the target health assessment result of the current level object.
[0050] In the present application, if the current level object is a cluster, the previous level object of the cluster is a plurality of nodes included in the cluster; if the current level object is a node, the previous level object of the node is a plurality of containers included in the node; if the current level object is a container, the container does not have the previous level object.
[0051] In a third aspect, the present application provides an electronic device, comprising a processor and a memory; the processor is in communication connection with the memory.
[0052] The memory stores computer instructions.
[0053] The processor executes the computer instructions stored in the memory to implement the method according to any one of the first aspect.
[0054] In a fourth aspect, the present application provides a computer readable storage medium, the computer readable storage medium stores computer execution instructions, the computer execution instructions are executed by the processor to implement the method according to any one of the first aspect.
[0055] In a fifth aspect, the present application provides a computer program product, the computer program product comprises a computer program, the computer program is executed by the processor to implement the method according to any one of the first aspect.
[0056] The cluster health state evaluation method, device, equipment, medium and program product provided by the application can realize overall and intuitive reflection of whether a cluster, a node or a container is healthy, and further more intuitively tell a user whether the performance of the cluster health state is abnormal and the degree of the health state abnormality. BRIEF DESCRIPTION OF DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can be obtained by those skilled in the art without any creative labor on the basis of these drawings.
[0058] Figure 1 An application scenario diagram of the cluster health state evaluation method provided by the application;
[0059] Figure 2 A flowchart of the cluster health state evaluation method provided by the application;
[0060] Figure 3 A schematic diagram of determining the target health evaluation result provided by the application;
[0061] Figure 4 A flowchart of determining the first health evaluation result provided by the application;
[0062] Figure 5 A flowchart of determining the target health evaluation result provided by the application;
[0063] Figure 6 A structural schematic diagram of the cluster health state evaluation device provided by the application;
[0064] Figure 7 A hardware structural schematic diagram of the electronic equipment provided by the application.
[0065] The specific embodiments of the present application have been shown by the above drawings, and will be described in more detail hereinafter. These drawings and the written description are not intended to restrict the scope of the present application in any way, but to illustrate the concept of the present application by referring to specific embodiments. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solutions and advantages of the present application more clear, the technical solutions of the present application will be described clearly and completely in the following by combining the drawings in the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0067] In the cluster operation, a large number of detection indexes are collected for the cluster, node or container, and these detection indexes are presented to the user through various kinds of index dashboards, wherein each detection index is isolated from each other, and the user without system experience cannot intuitively understand whether the system is healthy through these large number of detection indexes.
[0068] At present, the health degree check of the system is based on the following two schemes:
[0069] (1) Prometheus (a kind of open source monitoring system and time series database) time sequence anomaly detection: this scheme is based on the Prometheus time sequence database to store the detection index data, the detection index data is detected by the anomaly detection algorithm library to detect the index anomaly, and a new detection index is generated, and finally the alarm and display are performed. This scheme can only detect the anomaly of a single detection index, and cannot further evaluate the health degree of the system.
[0070] (2) The function of cluster health score, which calculates a health score for the cluster by checking some set items, such as cluster node memory pressure, node running state, container running state, etc. This scheme only determines the health degree of the cluster by setting some checking items and reducing the score according to the checking items, which has certain limitations and lacks real-time performance.
[0071] Considering that the existing various detection indexes are isolated from each other and cannot intuitively let the user know whether the system is healthy, the present application proposes a cluster health state evaluation method, which can reflect whether a cluster, node or container is healthy as a whole and intuitively, so as to more intuitively tell the user whether the health state of the cluster is abnormal and the degree of abnormality.
[0072] Optionally, the execution subject of the cluster health state evaluation method provided in the present application can be any electronic device with processing capability, such as a terminal or a server.
[0073] With reference to Figure 1 The application scenario diagram of the cluster health state evaluation method provided in the present application is shown in Figure 1 In the application scenario diagram, the system 10 includes a cluster 11, and the cluster includes multiple nodes (such as node a1, node a2, node a3, and node a4), and each node includes multiple containers, such as that the node a1 includes containers b1, b2, and b3, the node a2 includes containers c1, c2, and c3, the node a3 includes containers d1, d2, and d3, and the node a4 includes containers e1, e2, and e3. The cluster health state evaluation method provided in the present application can be used to evaluate the health states of containers, nodes, and clusters.
[0074] The technical solutions of the present application will be described in detail below in combination with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in detail in some embodiments.
[0075] Figure 2 The flowchart of the cluster health state evaluation method provided in the present application is shown in Figure 1 The method can include the following steps:
[0076] S201, obtaining multiple detection indexes of a current hierarchical object.
[0077] In the embodiments of the present application, the current hierarchical object can be a cluster, a node, or a container.
[0078] The detection indexes of the current hierarchical object can be detected by related technologies, such as the SysOM (System Operations and Maintenance) platform. The detection indexes can include, for example, user-mode CPU (Central Processing Unit) usage, kernel-mode CPU usage, idle CPU usage, memory unreleased objects, disk read-write utilization, IO (Input / Output) average waiting time, and bandwidth real-time traffic. The present application does not limit how to obtain the multiple detection indexes of the current hierarchical object.
[0079] For example, if the current hierarchical object is a container, the multiple detection indexes corresponding to the container can be obtained. If the current hierarchical object is a node, the multiple detection indexes corresponding to the node can be obtained. If the current hierarchical object is a cluster, the multiple detection indexes corresponding to the cluster can be obtained.
[0080] In the embodiment of the present application, the current hierarchical object can be triggered to determine a plurality of detection indexes of the current hierarchical object every preset time. Then the plurality of detection indexes of the current hierarchical object can be stored, and then the present application obtains the plurality of stored detection indexes of the current hierarchical object.
[0081] In addition, triggering the current hierarchical object to determine the plurality of detection indexes of the current hierarchical object and subsequently determining the target health assessment result can be performed synchronously, thereby ensuring the real-time performance of determining the target health assessment result.
[0082] 202, determining a first health assessment result of the current hierarchical object according to the plurality of detection indexes.
[0083] The first health assessment result can be represented in various ways, such as an assessment score (0-100), a grade (good, warning, abnormal), color coding (green, yellow, red), icon symbols, etc. The present application takes the first health assessment result including a first health assessment score as an example.
[0084] It can be understood that the plurality of detection indexes of the current hierarchical object will affect the first health assessment result of the current hierarchical object, wherein the first health assessment score is positively correlated with the health status of the current hierarchical object.
[0085] For example, under the condition that other detection indexes remain unchanged, the higher the user state CPU usage of the current hierarchical object, the worse the health status of the current hierarchical object, and the lower the corresponding first health assessment score. Under the condition that other detection indexes remain unchanged, the higher the memory unreleased object of the current hierarchical object, the worse the health status of the current hierarchical object, and the lower the corresponding first health assessment score. Under the condition that other detection indexes remain unchanged, the higher the disk read-write utilization of the current hierarchical object, the worse the health status of the current hierarchical object, and the lower the corresponding first health assessment score. Under the condition that other detection indexes remain unchanged, the higher the average IO waiting time of the current hierarchical object, the worse the health status of the current hierarchical object, and the lower the corresponding first health assessment score.
[0086] In the embodiment of the present application, a plurality of conversion rules of converting the detection indexes to the first health assessment result can be preset, and then the first health assessment result corresponding to the plurality of detection indexes can be determined according to the conversion rules. The specific conversion rules are not limited by the present application.
[0087] S203, determining whether the current hierarchical object has a previous hierarchical object.
[0088] If the current hierarchical object is a cluster, the previous hierarchical object of the cluster is a plurality of nodes included in the cluster; if the current hierarchical object is a node, the previous hierarchical object of the node is a plurality of containers included in the node; if the current hierarchical object is a container, the container does not have a previous hierarchical object.
[0089] For example, referring to Figure 1 , if the current hierarchical object is cluster 11, the upper hierarchical objects of cluster 11 include node a1, node a2, node a3 and node a4. If the current hierarchical object is node a1, the upper hierarchical objects of node a1 include container b1, container b2 and container b3. If the current hierarchical object is node a2, the upper hierarchical objects of node a2 include container c1, container c2 and container c3. If the current hierarchical object is node a3, the upper hierarchical objects of node a3 include container d1, container d2 and container d3. If the current hierarchical object is node a4, the upper hierarchical objects of node a4 include container e1, container e2 and container e3. If the current hierarchical object is any of the containers in Figure 1 , the container has no upper hierarchical object.
[0090] It can be understood that if the current hierarchical object has an upper hierarchical object, S204 is performed, and if the current hierarchical object has no upper hierarchical object, S206 is performed.
[0091] S204, the target health assessment result of the upper hierarchical object is obtained.
[0092] In some embodiments, the target health assessment result of the upper hierarchical object is pre-stored in a database, and the target health assessment result of the upper hierarchical object can be obtained from the database.
[0093] In some embodiments, the target health assessment result of the upper hierarchical object can be determined in real time.
[0094] In the embodiments of the present application, the target health assessment result of the upper hierarchical object can be obtained in various ways, without limitation.
[0095] For example, referring to Figure 3 , if the current hierarchical object is cluster 11, the target health assessment scores of the upper hierarchical objects include the target health assessment score of node a1, the target health assessment score of node a2, the target health assessment score of node a3 and the target health assessment score of node a4. If the current hierarchical object is node a1, the target health assessment scores of the upper hierarchical objects include the target health assessment scores of container b1 to container b3. If the current hierarchical object is node a2, the target health assessment scores of the upper hierarchical objects include the target health assessment scores of container c1 to container c3. If the current hierarchical object is node a3, the target health assessment scores of the upper hierarchical objects include the target health assessment scores of container d1 to container d3. If the current hierarchical object is node a4, the target health assessment scores of the upper hierarchical objects include the target health assessment scores of container e1 to container e3.
[0096] S205, determining the target health assessment result of the current hierarchical object according to the first health assessment result and the target health assessment result of the last hierarchical object.
[0097] The target health assessment result of the current hierarchical object represents a health state of the current hierarchical object.
[0098] It can be understood that if the current hierarchical object is a cluster, the target health assessment result of the cluster is determined according to the first health assessment result of the cluster and the target health assessment results of the nodes included in the cluster. If the current hierarchical object is a node, the target health assessment result of the node is determined according to the first health assessment result of the node and the target health assessment results of the containers included in the node.
[0099] The target health assessment result includes a target health assessment score.
[0100] In some embodiments, the first health assessment result and the target health assessment result of the last hierarchical object are calculated by using a preset algorithm to obtain the target health assessment result of the current hierarchical object.
[0101] The target health assessment score of the current hierarchical object can be determined by determining an average value of the first health assessment score of the current hierarchical object and the target health assessment score of the last hierarchical object.
[0102] For example, referring to Figure 3 if the current hierarchical object is the cluster 11, the last hierarchical objects of the cluster 11 include the node a1, the node a2, the node a3 and the node a4. The target health assessment score of the cluster 11 is an average value (56 points) of the first health assessment score (e.g. 60 points) of the cluster 11, the target health assessment score (e.g. 40 points) of the node a1, the target health assessment score (e.g. 60 points) of the node a2, the target health assessment score (e.g. 50 points) of the node a3 and the target health assessment score (e.g. 70 points) of the node a4.
[0103] The target health assessment score of the current hierarchical object can be determined by first determining an average value of the target health assessment scores of the last hierarchical objects, then multiplying the average value by the weight of the last hierarchical object to obtain a first assessment score, multiplying the first health assessment score of the current hierarchical object by the weight of the current hierarchical object to obtain a second assessment score, and calculating a sum of the first assessment score and the second assessment score as the target health assessment score of the current hierarchical object.
[0104] For example, referring to Figure 3If the current hierarchical object is cluster 11, the upper hierarchical object of cluster 11 includes node a1, node a2, node a3 and node a4. Wherein, the first health evaluation score of cluster 11 is 60, the average value of the target health evaluation score of node a1 (e.g. 40), the target health evaluation score of node a2 (e.g. 60), the target health evaluation score of node a3 (e.g. 50) and the target health evaluation score of node a4 (e.g. 70) is 52.5. If the weight of the first health evaluation score of cluster 11 is 0.6, and the weight of the average value of the target health evaluation score of node is 0.4, the target health evaluation score of cluster 11 can be obtained as 57.
[0105] In the embodiments of the present application, the target health evaluation result can also be determined according to other manners, which are not limited herein.
[0106] In S206, the first health evaluation result is determined as the target health evaluation result of the current hierarchical object.
[0107] It can be understood that, in the case that the current hierarchical object is a container, the first health evaluation result of the container is determined as the target health evaluation result of the container.
[0108] In the embodiments of the present application, the target health evaluation result can represent the health status of the current hierarchical object. Wherein, the health status refers to whether the current hierarchical object is normal in the current running process. Further, the container and the node are both elements in the cluster, thus, when the current hierarchical object is a container or a node, the health status of the cluster can also be reflected.
[0109] Further, if the target health evaluation score of the current hierarchical object is less than the evaluation score threshold, an abnormality warning can be performed. The root cause diagnosis of the abnormal current hierarchical object can also be performed, and then the abnormal reason is determined, and the specific root cause diagnosis method is not limited herein.
[0110] In some embodiments, the above steps can be triggered every preset time, and then the determination of the target health evaluation result of the current hierarchical object is realized. In addition, the above steps can also be executed in a loop, and the target health evaluation results of different hierarchical objects are determined.
[0111] In addition, the target health evaluation result of the current hierarchical object can also be displayed. Further, the target health evaluation results of the cluster, the node and the container can be displayed, so that the user can more intuitively determine the health status of the cluster, the node and the container.
[0112] In summary, the present application can overall and intuitively reflect whether a cluster, a node or a container is healthy. Through the determined target health evaluation result, the user can be more intuitively told whether the health status of the system is abnormal and the degree of abnormality.
[0113] The following describes how to determine the first health assessment result of the current hierarchical object based on multiple detection indexes:
[0114] Figure 4 A flowchart for determining the first health assessment result is provided in the present application. As shown in Figure 4 As a possible implementation, step S202 can include the following steps:
[0115] S401, pre-process the multiple detection indexes to obtain multiple check items.
[0116] Among the multiple check items, a check item corresponds to at least one detection index. It can be understood that the check item is determined by the corresponding at least one detection index. For example, the CPU usage can be determined according to the user state CPU usage, the kernel state CPU usage and the idle CPU usage, and the CPU usage is a check item.
[0117] In addition, the check item is also CPU load, memory usage, OOM (Out Of Memory, insufficient memory), memory leak, disk usage, IO throughput, IO delay, bandwidth occupation, etc.
[0118] In the embodiments of the present application, different check items are determined according to the corresponding at least one detection index. The method of the present application for pre-processing the multiple detection indexes to obtain the multiple check items is not limited.
[0119] It can be understood that the present application can obtain the running log of the current hierarchical object, and then determine the detection index through the log. The method of determining the detection index is not limited in the present application.
[0120] S402, for a check item in the multiple check items, according to the at least one detection index corresponding to the check item, determine the second health assessment result of the check item.
[0121] It can be understood that one check item corresponds to at least one detection index, and the second health assessment result of the check item can be determined according to the at least one detection index. In the embodiments of the present application, the second health assessment result includes a second health assessment score. In addition, the second health assessment result can also be expressed in other ways, which is not limited here.
[0122] The detection indexes corresponding to different check items can be the same. For example, for a cluster, detection indexes f1, f2, …, f10 can be obtained, and check items g1, g2, and g3 can be determined according to the detection indexes f1, f2, …, f10. The check item g1 is determined according to the detection indexes f1, f2, f4, and f8, and the at least one detection index corresponding to the check item g1 includes the detection indexes f1, f2, f4, and f8, and then the second health evaluation result of the check item g1 is determined according to these detection indexes. The check item g2 is determined according to the detection indexes f2, f3, f5, f7, and f9, and the at least one detection index corresponding to the check item g2 includes the detection indexes f2, f3, f5, f7, and f9, and then the second health evaluation result of the check item g2 is determined according to these detection indexes. The check item g3 is determined according to the detection indexes f1, f6, f7, and f10, and the at least one detection index corresponding to the check item g3 includes the detection indexes f1, f6, f7, and f10, and then the second health evaluation result of the check item g3 is determined according to these detection indexes.
[0123] In some embodiments, according to the at least one detection index corresponding to the check item, the second health evaluation score of the check item is determined, including: for the detection index in the at least one check item corresponding to the check item, obtaining the index value threshold corresponding to the detection index; determining the size relationship between the detection index and the index value threshold; according to the size relationship corresponding to the at least one check item, determining the second health evaluation score of the corresponding check item, and the size relationship corresponding to the at least one check item has a corresponding relationship with the second health evaluation score.
[0124] It can be understood that the index value threshold is preconfigured, and after determining the size relationship between the index value of each detection index of the check item and the index value threshold, the second health evaluation score of the check item is determined according to the corresponding relationship between the size relationship and the second health evaluation score.
[0125] For example, the check item is CPU usage, and the corresponding detection indexes include user mode CPU usage, kernel mode CPU usage, and idle CPU usage. The threshold value of the index value corresponding to the user mode CPU usage is 60%, the threshold value of the index value corresponding to the kernel mode CPU usage is 70%, and the threshold value of the index value corresponding to the idle CPU usage is 30%. If the user mode CPU usage, the kernel mode CPU usage, and the idle CPU usage are all greater than or equal to the threshold value of the index value, the second health assessment score of the corresponding check item is 30. If two of the user mode CPU usage, the kernel mode CPU usage, and the idle CPU usage are greater than or equal to the threshold value of the index value, and one is less than the threshold value of the index value, the second health assessment score of the corresponding check item is 50. If two of the user mode CPU usage, the kernel mode CPU usage, and the idle CPU usage are less than the threshold value of the index value, and one is greater than or equal to the threshold value of the index value, the second health assessment score of the corresponding check item is 70. If all of the user mode CPU usage, the kernel mode CPU usage, and the idle CPU usage are less than the threshold value of the index value, the second health assessment score of the corresponding check item is 90.
[0126] In some embodiments, the at least one detection index is processed by a preconfigured detection index processing model to obtain the second health assessment result of the check item.
[0127] It can be understood that the detection index processing model is a pre-trained neural network model, wherein the training sample of the detection index processing model is the check item, the at least one detection index corresponding to the check item, and the second health assessment result of the check item. In the training process, the check item and the at least one detection index are input into the detection index processing model, and the second health assessment result is the label data. The specific training process of the detection index processing model is not limited in the present application.
[0128] Further, in the embodiments of the present application, after the check item and the at least one detection index are determined, the check item and the corresponding at least one detection index are input into the detection index processing model for processing, and the second health assessment result of the check item can be obtained.
[0129] In some embodiments, it can also be determined whether the detection index of the check item is preconfigured with a corresponding index value threshold value. If yes, the second health assessment result of the check item is determined according to the size relationship between the index value of the at least one detection index and the index value threshold value. If the check item is not preconfigured with a corresponding index value threshold value, the at least one detection index is processed by a preconfigured detection index processing model to obtain the second health assessment result of the check item.
[0130] In addition, the second health assessment result can be determined by other manners, such as an adtk (Anomaly detection toolkit) detector, which is not limited in the present application.
[0131] In the embodiments of the present application, the second health assessment result of the check item can be determined by various methods, so as to efficiently determine the second health assessment result of the check item.
[0132] S403, determining the first health assessment result of the current hierarchical object according to the second health assessment results of the plurality of check items.
[0133] The second health assessment results of the plurality of check items can be used to determine the first health assessment result of the current hierarchical object.
[0134] In some embodiments, the average of the plurality of second health assessment scores can be determined as the first health assessment score. For example, the second health assessment score of the check item g1 is 40, the second health assessment score of the check item g2 is 60, and the second health assessment score of the check item g3 is 80, so the average of the plurality of second health assessment scores is 60, that is, the first health assessment score is 60.
[0135] In summary, the first health assessment result is determined by the plurality of detection indexes of the plurality of check items, so as to improve the accuracy of the first health assessment result.
[0136] In some embodiments, the first health assessment result of the current hierarchical object is determined according to the second health assessment results of the plurality of check items, including: according to the plurality of first score thresholds and the second health assessment scores, determining the first number of check items in different score intervals in the plurality of check items, the different first score thresholds in the at least one first score threshold being different in size; and determining the first health assessment score of the current hierarchical object according to the first number and a second number, the second number being the total number of the plurality of check items.
[0137] The at least one first score threshold is preset, and the different first score thresholds are different. In the embodiments of the present application, the first health assessment score is determined according to the first number and the second number based on a preset expression.
[0138] It can be understood that the first health assessment score can be determined by the following preset expression (1):
[0139]
[0140] In expression (1), S1 represents the first health assessment score, X1, X2 and X3 represent different first score thresholds, and X1 < X2 < X3. 、 and the first number of the items of examination representing different score intervals, the first number represents the number of the items of examination whose second health assessment score is less than the first score threshold X1. The first number represents the number of the items of examination whose second health assessment score is less than the first score threshold X2. The first number represents the number of the items of examination whose second health assessment score is less than the first score threshold X3, and M represents the total number (the second number) of the items of examination of the current hierarchical object. , and are preset coefficients (all greater than 0), , and may be the same or different, wherein, .
[0141] Further, the expression (1) can be understood as, if there is an item of examination whose second health assessment score is less than the first score threshold X1, if there is no item of examination whose second health assessment score is less than the first score threshold X1, and there is an item of examination whose second health assessment score is less than the first score threshold X2, if there is no item of examination whose second health assessment score is less than the first score threshold X2, and there is an item of examination whose second health assessment score is less than the first score threshold X3, if there is no item of examination whose second health assessment score is less than the first score threshold X3, the average score of the second health assessment scores of the items of examination can be taken as the first health assessment score S1.
[0142] For example, in the case of X1 being 60, X2 being 90, and X3 being 100, is 60, is 30, is 30, and M is 8: the expression (1) can be rewritten as the following expression (2):
[0143]
[0144] Example 1, refer to Table 1:
[0145] Table 1
[0146]
[0147] It can be seen that, in Table 1, there are , the first health assessment score S1 can be determined according to
[0148] Example 2, refer to Table 2:
[0149] Table 2
[0150]
[0151] As can be seen in Table 1, there is no , there is The first health assessment score S1 can be determined according to
[0152] Example three, referring to Table 3:
[0153] Table 3
[0154]
[0155] As can be seen in Table 1, there is no , there is The first health assessment score S1 can be determined according to
[0156] Example four, if the second health assessment scores of the check items h1 to h8 are all 100, the first health assessment score is also 100.
[0157] Among them, the first health assessment score can be determined in the above manner for different containers, nodes and clusters.
[0158] In summary, the first health assessment score of the current hierarchical object can be determined in various ways in the present application. In addition, the check item with a smaller second health assessment score has a greater impact on the health status of the current hierarchical object. Therefore, based on expression (1), the first health assessment score can be determined in priority according to the number of check items with smaller second health assessment scores, so that the obtained first health assessment score can more accurately represent the health status of the current hierarchical object.
[0159] In some embodiments, the first health assessment result of the current hierarchical object is determined according to the second health assessment results of the plurality of check items, comprising: obtaining a target weight of a check item in the plurality of check items; determining the first health assessment score according to the second health assessment scores of the plurality of check items and the target weights of the plurality of check items.
[0160] For example, the target weight of check item g1 is 0.5, the second health assessment score of check item g1 is 40, the target weight of check item g2 is 0.1, the second health assessment score of check item g2 is 60, the target weight of check item g3 is 0.4, and the second health assessment score of check item g3 is 80. The first health assessment score calculation method is: 0.5x40+0.1x60+0.4x80=58.
[0161] Further, the target weight of the check item is obtained, including: determining a first standard deviation of the second health assessment score of the check item; determining a first correlation coefficient of the check item and other check items; determining the first weight according to the first standard deviation and the first correlation coefficient; and determining the target weight according to the first weight.
[0162] The plurality of target objects include the current hierarchical object, and the plurality of target objects belong to the same hierarchical level. For example, if the current hierarchical object is cluster 11, the plurality of target objects include cluster 11 and other clusters. If the current hierarchical object is node a1, the plurality of target objects include: node a1, node a2, node a3 and node a4. If the current hierarchical object is container b1, the plurality of target objects include: container b1, container b2 and container b3.
[0163] In some embodiments, the plurality of target objects are included in the same next hierarchical object. For example, the plurality of target objects (node a1, node a2, node a3 and node a4) are included in the same next hierarchical object (cluster 11), and container b1, container b2 and container b3 are included in the same next hierarchical object (node a1).
[0164] It can be understood that one target object corresponds to a plurality of check items, and different target objects and the current hierarchical object have the same check items.
[0165] Further, the target weight of the check item is obtained, including: determining a first standard deviation of the second health assessment score of the check item; determining a first correlation coefficient of the check item and other check items; determining the first weight according to the first standard deviation and the first correlation coefficient; and determining the target weight according to the first weight.
[0166] Exemplarily, referring to Table 4, the second health assessment scores of the check items of each node are shown:
[0167] Table 4
[0168]
[0169] In Table 4, check item 1 is CPU usage, check item 2 is memory usage, check item 3 is OOM, check item 4 is disk usage, and check item 5 is file descriptor usage.
[0170] First, the standard deviation of the second health assessment score of the check item is determined by using the following expression (3):
[0171]
[0172] In expression (3), i and j are both positive integers, denotes the standard deviation of the jth check item (e.g., check item j in Table 4), for example, denotes the standard deviation of check item 1, denotes the standard deviation of check item 2. denotes the average of the second health assessment scores of the plurality of target objects in the jth check item, for example, in Table 4, i.e. points. denotes the second health assessment score of the ith node in the jth check item, for example, in Table 4, the second health assessment score of the 1st check item of the 1st node (node a1) is 60 points.
[0173] It can be understood that the standard deviation of each check item can be determined according to expression (3).
[0174] Then, the first correlation coefficient of the check item with other check items in the plurality of check items is determined by expression (4):
[0175]
[0176] In expression (4), denotes the first correlation coefficient of the jth check item, denotes the second correlation coefficient of the jth check item and other nth check item, in expression (4), n takes other check items in the plurality of check items in turn, wherein n represents the number of other check items in the plurality of check items except the jth check item. Referring to Table 4, if j is 1, denotes the first correlation coefficient of check item 1, denotes the second correlation coefficient of check item 1 and check item 2, denotes the second correlation coefficient of check item 1 and check item 3, denotes the second correlation coefficient of check item 1 and check item 4, denotes the second correlation coefficient of check item 1 and check item 5. Then .
[0177] Further, the second correlation coefficient can be determined according to the second health assessment scores of the plurality of target objects in the corresponding check item, wherein the second correlation coefficient can be determined in a linear fitting manner. In addition, the second correlation coefficient between each check item can also be preset, which is not limited by the present application.
[0178] Then, the information carrying capacity of each check item is determined by expression (5):
[0179]
[0180] In expression (5), denotes the information carrying capacity of the jth check item.
[0181] Then, the first weight of the check item can be determined according to the standard deviation and the first correlation coefficient by using expression (6):
[0182]
[0183] In expression (6), the first weight of the jth check item is represented by
[0184] It can be understood that the above method of determining the first weight of the check item can increase the weight of the check item with a relatively large difference between the target objects, such as the check item 5, because the standard deviation of the node a1, the node a2, the node a3 and the node a4 is relatively large, a higher weight can be obtained, thereby highlighting the influence of the check item with a larger difference between the target objects on the subsequent first health assessment score.
[0185] In addition, the above method of determining the first weight of the check item can also reduce the weight of two relatively related check items; such as the check item 2 and the check item 3 in Table 4, because the change trend of the two check items at different nodes is similar, the second correlation coefficient is large and the conflict degree is small, and the obtained weight will be reduced accordingly. Thus, the influence of the two related check items on the subsequent first health assessment score can be reduced to some extent.
[0186] Further, the above method of determining the first weight of the check item, if the scores of the multiple target objects of a certain check item are all low, but the scores are close, the obtained weight is also relatively low. For example, referring to the check item 3 in Table 4, although most of the nodes are 0 points, because the standard deviation is 0, the obtained weight is also very small, which does not conform to the scenario that the first health assessment score represents the health status.
[0187] In some embodiments, the above first weight can be determined as the target weight.
[0188] In some embodiments, determining the target weight according to the first weight includes: determining an average value of the second health assessment scores of the check item for multiple target objects, the multiple target objects including the current hierarchical object, and the multiple target objects belonging to the same hierarchical level; determining a second weight of the check item according to the average value and the first weight; and performing normalization processing on the second weights of the multiple check items to obtain the target weight of the check item in the multiple check items.
[0189] The average value of the second health assessment scores is as described above. .
[0190] Further, the second weight can be determined according to the following expression (7) and expression (8).
[0191] wherein the average value is determined by expression (7) the reciprocal of :
[0192]
[0193] Then, the second weight corresponding to each first weight is determined by expression (8):
[0194]
[0195] wherein in expression (8), denotes the second weight of the jth inspection item.
[0196] Further, the second weight of each inspection item is normalized, which can be normalized by formula (9), and then the target weight of each inspection item is determined:
[0197]
[0198] In expression (9), denotes the target weight of the jth inspection item, denotes the sum of the second weights of the first to nth inspection items.
[0199] Further, for the inspection items in the plurality of inspection items, the second health assessment score can be multiplied by the corresponding target weight to obtain a new second health assessment score, and then the new second health assessment scores of the plurality of inspection items are added to obtain the first health assessment score.
[0200] For example, with reference to Table 4, if it is determined that the target weight of inspection item 1 is 0.1, the target weight of inspection item 2 is 0.2, the target weight of inspection item 3 is 0.1, the target weight of inspection item 4 is 0.2, and the target weight of inspection item 5 is 0.4, then the first health assessment score of node a1 can be calculated to be 76 points. The first health assessment score of node a2 is 51.2 points. The first health assessment score of node a3 is 58.2 points. The first health assessment score of node a4 is 31.2 points.
[0201] In the embodiments of the present application, the target weight is further determined by expressions (7) to (9), which can achieve that if the plurality of target objects of a certain inspection item are all very low scores, but the scores are close, the target weight obtained will not be relatively low, and thus the accuracy of subsequently determining the first health assessment score can be improved.
[0202] In summary, the present application first needs to detect a single detection index, then obtain the second health assessment result of the inspection item, then combine the second health assessment results of multiple inspection items to obtain the first health assessment result of the current hierarchical object, and further determine the target health assessment result of the target health assessment result, which can reflect the health status of the cluster, node or container.
[0203] The following will be described in detail how to determine the target health assessment result of the current hierarchical object based on the first health assessment result and the target health assessment result of the last hierarchical object:
[0204] Figure 5 A flowchart for determining the target health assessment result is provided in the present application. As shown in Figure 5 As a possible implementation, the above step S205 includes the following steps:
[0205] S501, determining a third health assessment result according to the target health assessment results of the plurality of last hierarchical objects.
[0206] Wherein, the target health assessment result of the last hierarchical object can be obtained from the memory, or determined in real time by referring to Figure 3 , which is not limited.
[0207] In some embodiments, if the target health assessment result includes a target health assessment score, and the third health assessment result includes a third health assessment score, the average value of the target health assessment scores of the plurality of last hierarchical objects is determined as the third health assessment score.
[0208] For example, referring to Figure 1 , if the current hierarchical object is node a1, the target health assessment scores of the last hierarchical objects of node a1 include the target health assessment score k1 of container b1, the target health assessment score k2 of container b2 and the target health assessment score k3 of container b3. The third health assessment score can be obtained as (k1+k2+k3) / 3.
[0209] In some embodiments, determining the third health assessment score according to the target health assessment scores of the plurality of last hierarchical objects includes: determining the third number of last hierarchical objects with a target health assessment score less than a second score threshold among the plurality of last hierarchical objects according to the second score threshold and the target health assessment scores of the plurality of last hierarchical objects; determining the ratio of the third number to a fourth number, the fourth number being the total number of the plurality of last hierarchical objects; determining the third health assessment score according to the ratio threshold, the ratio and the third number.
[0210] Wherein, the ratio threshold and the second score threshold are preset.
[0211] It can be understood that, based on expression (10), the third health assessment score is determined according to the ratio threshold, the ratio and the third quantity.
[0212]
[0213] In expression (10), S3 represents the third health assessment score, N is the fourth quantity, represents the third quantity of the target health assessment score less than the second score threshold R, is the ratio of the third quantity to the fourth quantity, is the ratio threshold, In expression (10), R is less than U, for example, R is 60 and U is 90.
[0214] wherein, when the ratio is greater than or equal to the ratio threshold , , and is a coefficient, X takes , the value range of X is , the value range of the third health assessment score is It can be understood that, when , is 60 points, when , is 0 points. When the ratio is less than the ratio threshold , , and is a coefficient, X takes , the value range of X is , the value range of the third health assessment score is (90, 60), it can be understood that, when tends to 0, tends to 90 points, when tends to , tends to 60 points. In the case of , is the average of the target health assessment scores of each upper level object, S represents the sum of the target health assessment scores of each upper level object.
[0215] In the embodiments of the present application, the third health assessment score can be determined in various ways according to the target health assessment scores of the upper level objects.
[0216] S502, according to the first health assessment result and the third health assessment result, determining the target health assessment result of the current level object.
[0217] In some embodiments, an average of the first health assessment score and the third health assessment score can be determined as the target health assessment score.
[0218] In some embodiments, a third weight for the first health assessment score and a fourth weight for the third health assessment score can be obtained, and then a first product of the first health assessment score and the third weight, a second product of the third health assessment score and the fourth weight, and a sum of the first product and the second product can be determined as the target health assessment score of the current hierarchical object. The third weight and the fourth weight are preset.
[0219] It can be understood that the target health assessment score of the current hierarchical object can be determined in various ways, and no limitation is imposed thereon. In addition, the target health assessment score of the current hierarchical object can be more accurately determined according to the target health assessment score of the previous hierarchical object.
[0220] In summary, the target health assessment results of the cluster, the node and the container are calculated by combining various methods, so that the health status of the cluster can be monitored and accurately evaluated in a timely manner. Through the abnormal detection of the inspection items of the cluster, the seasonal fluctuations, random fluctuations, sudden increases and sudden decreases of the cluster and other special situations can be effectively identified. In addition, by combining the health assessment results of the cluster at different levels, the influence degree of the abnormal condition on the cluster can be analyzed in depth. The process of determining the target health assessment result not only focuses on a single inspection item, but also considers the relevance and interaction between the inspection items, thereby providing a more comprehensive perspective. For example, when the CPU usage rate abnormally rises, the memory utilization rate also rises, and then more in-depth resource allocation and load balancing may be required to ensure the stability of the system. The comprehensive evaluation method effectively integrates the influence of each inspection item by determining the weight, correlation coefficient and the like, and finally obtains a true and accurate target health assessment result.
[0221] Figure 6 A structural schematic diagram of a health status evaluation device of a cluster is provided in the present application. As shown in Figure 6 the health status evaluation device 60 of the cluster can include the following modules:
[0222] The first acquisition module 61 is configured to acquire a plurality of detection indexes of a current hierarchical object.
[0223] The first determination module 62 is configured to determine a first health assessment result of the current hierarchical object according to the plurality of detection indexes.
[0224] The second acquisition module 63 is configured to acquire a target health assessment result of a previous hierarchical object if the current hierarchical object exists.
[0225] The second determining module 64 is configured to determine the target health assessment result of the current hierarchical object according to the first health assessment result and the target health assessment result of the upper hierarchical object, and the target health assessment result of the current hierarchical object represents the health status of the current hierarchical object.
[0226] The third determining module 65 is configured to determine the first health assessment result as the target health assessment result of the current hierarchical object if the current hierarchical object does not have the upper hierarchical object.
[0227] In the embodiments of the present application, the upper hierarchical object of the cluster is the plurality of nodes included in the cluster, the upper hierarchical object of the node is the plurality of containers included in the node, and the container does not have the upper hierarchical object.
[0228] Optionally, the first determining module 62 is specifically configured to:
[0229] The plurality of detection indexes are preprocessed to obtain a plurality of inspection items, and each inspection item in the plurality of inspection items corresponds to at least one detection index;
[0230] For each inspection item in the plurality of inspection items, a second health assessment result of the inspection item is determined according to the at least one detection index corresponding to the inspection item;
[0231] The first health assessment result of the current hierarchical object is determined according to the second health assessment results of the plurality of inspection items.
[0232] Optionally, the first health assessment result includes a first health assessment score, and the second health assessment result includes a second health assessment score, and when the first determining module 62 determines the first health assessment result of the current hierarchical object according to the second health assessment results of the plurality of inspection items, the first determining module 62 is specifically configured to:
[0233] According to the plurality of first score thresholds and the second health assessment score, a first number of inspection items in the plurality of inspection items in different score intervals is determined, and different first score thresholds in the at least one first score threshold are different in size;
[0234] The first health assessment score of the current hierarchical object is determined according to the first number and a second number, and the second number is the total number of the plurality of inspection items.
[0235] Optionally, the first health assessment result includes a first health assessment score, and the second health assessment result includes a second health assessment score, and when the first determining module 62 determines the first health assessment result of the current hierarchical object according to the second health assessment results of the plurality of inspection items, the first determining module 62 is specifically configured to:
[0236] For each inspection item in the plurality of inspection items, a target weight of the inspection item is obtained;
[0237] The first health assessment score is determined according to the second health assessment scores of the plurality of check items and target weights of the plurality of check items.
[0238] Optionally, the first determining module 62, when acquiring the target weight of the check item, is specifically configured to:
[0239] determine a standard deviation of the second health assessment score of the check item;
[0240] determine a first correlation coefficient of the check item and other check items in the plurality of check items;
[0241] determine the first weight of the check item according to the standard deviation and the first correlation coefficient;
[0242] determine the target weight according to the first weight.
[0243] Optionally, the first determining module 62, when determining the target weight according to the first weight, is specifically configured to:
[0244] determine an average value of the second health assessment scores of the plurality of target objects for the check item, the plurality of target objects including the current hierarchical object and belonging to the same hierarchical level;
[0245] determine the second weight of the check item according to the average value and the first weight;
[0246] normalize the second weights of the plurality of check items to obtain the target weight of the check item in the plurality of check items.
[0247] Optionally, the second health assessment result includes the second health assessment score, and the first determining module 62, when determining the second health assessment result of the check item according to the at least one detection index corresponding to the check item, is specifically configured to:
[0248] acquire an index value threshold corresponding to the detection index in the at least one check item corresponding to the check item;
[0249] determine a size relationship between the detection index and the index value threshold;
[0250] determine the second health assessment score of the corresponding check item according to the size relationship corresponding to the at least one check item, the size relationship corresponding to the at least one check item and the second health assessment score having a corresponding relationship.
[0251] Optionally, the first determining module 62, when determining the second health assessment result of the check item according to the at least one detection index corresponding to the check item, is specifically configured to:
[0252] process the at least one detection index through a preconfigured detection index processing model to obtain the second health assessment result of the check item.
[0253] Optionally, the current hierarchical object comprises: a plurality of previous hierarchical objects, the second determining module 64 is specifically used for
[0254] According to the target health assessment result of the plurality of previous hierarchical objects, a third health assessment result is determined.
[0255] According to the first health assessment result and the third health assessment result, a target health assessment result of the current hierarchical object is determined.
[0256] Optionally, the target health assessment result comprises a target health assessment score, the third health assessment result comprises a third health assessment score, and when the second determining module 64 determines the third health assessment result according to the target health assessment result of the plurality of previous hierarchical objects, the second determining module 64 is specifically used for:
[0257] According to the second score threshold and the target health assessment score of the plurality of previous hierarchical objects, a third quantity of previous hierarchical objects with a target health assessment score less than the second score threshold is determined from the plurality of previous hierarchical objects.
[0258] A ratio of the third quantity to a fourth quantity is determined, and the fourth quantity is a total quantity of the plurality of previous hierarchical objects.
[0259] According to the ratio threshold, the ratio, and the third quantity, the third health assessment score is determined.
[0260] The cluster health state evaluation device provided in the application is used to execute the cluster health state evaluation method embodiment, and has similar implementation principles and technical effects, which will not be described again.
[0261] Figure 7 A hardware structure schematic diagram of an electronic device provided in the application is provided. Figure 7 The electronic device 70 shown comprises a memory 71, a processor 72, and a communication interface 73. The memory 71, the processor 72, and the communication interface 73 are in communication connection with each other. For example, the memory 71, the processor 72, and the communication interface 73 can adopt a network connection mode to realize communication connection. Alternatively, the electronic device 70 can further comprise a bus 74. The memory 71, the processor 72, and the communication interface 73 realize communication connection with each other through the bus 74. Figure 7 The electronic device 70 realizes communication connection among the memory 71, the processor 72, and the communication interface 73 through the bus 74.
[0262] The memory 71 can be a Read Only Memory (ROM), a static storage device, a dynamic storage device, or a Random Access Memory (RAM). The memory 71 can store programs, when the programs stored in the memory 71 are executed by the processor 72, the processor 72 and the communication interface 73 are configured to execute the health status evaluation method of the cluster of any of the preceding embodiments. The memory can also store data required by the health status evaluation method of the cluster.
[0263] The processor 72 can be a general purpose CPU, a microprocessor, an Application Specific Integrated Circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits.
[0264] The processor 72 can also be an integrated circuit chip having a processing capability of signals. In the implementation process, the health status evaluation method of the cluster of the present application can be completed by the integrated logic circuit of hardware in the processor 72 or the instructions in the form of software. The processor 72 described above can also be a general purpose processor, a digital signal processor (DSP), an Application Specific Integrated Circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, which can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the methods disclosed in the embodiments of the present application can be directly embodied as a hardware coding processor for execution, or a combination of hardware and software modules in the coding processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register, or other mature storage media in the art. The storage medium is located in the memory 71, and the processor 72 reads the information in the memory 71, and combines the hardware to complete the health status evaluation method of the cluster of the present application.
[0265] The communication interface 73 uses a transceiver module such as but not limited to a transceiver to realize the communication between the electronic device 50 and other devices or communication networks. For example, the data set can be obtained through the communication interface 53.
[0266] When the electronic device 70 includes the bus 74, the bus 74 can include a path that transmits information between the various components (e.g., the memory 71, the processor 72, the communication interface 73) of the electronic device 70.
[0267] The application further provides a computer readable storage medium, which can include a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes. Specifically, the computer readable storage medium stores program instructions, which are used for the method in the above embodiments.
[0268] The application further provides a program product, which includes execution instructions stored in a readable storage medium. At least one processor of an electronic device can read the execution instructions from the readable storage medium, and the at least one processor executes the execution instructions to make the electronic device implement the cluster health state evaluation method provided in the various embodiments.
[0269] The term "a plurality of" herein refers to two or more. The term "and / or" herein merely describes an association relationship of associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " herein generally represents that the associated objects before and after it are in an "or" relationship; in the formula, the character " / " represents that the associated objects before and after it are in a "division" relationship. In addition, it should be understood that in the description of the application, the terms "first", "second", etc. are only used for the purpose of distinguishing the description and cannot be understood as indicating or implying relative importance or indicating or implying an order.
[0270] It can be understood that the various numerical numbers involved in the embodiments of the application are only for the convenience of differentiation and do not limit the scope of the embodiments of the application. Finally, it should be pointed out that: the above embodiments are only used to illustrate the technical solutions of the application, and not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the application.
Claims
1. A method for assessing the health state of a cluster, characterized in that, The method comprises: obtaining a plurality of detection indexes of a current hierarchical object; determining a first health assessment result of the current hierarchical object according to the plurality of detection indexes, the first health assessment result comprising a first health assessment score; if the current hierarchical object has a previous hierarchical object, obtaining a target health assessment result of the previous hierarchical object; determining a target health assessment result of the current hierarchical object according to the first health assessment result and the target health assessment result of the previous hierarchical object, the target health assessment result of the current hierarchical object representing a health state of the current hierarchical object; if the current hierarchical object does not have a previous hierarchical object, determining the first health assessment result as the target health assessment result of the current hierarchical object; wherein, if the current hierarchical object is a cluster, the previous hierarchical object of the cluster is a plurality of nodes included in the cluster; if the current hierarchical object is a node, the previous hierarchical object of the node is a plurality of containers included in the node; if the current hierarchical object is a container, the container does not have a previous hierarchical object; the determining of the first health assessment result of the current hierarchical object according to the plurality of detection indexes comprises: preprocessing the plurality of detection indexes to obtain a plurality of inspection items, an inspection item in the plurality of inspection items corresponding to at least one detection index; for an inspection item in the plurality of inspection items, determining a second health assessment result of the inspection item according to the at least one detection index corresponding to the inspection item, the second health assessment result comprising a second health assessment score; determining the first health assessment result of the current hierarchical object according to the second health assessment results of the plurality of inspection items; the determining of the first health assessment result of the current hierarchical object according to the second health assessment results of the plurality of inspection items comprises: determining, according to a plurality of first score thresholds and the second health assessment score, a first quantity of inspection items in which the second health assessment score is in different score intervals among the plurality of inspection items, different first score thresholds in the plurality of first score thresholds having different sizes, and the different score intervals being divided according to the first score thresholds; determining, based on a preset expression, the first health assessment score of the current hierarchical object according to the plurality of first score thresholds, the first quantity, and a second quantity, the second quantity being a total quantity of the plurality of inspection items; the current hierarchical object comprises a plurality of previous hierarchical objects, and the determining of the target health assessment result of the current hierarchical object according to the first health assessment result and the target health assessment result of the previous hierarchical object comprises: determining a third health assessment result according to the target health assessment results of the plurality of previous hierarchical objects; determining the target health assessment result of the current hierarchical object according to the first health assessment result and the third health assessment result; the target health assessment result comprises a target health assessment score, the third health assessment result comprises a third health assessment score, and the determining of the third health assessment result according to the target health assessment results of the plurality of previous hierarchical objects comprises: determining, according to the second score threshold and the target health assessment scores of the plurality of upper-level objects, a third quantity of upper-level objects in the plurality of upper-level objects whose target health assessment scores are less than the second score threshold; determining a ratio of the third quantity to a fourth quantity, the fourth quantity being a total quantity of the plurality of upper-level objects; determining the third health assessment score according to a ratio threshold, the ratio, and the third quantity.
2. The method of claim 1, wherein, The first health assessment result includes a first health assessment score, and the second health assessment result includes a second health assessment score. The first health assessment result of the current level object is determined according to the second health assessment result of the plurality of inspection items, including: obtaining a target weight of the inspection item in the plurality of inspection items; determining the first health assessment score according to the second health assessment scores of the plurality of inspection items and the target weights of the plurality of inspection items.
3. The method of claim 2, wherein, The target weight of the inspection item is obtained, including: determining a standard deviation of the second health assessment score of the inspection item; determining a first correlation coefficient of the inspection item and other inspection items in the plurality of inspection items; determining a first weight of the inspection item according to the standard deviation and the first correlation coefficient; determining the target weight according to the first weight.
4. The method of health state assessment of a cluster according to claim 3, characterized in that, The target weight is determined according to the first weight, including: determining an average value of the second health assessment scores of the plurality of target objects for the inspection item, the plurality of target objects including the current level object, and the plurality of target objects belonging to the same level; determining a second weight of the inspection item according to the average value and the first weight; normalizing the second weights of the plurality of inspection items to obtain the target weight of the inspection item in the plurality of inspection items.
5. The method of claim 1, wherein, The second health assessment result includes a second health assessment score. The second health assessment result of the inspection item is determined according to at least one detection index corresponding to the inspection item, including: obtaining an index value threshold corresponding to the detection index in the at least one inspection item corresponding to the inspection item; determining a size relationship between the detection index and the index value threshold; determining the second health assessment score of the corresponding inspection item according to the size relationship of the at least one inspection item, the size relationship of the at least one inspection item and the second health assessment score having a corresponding relationship.
6. The method of claim 1, wherein, The second health assessment result of the inspection item is determined according to the at least one detection index corresponding to the inspection item, including: processing the at least one detection index through a preconfigured detection index processing model to obtain the second health assessment result of the inspection item.
7. A health status assessment device for a cluster, characterized in that, including: a first obtaining module, configured to obtain a plurality of detection indexes of a current level object; a first determining module, configured to determine a first health assessment result of the current level object according to the plurality of detection indexes, the first health assessment result including a first health assessment score; a second obtaining module, configured to obtain a target health assessment result of an upper-level object of the current level object if the current level object has the upper-level object; The second determining module is configured to determine a target health assessment result of the current hierarchical object according to the first health assessment result and a target health assessment result of the upper hierarchical object, the target health assessment result of the current hierarchical object representing a health status of the current hierarchical object. The third determining module is configured to determine the first health assessment result as the target health assessment result of the current hierarchical object if the current hierarchical object does not have an upper hierarchical object. If the current hierarchical object is a cluster, the upper hierarchical object of the cluster is a plurality of nodes included in the cluster; if the current hierarchical object is a node, the upper hierarchical object of the node is a plurality of containers included in the node; and if the current hierarchical object is a container, the container does not have an upper hierarchical object. The first determining module is specifically configured to pre-process the plurality of detection indexes to obtain a plurality of inspection items, and an inspection item in the plurality of inspection items corresponds to at least one detection index. For an inspection item in the plurality of inspection items, a second health assessment result of the inspection item is determined according to at least one detection index corresponding to the inspection item, and the second health assessment result includes a second health assessment score. The first determining module is specifically configured to: determine, according to a plurality of first score thresholds and the second health assessment score, a first quantity of inspection items in which the second health assessment score is in different score intervals in the plurality of inspection items, different first score thresholds in the plurality of first score thresholds have different sizes, and the different score intervals are divided according to the first score thresholds; determine, based on a preset expression, the first health assessment score of the current hierarchical object according to the plurality of first score thresholds, the first quantity, and a second quantity, the second quantity being a total quantity of the plurality of inspection items. The current hierarchical object includes a plurality of upper hierarchical objects, and the second determining module is specifically configured to: determine a third health assessment result according to target health assessment results of the plurality of upper hierarchical objects; determine the target health assessment result of the current hierarchical object according to the first health assessment result and the third health assessment result; The target health assessment result includes a target health assessment score, the third health assessment result includes a third health assessment score, and the second determining module is specifically configured to: determine, according to a second score threshold and target health assessment scores of the plurality of upper hierarchical objects, a third quantity of upper hierarchical objects in which the target health assessment score is less than the second score threshold in the plurality of upper hierarchical objects; determine a ratio of the third quantity to a fourth quantity, the fourth quantity being a total quantity of the plurality of upper hierarchical objects; and determine the target health assessment result of the current hierarchical object according to the first health assessment result and the third health assessment result. The third health assessment score is determined based on the ratio threshold, the ratio, and the third number.
8. An electronic device, comprising: Comprising: a processor and a memory; the processor is in communication connection with the memory; the memory stores computer instructions; the processor executes the computer instructions stored in the memory to implement the method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method according to any one of claims 1-6.
10. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program is executed by the processor to implement the method according to any one of claims 1-6.
Citation Information
Patent Citations
Health degree assessment method and device of IT system, electronic equipment and storage medium
CN115599650A
Risk assessment method, device, equipment and medium
CN116881906A
Cluster health degree assessment method and device, electronic equipment and storage medium
CN116962229A
Method and device for determining tenant health degree of container cloud platform
CN116962417A