Cluster state monitoring method and device
By constructing and training a cluster status monitoring model, and combining the indicator data of container business, cluster service status and computer room infrastructure, the problem of poor correlation in the existing technology is solved, more accurate and efficient cluster status monitoring is achieved, and business stability is ensured. sex.
Patent Information
- Application Number
- CN202411410433.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-21
AI Technical Summary
When monitoring the status of container clusters in the prior art, the focus is mainly on the service status of the cluster itself, and the upper-level container services and computer room infrastructure cannot be effectively associated, resulting in the inability to accurately remind the cluster state, affecting business stability.
By obtaining the monitoring indicator data of the business on the container, the service status data of the cluster, and the operation indicator data of the computer room infrastructure, the cluster's various indicator characteristic data are constructed, and the cluster status monitoring model is trained to improve the accuracy and efficiency of monitoring.
It achieves more accurate and efficient monitoring of cluster status, can quickly locate abnormal problems, and ensures the stability of container services.
Smart Images

Figure CN119336535A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a cluster status monitoring method and device. Background Art
[0002] A container cluster, such as a Kubernetes cluster, consists of multiple services. The cluster status can be monitored through the port status of the service, and the cluster status can be reflected through the indicator alarm threshold of the service to implement an alarm.
[0003] However, the above method only focuses on the service status of the cluster itself, and has a poor correlation with the business of the upper-level container. There is a mismatch between the alarm threshold configured in the cluster and the business operation status of the container. The service status of the cluster itself is poorly correlated with the underlying infrastructure, and it is impossible to determine the impact of the underlying infrastructure on the business, which leads to the inability to accurately remind the cluster status and the inability to ensure the stability of the upper-level container business. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a cluster status monitoring method and device, which can associate the services of the cluster with the upper-level container business and the computer room infrastructure, train a cluster status monitoring model, and use the model to monitor the cluster status, thereby improving the accuracy and efficiency of cluster status monitoring, achieving faster abnormal problem location, and ensuring the stability of container business.
[0005] To achieve the above object, according to one aspect of an embodiment of the present invention, a training method for a cluster state monitoring model is provided, comprising:
[0006] For each of the multiple historical moments, obtain each business running on each container in the cluster and each monitoring indicator data of each business;
[0007] Obtain service status indicator data of the cluster, operation indicator data of the computer room infrastructure corresponding to each container, and health indicator results of the cluster;
[0008] Constructing various indicator feature data of the cluster according to various monitoring indicator data of each business, the service status indicator data of the cluster and the operation indicator data;
[0009] A cluster status monitoring model is trained based on the various indicator feature data of the cluster at each historical moment in multiple historical moments and the health indicator results of the cluster.
[0010] Optionally, obtaining the health indicator result of the cluster includes:
[0011] For each business, according to each monitoring indicator data of the business and the weight of each monitoring indicator, the health indicator result of the business is obtained;
[0012] The health indicator result of the cluster is obtained according to the health indicator result of each business in each business and the preset rules.
[0013] Optionally, obtaining the health indicator result of the cluster according to the health indicator result of each business in each business and a preset rule includes:
[0014] Determine whether there is a target business whose health indicator result is less than or equal to the preset health indicator threshold;
[0015] If not, calculate the health indicator result of the cluster according to the health indicator result of each business and the weight of each business;
[0016] If so, the number of the target services is obtained, and when the number of the target services is greater than or equal to a preset number threshold, the health indicator result of the cluster is calculated according to the health indicator results of each target service.
[0017] Optionally, the service status indicator data of the cluster includes service status data and service monitoring indicator data of the cluster, the service status data includes port status data of each service in the cluster, and the service monitoring indicator data includes monitoring indicator data of each service in the cluster.
[0018] Optionally, constructing various indicator feature data of the cluster according to various monitoring indicator data of each business, the service status indicator data of the cluster and the operation indicator data includes:
[0019] For each business, calculate the health indicator result of the business according to each monitoring indicator data of the business and the weight of each monitoring indicator;
[0020] Calculate the characteristic importance values of the health indicators of each business, the port status of each service, the monitoring indicators of each service, and the operating indicators of the computer room infrastructure corresponding to each container;
[0021] According to the order of feature importance values from large to small, each indicator feature data of the cluster is constructed.
[0022] According to another aspect of an embodiment of the present invention, a cluster status monitoring method is provided, including:
[0023] Obtaining various indicator characteristic data of the cluster at the current moment;
[0024] Inputting each indicator characteristic data of the cluster at the current moment into the cluster status monitoring model to obtain the health indicator result of the cluster at the current moment;
[0025] The cluster state monitoring model is obtained according to the cluster state monitoring model training method of the embodiment of the present invention.
[0026] According to another aspect of an embodiment of the present invention, a training device for a cluster status monitoring module is provided, comprising:
[0027] A first acquisition module acquires, for each historical moment among the multiple historical moments, each business running on each container of the cluster and each monitoring indicator data of each business;
[0028] A second acquisition module acquires the service status indicator data of the cluster, the operation indicator data of the computer room infrastructure corresponding to each container, and the health indicator result of the cluster;
[0029] A construction module, which constructs various indicator feature data of the cluster according to various monitoring indicator data of each business, the service status indicator data of the cluster and the operation indicator data;
[0030] The training module trains a cluster status monitoring model according to the characteristic data of each indicator of the cluster at each historical moment in multiple historical moments and the health indicator result of the cluster.
[0031] According to another aspect of an embodiment of the present invention, a cluster status monitoring device is provided, including:
[0032] The third acquisition module acquires each indicator characteristic data of the cluster at the current moment;
[0033] A determination module inputs each indicator characteristic data of the cluster at the current moment into a cluster status monitoring model to obtain a health indicator result of the cluster at the current moment;
[0034] The cluster state monitoring model is obtained according to the cluster state monitoring model training method of the embodiment of the present invention.
[0035] According to another aspect of an embodiment of the present invention, there is provided an electronic device, including:
[0036] one or more processors;
[0037] a storage device for storing one or more programs,
[0038] When the one or more programs are executed by the one or more processors, the one or more processors implement the cluster state monitoring model training method or cluster state monitoring method provided by the present invention.
[0039] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the training method of the cluster state monitoring model or the cluster state monitoring method provided by the present invention is implemented.
[0040] One embodiment of the above invention has the following advantages or beneficial effects: the training method of the cluster status monitoring model provided by the embodiment of the present invention obtains, for each historical moment in each historical moment, each business running on each container of the cluster and each monitoring indicator data of each business, obtains the service status indicator data of the cluster, the operation indicator data of the computer room infrastructure corresponding to each container, and the health indicator result of the cluster, and then constructs each indicator feature data of the cluster; according to each indicator feature data of the cluster at each historical moment in multiple historical moments and the health indicator result of the cluster, the cluster status monitoring model is trained. The training method obtains the monitoring indicator data of the business on the cluster container, the service status data of the cluster, and the operation indicator data of the computer room infrastructure corresponding to the container, and conducts combined analysis to construct a cluster status monitoring model, so as to improve the accuracy and efficiency of cluster status prediction, realize the location of abnormal problems, and promptly repair and process the fault point to ensure the stability of the business.
[0041] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0043] Figure 1 is a schematic diagram of the main process of a training method for a cluster state monitoring model according to an embodiment of the present invention;
[0044] Figure 2 is a schematic diagram of the main process of a cluster status monitoring method according to an embodiment of the present invention;
[0045] Figure 3 is a schematic diagram of main modules of a training device for a cluster state monitoring model according to an embodiment of the present invention;
[0046] Figure 4 is a schematic diagram of main modules of a cluster status monitoring device according to an embodiment of the present invention;
[0047] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0048] Figure 6It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0049] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0050] Container clusters such as Kubernetes (k8s, an open source container orchestration platform) clusters are composed of multiple services. The existing Kubernetes-related monitoring and alarms monitor the service status of Kubernetes to determine whether the service is normal, and monitor and alarm the threshold of a certain technical indicator to control the status of the Kubernetes cluster. However, the most obvious disadvantage of this method is that it only focuses on the service status of Kubernetes itself, and has a poor correlation with the business of the upper-level container. The alarms configured in Kubernetes are difficult to feedback the container business situation, which will result in the alarm reaching the alarm threshold without affecting the business operation, thus turning the alarm into a false alarm. On the other hand, the container business party may perceive the abnormality of the Kubernetes cluster before the Kubernetes operator.
[0051] In addition, the correlation between Kubernetes services and the underlying infrastructure of the computer room is not strong. When evaluating the impact of failures such as the computer room network, we can only determine the impact scope of certain hardware, and it is difficult to evaluate the impact on the upper-level business.
[0052] Based on the above technical problems, the embodiments of the present invention provide a cluster status monitoring method and device to accurately monitor the cluster status in real time to ensure service stability.
[0053] Figure 1 is a schematic diagram of the main process of a training method for a cluster state monitoring model according to an embodiment of the present invention, such as Figure 1 As shown, the training method of the cluster status monitoring model includes the following steps:
[0054] Step S101: for each historical moment among the multiple historical moments, obtain each business running on each container of the cluster and each monitoring indicator data of each business;
[0055] Step S102: Obtain service status indicator data of the cluster, operation indicator data of the computer room infrastructure corresponding to each container, and health indicator results of the cluster;
[0056] Step S103: constructing various indicator characteristic data of the cluster according to various monitoring indicator data of each business, service status indicator data and operation indicator data of the cluster;
[0057] Step S104: training a cluster status monitoring model according to each indicator feature data of the cluster at each historical moment in the plurality of historical moments and the health indicator result of the cluster.
[0058] In the embodiment of the present invention, the cluster may be a Kubernetes (k8s, an open source container orchestration platform) cluster, and the k8s cluster status may be monitored using the cluster status monitoring model.
[0059] When training a cluster status monitoring model, first obtain a training data set, which includes training data at each historical moment in multiple historical moments. The training data at each historical moment includes each business running on each container in the cluster and each monitoring indicator data of each business, the service status indicator data of the cluster, the operation indicator data of the computer room infrastructure corresponding to each container, and the health indicator result of the cluster. Among them, the health indicator result of the cluster can be the health of the cluster. The health of the cluster reflects the state of the cluster. If the health of the cluster is high, the cluster state is normal. If the health of the cluster is low, the cluster state is abnormal. The training data set includes positive samples and negative samples. The positive sample is the training data whose health indicator result of the cluster indicates that the cluster state is normal, and the negative sample includes the training data whose health indicator result of the cluster indicates that the cluster state is abnormal.
[0060] In an embodiment of the present invention, various services are running on various containers of the cluster. Each service can be running on one or more containers. The corresponding service is running on each container. By monitoring each service, various monitoring indicator data of each service can be obtained. The various monitoring indicator data may include availability, tp99 (the minimum time required to meet ninety-nine percent of network requests), traffic, etc.
[0061] After obtaining the monitoring indicator data of each business in each business, store the monitoring indicator data of each business in the storage pool. The storage pool includes multiple storage software. Different storage software or a combination of storage software can be selected according to the data volume and data timeliness requirements. Storage software such as Prometheus, InfluxDB, Elasticsearch, etc. can store and display short-term storage and long-term storage in a hierarchical manner to improve data query efficiency and data storage flexibility. The monitoring indicator data stored in short-term storage can be used for model training, and the monitoring indicator data stored in long-term storage can be used to tune the model to improve the accuracy of model prediction.
[0062] A cluster is composed of multiple services. For example, a k8s cluster is composed of kube-apiserver, kube-scheduler, kube-controller-manager, network plug-in, etcd, etc. The service status indicator data of the cluster includes the service status data and service monitoring indicator data of the cluster. The service status data includes the port status data of each service in the cluster, and the service monitoring indicator data includes the monitoring indicator data of each service in the cluster. The port status data of each service includes the status data indicating whether the port of each service is alive, and the monitoring indicator data of each service includes the monitoring indicator data of each service used to reflect the cluster status. For example, the request latency (apiserver_request_latencies) monitoring indicator of the kube-apiserver service in the k8s cluster reflects the time required for the kube-apiserver to process a request, which usually includes the average latency, median latency, and 99th percentile latency of the request.
[0063] Each container has a corresponding physical machine, and each physical machine has a corresponding computer room infrastructure, so that each container has corresponding operating indicator data of the computer room infrastructure. The operating indicator data of the computer room infrastructure may include operating indicator data of the switch, network status data, etc.
[0064] In the embodiment of the present invention, obtaining the health indicator result of the cluster includes:
[0065] For each business, the health indicator results of the business are obtained based on the monitoring indicator data of the business and the weight of each monitoring indicator;
[0066] The health indicator results of the cluster are obtained based on the health indicator results of each business in each business and the preset rules.
[0067] In an embodiment of the present invention, the health indicator results of the cluster can be obtained by manual labeling, or the health indicator results of the cluster can be obtained according to the monitoring indicator data of each business in each business. Specifically, for each business, first identify the various monitoring indicators that play a key role from many indicators that affect the business, and then determine the weight of each monitoring indicator according to the strength of the impact of each monitoring indicator on the business availability. For example, the various monitoring indicators of business A include TP99, availability and traffic, and the weights of these three monitoring indicators are 50%, 30%, and 10%, respectively. According to the various monitoring indicator data of the business and the weight of each monitoring indicator, the health indicator results of the business are obtained by weighted summation. Then, according to the health indicator results of each business and the preset rules, the health indicator results of the cluster can be obtained. For example, according to the health indicator results of each business and the weight of each business, the health indicator results of the cluster can be obtained by weighted summation.
[0068] In the embodiment of the present invention, the health indicator result of the cluster is obtained according to the health indicator result of each service in each service and the preset rules, including:
[0069] Determine whether there is a target business whose health indicator result is less than or equal to the preset health indicator threshold;
[0070] If not, calculate the health indicator result of the cluster based on the health indicator result of each business and the weight of each business;
[0071] If so, the number of target services is obtained, and when the number of target services is greater than or equal to a preset number threshold, the health indicator result of the cluster is calculated according to the health indicator results of each target service.
[0072] In an embodiment of the present invention, it is possible to pre-determine whether there is a target business whose health indicator result is less than or equal to a preset health indicator threshold. If so, it indicates that there is an abnormal business, and the number of target businesses is obtained. If the number of target businesses is greater than or equal to the preset number threshold, it indicates that the cluster state is abnormal, and the health indicator result of the cluster can be calculated based on the health indicator results of each target business and the weight of each target business; if not, the health indicator result of the cluster is obtained by weighted summation based on the health indicator results of each business and the weight of each business. Among them, the weight of each business can be pre-configured, and can also be determined based on the number of containers corresponding to the business. The more containers the business corresponds to, the greater the weight of the business.
[0073] In an embodiment of the present invention, after obtaining the monitoring indicator data of each business, the service status indicator data of the cluster, and the operation indicator data of the computer room infrastructure corresponding to each container, the various feature data of the cluster can be constructed based on the various indicators. In order to improve the accuracy of the prediction of the cluster status monitoring model, machine learning techniques such as feature extraction and feature selection can be used to construct various indicator features of the cluster, and a machine learning model can be selected based on business needs. The machine learning model is trained using a training data set to obtain a cluster status monitoring model.
[0074] In an embodiment of the present invention, various indicator feature data of the cluster are constructed according to various monitoring indicator data of each business, the service status indicator data of the cluster and the operation indicator data, including:
[0075] For each business, calculate the health indicator result of the business according to each monitoring indicator data of the business and the weight of each monitoring indicator;
[0076] Calculate the characteristic importance values of the health indicators of each business, the port status of each service, the monitoring indicators of each service, and the operating indicators of the computer room infrastructure corresponding to each container;
[0077] According to the order of feature importance values from large to small, each indicator feature data of the cluster is constructed.
[0078] In an embodiment of the present invention, the feature importance values of the health indicators of each business, the port status of each service, the monitoring indicators of each service, and the operating indicators of the computer room infrastructure corresponding to each container, i.e., the feature importance scores, can be calculated by an XGBoost (eXtreme Gradient Boosting) model, and then the indicators are sorted in descending order according to the feature importance scores, and feature selection is performed based on the sorting results to select a preset number of indicator features with top rankings, for example, the indicator features include the monitoring indicators of business A, the port status indicators of service B of the cluster, the monitoring indicators of service C of the cluster, the operating indicators of switch D, etc.; and then the indicator feature data of the cluster are constructed based on the indicator features, wherein the feature importance scores can be obtained by one or more calculation methods selected according to the feature usage frequency, performance gain, and coverage.
[0079] In an embodiment of the present invention, when calculating the characteristic importance values of the health indicators of each business, the port status of each service, the monitoring indicators of each service, and the operating indicators of the computer room infrastructure corresponding to each container, the health indicator results of each business, the port status data of each service, the monitoring indicator data of each service, and the operating indicator data of the computer room infrastructure corresponding to each container are firstly subjected to characteristic conversion, and the converted indicator data are respectively obtained, and then the characteristic importance values of each indicator are calculated according to the converted indicator data. For example, the port status data of each service can be characteristically converted by a unique hot encoding method. If the port status data of a service is alive, the port status data of the service is 1 after conversion. If the port status data of the service is not alive, the port status data of the service is 0 after conversion.
[0080] In an embodiment of the present invention, after constructing the characteristic data of each indicator of the cluster, the machine learning model is trained according to the characteristic data of each indicator at each historical moment in multiple historical moments and the health indicator results of the cluster to obtain a cluster status monitoring model, wherein the machine learning model can adopt a model structure that can reflect the connection between the data, such as a linear regression model, a decision tree model, a neural network model, etc., and the neural network can be Long short-term memory (LSTM, long short-term memory network).
[0081] The training method of the cluster status monitoring model provided by the embodiment of the present invention obtains, for each historical moment in each historical moment, each business running on each container of the cluster and each monitoring indicator data of each business, obtains the service status indicator data of the cluster, the operation indicator data of the computer room infrastructure corresponding to each container, and the health indicator results of the cluster, and then constructs each indicator feature data of the cluster; according to each indicator feature data of the cluster at each historical moment in multiple historical moments and the health indicator results of the cluster, the cluster status monitoring model is trained. The training method obtains the monitoring indicator data of the business on the cluster container, the service status data of the cluster, and the operation indicator data of the computer room infrastructure corresponding to the container, and conducts combined analysis to construct a cluster status monitoring model, so as to improve the accuracy and efficiency of cluster status prediction, realize the location of abnormal problems, and promptly repair and process the fault point to ensure the stability of the business.
[0082] According to another aspect of the embodiment of the present invention, Figure 2 As shown, a cluster status monitoring method is provided, including:
[0083] Step S201: Obtaining characteristic data of each indicator of the cluster at the current moment;
[0084] Step S202: inputting each indicator characteristic data of the cluster at the current moment into the cluster status monitoring model to obtain the health indicator result of the cluster at the current moment;
[0085] The cluster state monitoring model is obtained according to the cluster state monitoring model training method of the embodiment of the present invention.
[0086] In an embodiment of the present invention, after the cluster status monitoring model is trained, the cluster status can be monitored in real time based on the cluster status monitoring model. First, each business running on each container of the cluster at the current moment and each monitoring indicator data of each business are obtained, and the service status indicator data of the cluster and the operation indicator data of the computer room infrastructure corresponding to each container are obtained. Then, based on the various indicator characteristics of the constructed cluster, the various indicator feature data of the cluster at the current moment are obtained, and the various indicator feature data of the cluster at the current moment are input into the cluster status monitoring model, and the health indicator result of the cluster is output. If the health indicator result of the cluster indicates that the cluster status is abnormal, the fault point that causes the abnormal cluster status is output, such as a service abnormality or a switch failure, etc., so as to facilitate timely repair and processing.
[0087] The cluster status monitoring method of the embodiment of the present invention obtains each indicator feature data of the cluster at the current moment, inputs each indicator feature data into the cluster status monitoring model, and obtains the health indicator result of the cluster. The method combines the monitoring indicator data of the business, the service status indicator data of the cluster, and the operation indicator data of the computer room infrastructure, obtains the cluster turntable through the trained cluster status monitoring model, realizes the location of abnormal problems, improves the accuracy and efficiency of cluster status monitoring, and ensures the stability of the business.
[0088] According to another aspect of the embodiment of the present invention, Figure 3 As shown, a training device 300 for a cluster status monitoring module is provided, comprising:
[0089] The first acquisition module 301 acquires, for each historical moment in the plurality of historical moments, each business running on each container of the cluster and each monitoring indicator data of each business;
[0090] The second acquisition module 302 acquires the service status indicator data of the cluster, the operation indicator data of the computer room infrastructure corresponding to each container, and the health indicator result of the cluster;
[0091] A construction module 303 constructs various indicator characteristic data of the cluster according to various monitoring indicator data of each business, service status indicator data and operation indicator data of the cluster;
[0092] The training module 304 trains a cluster status monitoring model according to the characteristic data of each indicator of the cluster at each historical moment in the plurality of historical moments and the health indicator result of the cluster.
[0093] In an embodiment of the present invention, the second acquisition module 302 is further used to: for each business, obtain the health indicator result of the business according to the various monitoring indicator data of the business and the weight of each monitoring indicator; obtain the health indicator result of the cluster according to the health indicator result of each business in each business and preset rules.
[0094] In the embodiment of the present invention, the second acquisition module 302 is further used to: determine whether there is a target business whose health indicator result is less than or equal to a preset health indicator threshold;
[0095] If not, calculate the health indicator result of the cluster based on the health indicator result of each business and the weight of each business;
[0096] If so, the number of target services is obtained, and when the number of target services is greater than or equal to a preset number threshold, the health indicator result of the cluster is calculated according to the health indicator results of each target service.
[0097] In an embodiment of the present invention, in the second acquisition module 302, the service status indicator data of the cluster includes the service status data and service monitoring indicator data of the cluster, the service status data includes the port status data of each service in the cluster, and the service monitoring indicator data includes the monitoring indicator data of each service in the cluster.
[0098] In the embodiment of the present invention, the construction module 303 is further used to: construct various indicator feature data of the cluster according to various monitoring indicator data of each business, the service status indicator data of the cluster and the operation indicator data, including:
[0099] For each business, calculate the health indicator result of the business according to each monitoring indicator data of the business and the weight of each monitoring indicator;
[0100] Calculate the characteristic importance values of the health indicators of each business, the port status of each service, the monitoring indicators of each service, and the operating indicators of the computer room infrastructure corresponding to each container;
[0101] According to the order of feature importance values from large to small, each indicator feature data of the cluster is constructed.
[0102] According to another aspect of the embodiment of the present invention, Figure 4 As shown, a cluster status monitoring device 400 is provided, including:
[0103] The third acquisition module 401 acquires each indicator characteristic data of the cluster at the current moment;
[0104] Determination module 402, inputs each indicator characteristic data of the cluster at the current moment into the cluster status monitoring model to obtain the health indicator result of the cluster at the current moment;
[0105] The cluster state monitoring model is obtained according to the cluster state monitoring model training method of the embodiment of the present invention.
[0106] According to another aspect of an embodiment of the present invention, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the cluster state monitoring model training method or cluster state monitoring method provided by the present invention.
[0107] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the training method of the cluster state monitoring model or the cluster state monitoring method provided by the present invention is implemented.
[0108] Figure 5 An exemplary system architecture 500 is shown to which a cluster state monitoring model training method or a cluster state monitoring model training device, and a cluster state monitoring method or a cluster state monitoring device according to an embodiment of the present invention can be applied.
[0109] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0110] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0111] The terminal devices 501 , 502 , and 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0112] The server 505 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 501, 502, and 503. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.
[0113] It should be noted that the cluster state monitoring model training method or cluster state monitoring method provided in the embodiment of the present invention is generally executed by the server 505 , and accordingly, the cluster state monitoring model training device or cluster state monitoring device is generally arranged in the server 505 .
[0114] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0115] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0116] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0117] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0118] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.
[0119] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0120] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0121] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be provided in a processor. For example, they may be described as follows: a processor includes a first acquisition module, a second acquisition module, a construction module, and a training module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the first acquisition module may also be described as "a module for acquiring, for each of a plurality of historical moments, each business running on each container of a cluster and each monitoring indicator data of each business".
[0122] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: for each historical moment in multiple historical moments, obtaining each business running on each container of the cluster and each monitoring indicator data of each business; obtaining the service status indicator data of the cluster, the operation indicator data of the computer room infrastructure corresponding to each container, and the health indicator results of the cluster; constructing each indicator feature data of the cluster according to each monitoring indicator data of each business, the service status indicator data and the operation indicator data of the cluster; training a cluster status monitoring model according to each indicator feature data of the cluster at each historical moment in multiple historical moments and the health indicator results of the cluster.
[0123] According to the technical solution of the embodiment of the present invention, the training method of the cluster status monitoring model provided by the embodiment of the present invention obtains, for each historical moment in each historical moment, each business running on each container of the cluster and each monitoring indicator data of each business, obtains the service status indicator data of the cluster, the operation indicator data of the computer room infrastructure corresponding to each container, and the health indicator results of the cluster, and then constructs each indicator feature data of the cluster; according to each indicator feature data of the cluster at each historical moment in multiple historical moments and the health indicator results of the cluster, the cluster status monitoring model is trained. The training method obtains the monitoring indicator data of the business on the cluster container, the service status data of the cluster, and the operation indicator data of the computer room infrastructure corresponding to the container, and conducts combined analysis to construct a cluster status monitoring model, so as to improve the accuracy and efficiency of cluster status prediction, realize the location of abnormal problems, and promptly repair and process the fault point to ensure the stability of the business.
[0124] The cluster status monitoring method of the embodiment of the present invention obtains each indicator feature data of the cluster at the current moment, inputs each indicator feature data into the cluster status monitoring model, and obtains the health indicator result of the cluster. The method combines the monitoring indicator data of the business, the service status indicator data of the cluster, and the operation indicator data of the computer room infrastructure, obtains the cluster turntable through the trained cluster status monitoring model, realizes the location of abnormal problems, improves the accuracy and efficiency of cluster status monitoring, and ensures the stability of the business.
[0125] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A training method for a cluster status monitoring model, characterized in that: For each of the multiple historical moments, obtain each business running on each container in the cluster and each monitoring indicator data of each business; Obtain service status indicator data of the cluster, operation indicator data of the computer room infrastructure corresponding to each container, and health indicator results of the cluster; Constructing various indicator feature data of the cluster according to various monitoring indicator data of each business, the service status indicator data of the cluster and the operation indicator data; A cluster status monitoring model is trained based on the various indicator feature data of the cluster at each historical moment in multiple historical moments and the health indicator results of the cluster.
2. The method according to claim 1, characterized in that Get the health indicator results of the cluster, including: For each business, according to each monitoring indicator data of the business and the weight of each monitoring indicator, the health indicator result of the business is obtained; The health indicator result of the cluster is obtained according to the health indicator result of each business in each business and the preset rules.
3. The method according to claim 2, characterized in that The health indicator result of the cluster is obtained according to the health indicator result of each business in each business and the preset rules, including: Determine whether there is a target business whose health indicator result is less than or equal to the preset health indicator threshold; If not, calculate the health indicator result of the cluster according to the health indicator result of each business and the weight of each business; If so, the number of the target services is obtained, and when the number of the target services is greater than or equal to a preset number threshold, the health indicator result of the cluster is calculated according to the health indicator results of each target service.
4. The method according to claim 1, characterized in that: The service status indicator data of the cluster includes service status data and service monitoring indicator data of the cluster, the service status data includes port status data of each service in the cluster, and the service monitoring indicator data includes monitoring indicator data of each service in the cluster.
5. The method according to claim 4, characterized in that According to each monitoring indicator data of each business, the service status indicator data of the cluster and the operation indicator data, each indicator feature data of the cluster is constructed, including: For each business, calculate the health indicator result of the business according to each monitoring indicator data of the business and the weight of each monitoring indicator; Calculate the characteristic importance values of the health indicators of each business, the port status of each service, the monitoring indicators of each service, and the operating indicators of the computer room infrastructure corresponding to each container; According to the order of feature importance values from large to small, the indicator feature data of the cluster are constructed.
6. A cluster status monitoring method, characterized in that: include: Obtaining various indicator characteristic data of the cluster at the current moment; Inputting each indicator characteristic data of the cluster at the current moment into the cluster status monitoring model to obtain the health indicator result of the cluster at the current moment; The cluster status monitoring model is trained according to any one of the methods described in claims 1-5.
7. A training device for a cluster status monitoring module, characterized in that: include: A first acquisition module acquires, for each historical moment among the multiple historical moments, each business running on each container of the cluster and each monitoring indicator data of each business; A second acquisition module acquires the service status indicator data of the cluster, the operation indicator data of the computer room infrastructure corresponding to each container, and the health indicator result of the cluster; A construction module, which constructs various indicator feature data of the cluster according to various monitoring indicator data of each business, the service status indicator data of the cluster and the operation indicator data; The training module trains a cluster status monitoring model according to the characteristic data of each indicator of the cluster at each historical moment in multiple historical moments and the health indicator result of the cluster.
8. A cluster status monitoring device, characterized in that: include: The third acquisition module acquires each indicator characteristic data of the cluster at the current moment; A determination module inputs each indicator characteristic data of the cluster at the current moment into a cluster status monitoring model to obtain a health indicator result of the cluster at the current moment; The cluster status monitoring model is trained according to any one of the methods described in claims 1-5.
9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.