Cluster status monitoring method and device
The hidden Markov model is used to collect and process the performance and task information of the cluster in real time, predict the future status and send alarm information, which solves the problem of cluster monitoring delay in the existing technology and ensures the stability of the cluster operation.
Patent Information
- Application Number
- CN202011046727.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-29
- Publication Date
- 2024-09-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing technology, cluster monitoring methods are usually discovered after performance failures occur, resulting in unstable cluster operation and failure to prevent failures in time.
Hidden Markov models are used to collect and process cluster performance indicators, node performance indicators and task operation information in real time, predict the future status of the cluster, and send alarm information when the status is abnormal to ensure the stability of cluster operation.
Through the prediction of the hidden Markov model, alarm information can be issued before a cluster failure occurs to ensure the stable operation of the cluster and avoid unstable operations caused by failures.
Smart Images

Figure CN112115031B
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] In recent years, with the development of computer science and technology, the demand for Internet applications has been increasing. In order to meet the growing application needs, large-scale server clusters are needed to handle various application services. In the process of clusters handling various application services, in order to ensure the normal operation of the cluster, it is usually necessary to monitor the cluster.
[0003] In the prior art, performance indicators of concern to some technical personnel in the cluster are usually collected, and then the performance indicators of the cluster are compared with the thresholds pre-defined based on historical data, so as to monitor the cluster status. However, using such a monitoring method, it is easy for the cluster to be discovered only when performance failures occur, resulting in unstable cluster operation. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a cluster status monitoring method, which can ensure the stability of cluster operation.
[0005] The present invention also provides a cluster status monitoring device to ensure the implementation and application of the above method in practice.
[0006] A cluster status monitoring method, comprising:
[0007] In response to a cluster monitoring instruction, determining a cluster corresponding to the cluster monitoring instruction, wherein a plurality of nodes are arranged in the cluster;
[0008] Collecting monitoring data of the cluster in real time, the monitoring data including cluster performance indicator information, node performance indicator information of each node in the cluster, and current task running information of the cluster;
[0009] Applying a preset hidden Markov model to process the currently collected monitoring data to obtain the future state of the cluster corresponding to the monitoring data;
[0010] When the cluster future state is characterized as an abnormal cluster state, alarm information corresponding to the abnormal cluster state is sent.
[0011] The above method may optionally apply a preset hidden Markov model to process the currently collected monitoring data to obtain the future state of the cluster corresponding to the monitoring data, including:
[0012] Preprocessing the monitoring data to obtain input parameters matching the hidden Markov model;
[0013] Inputting the input parameters into the hidden Markov model, so that the hidden Markov model determines the probability value of the cluster being in each preset state at the target future time corresponding to the input parameters;
[0014] The state corresponding to the probability value with the largest value among the probability values is used as the future state of the cluster corresponding to the monitoring data.
[0015] In the above method, optionally, the setting process of the hidden Markov model includes:
[0016] Acquire a training data set and a model to be trained, wherein the training data set includes a plurality of historical monitoring data arranged in order of collection time;
[0017] The model to be trained is trained by applying each historical monitoring data in the training data set in turn, until the model to be trained meets a preset stop training condition, and the model to be trained is used as a hidden Markov model.
[0018] In the above method, optionally, the real-time collection of monitoring data of the cluster includes:
[0019] Read the task log corresponding to the cluster in real time to obtain the current task running information of the cluster;
[0020] Invoke a preset performance indicator collection tool in real time to collect the current cluster performance indicator of the cluster and the node performance indicator of each node in the cluster;
[0021] The currently collected cluster performance indicators, the node performance indicators and the task running information constitute the current monitoring data of the cluster.
[0022] In the above method, optionally, the sending of the alarm information corresponding to the abnormal cluster status includes:
[0023] Generate alarm information based on the abnormal state of the cluster;
[0024] Determine a target processing object corresponding to the cluster abnormal state in a preset processing object set;
[0025] The warning information is sent to the target processing object.
[0026] A cluster status monitoring device, comprising:
[0027] A determination unit, configured to determine, in response to a cluster monitoring instruction, a cluster corresponding to the cluster monitoring instruction, wherein a plurality of nodes are arranged in the cluster;
[0028] A collection unit, used to collect monitoring data of the cluster in real time, wherein the monitoring data includes cluster performance indicator information, node performance indicator information of each node in the cluster, and current task running information of the cluster;
[0029] A processing unit, used to process the currently collected monitoring data using a preset hidden Markov model to obtain a future state of the cluster corresponding to the monitoring data;
[0030] The sending unit is configured to send alarm information corresponding to the abnormal cluster state when the future state of the cluster is characterized as abnormal cluster state.
[0031] In the above device, optionally, the processing unit includes:
[0032] A preprocessing subunit, used for preprocessing the monitoring data to obtain input parameters matching the hidden Markov model;
[0033] An input subunit, used for inputting the input parameters into the hidden Markov model, so that the hidden Markov model determines the probability value of the cluster being in each preset state at the target future time corresponding to the input parameters;
[0034] The first execution subunit is used to use the state corresponding to the probability value with the largest value among the probability values as the future state of the cluster corresponding to the monitoring data.
[0035] The above device may optionally further include: a model setting unit;
[0036] The model setting unit is used to obtain a training data set and a model to be trained, wherein the training data set includes a plurality of historical monitoring data arranged in the order of collection time; each historical monitoring data in the training data set is applied in turn to train the model to be trained until the model to be trained meets a preset stop training condition, and the model to be trained is used as a hidden Markov model.
[0037] In the above device, optionally, the acquisition unit comprises:
[0038] The reading subunit is used to read the task log corresponding to the cluster in real time to obtain the current task running information of the cluster;
[0039] A collection subunit, used for calling a preset performance indicator collection tool in real time to collect the current cluster performance indicator of the cluster and the node performance indicator of each node in the cluster;
[0040] The second execution subunit is used to form the current monitoring data of the cluster by combining the currently collected cluster performance indicators, the node performance indicators and the task running information.
[0041] In the above device, optionally, the sending unit includes:
[0042] A generating subunit, configured to generate alarm information based on the abnormal state of the cluster;
[0043] A determination subunit, configured to determine a target processing object corresponding to the abnormal state of the cluster in a preset processing object set;
[0044] The sending subunit is used to send the alarm information to the target processing object.
[0045] Compared with the prior art, the present invention has the following advantages:
[0046] The present invention provides a cluster status monitoring method and device, the method comprising: in response to a cluster monitoring instruction, determining a cluster corresponding to the cluster monitoring instruction, wherein a plurality of nodes are arranged in the cluster; collecting monitoring data of the cluster in real time, wherein the monitoring data comprises cluster performance index information, node performance index information of each node in the cluster, and current task operation information of the cluster; applying a preset hidden Markov model to process the currently collected monitoring data to obtain the future state of the cluster corresponding to the monitoring data; and sending an alarm message corresponding to the abnormal cluster state when the future state of the cluster is characterized as an abnormal cluster state. The method provided by the present invention can predict the operation state of the cluster based on the cluster performance index information, the node performance index information of each node in the cluster, and the current task operation information of the cluster through the hidden Markov model, so that an alarm message can be issued before a cluster failure occurs, thereby ensuring the stability of cluster operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0048] Figure 1 A method flow chart of a cluster status monitoring method provided by the present invention;
[0049] Figure 2 A flowchart of a process of obtaining the future state of a cluster corresponding to monitoring data provided by the present invention;
[0050] Figure 3 A flowchart of a process for real-time collection of monitoring data of the cluster provided by the present invention;
[0051] Figure 4 A flowchart of a process of sending alarm information corresponding to abnormal cluster status provided by the present invention;
[0052] Figure 5 A schematic diagram of the structure of a cluster status monitoring device provided by the present invention;
[0053] Figure 6 The present invention provides a schematic structural diagram of an electronic device. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] The present invention can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or devices, etc.
[0056] The embodiment of the present invention provides a cluster status monitoring method, which can be applied to various system platforms, and its execution subject can be a computer terminal or a processor of various mobile devices. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:
[0057] S101: In response to a cluster monitoring instruction, determining a cluster corresponding to the cluster monitoring instruction, where the cluster is provided with a plurality of nodes.
[0058] In the method provided by the embodiment of the present invention, when a cluster monitoring instruction is received, the monitoring instruction is parsed to determine the cluster corresponding to the monitoring instruction.
[0059] The cluster may be a big data processing cluster, such as a Spark cluster.
[0060] Specifically, the cluster includes multiple nodes, and each of the nodes may be a server.
[0061] S102: Collect monitoring data of the cluster in real time, where the monitoring data includes cluster performance indicator information, node performance indicator information of each node in the cluster, and current task running information of the cluster.
[0062] In the method provided by an embodiment of the present invention, the cluster performance indicator information may include information such as the number of cluster nodes, cluster network status, the IP address of the Master component in the cluster, the IP address of the Worker component, the CPU resources of the Worker component, the memory resources of the Worker component, and cluster disk occupancy statistics.
[0063] The node performance indicator information includes the node's CPU load, HTTP service status, SSH service status, zombie process data, disk IO rate, etc.
[0064] Specifically, the task running information may include the type of currently running tasks, the number of currently running tasks, and the execution status of the tasks, etc.
[0065] The monitoring data collected each time corresponds to the time when the monitoring data is collected.
[0066] S103: Apply a preset hidden Markov model to process the currently collected monitoring data to obtain the future state of the cluster corresponding to the monitoring data.
[0067] In the embodiment of the present invention, a preset hidden Markov model is applied to process the currently collected monitoring data, so that the future state of the cluster corresponding to the monitoring data can be obtained. The future state of the cluster can be the state of the cluster at a preset time point or time period in the future. The state can be a normal state, an idle state or various types of abnormal states, etc.
[0068] Among them, a preset hidden Markov model is used to process the monitoring data collected at each moment to obtain the future state sequence of the cluster corresponding to each moment. The future state sequence contains the future state of the cluster at each future moment corresponding to each moment. The future state sequence is the implicit state chain output by the Markov model, and the future state sequence can be the state trend of the cluster.
[0069] S104: When the cluster future state is characterized as an abnormal cluster state, send alarm information corresponding to the abnormal cluster state.
[0070] In the method provided by the embodiment of the present invention, it is determined whether the future state of the cluster is characterized as a cluster abnormal state; if the cluster state is characterized as a cluster abnormal state, alarm information corresponding to the cluster abnormal state is generated and sent.
[0071] The corresponding alarm information may be generated based on the type of the cluster abnormal state. The abnormal state type of the cluster abnormal state may be one or more types. Different abnormal state types of the cluster abnormal state may have different alarm information generation modes.
[0072] The embodiment of the present invention provides a cluster status monitoring method, including: in response to a cluster monitoring instruction, determining a cluster corresponding to the cluster monitoring instruction, wherein a plurality of nodes are arranged in the cluster; collecting monitoring data of the cluster in real time, wherein the monitoring data includes cluster performance index information, node performance index information of each node in the cluster, and current task operation information of the cluster; applying a preset hidden Markov model to process the currently collected monitoring data to obtain the future state of the cluster corresponding to the monitoring data; and sending an alarm message corresponding to the abnormal cluster state when the future state of the cluster is characterized as an abnormal cluster state. The method provided by the present invention can predict the operation state of the cluster based on the cluster performance index information, the node performance index information of each node in the cluster, and the current task operation information of the cluster through the hidden Markov model, so that an alarm message can be issued before a cluster failure occurs, thereby ensuring the stability of cluster operation.
[0073] In the method provided in the embodiment of the present invention, based on the above implementation process, specifically, a process of applying a preset hidden Markov model to process the currently collected monitoring data to obtain the future state of the cluster corresponding to the monitoring data is as follows: Figure 2 As shown, it may include:
[0074] S201: Preprocessing the monitoring data to obtain input parameters matching the hidden Markov model.
[0075] In the method provided by an embodiment of the present invention, a feasible way to preprocess the monitoring data may be: performing data cleaning on the monitoring data, removing abnormal values and filling in missing values, normalizing the monitoring data after data cleaning, and obtaining input parameters that match the hidden Markov model.
[0076] S202: Inputting the input parameters into the hidden Markov model, so that the hidden Markov model determines the probability value of the cluster being in each preset state at the target future time corresponding to the input parameters.
[0077] In the method provided by an embodiment of the present invention, the hidden Markov model can be represented by {N, M, A, B, π}, where N represents a hidden state set, M represents an observable state set, A is a state transition probability matrix, B is an observation probability matrix, and π is an initial probability distribution.
[0078] Among them, the observable state set can be the observable state corresponding to the monitoring data, and the number of the observable states can be obtained through the training set; the hidden state set can be the state of the cluster predicted by the hidden Markov based on the observable state. For example, the hidden state set may include: normal state, idle state and various types of abnormal states.
[0079] S203: Taking the state corresponding to the probability value with the largest value among the probability values as the future state of the cluster corresponding to the monitoring data.
[0080] In the method provided by the embodiment of the present invention, the probability values corresponding to each state in the implicit state set are determined through the state transition probability matrix, and the state corresponding to the probability value with the largest numerical value is used as the future state of the cluster.
[0081] In the method provided in the embodiment of the present invention, based on the above implementation process, specifically, the setting process of the hidden Markov model includes:
[0082] Acquire a training data set and a model to be trained, wherein the training data set includes a plurality of historical monitoring data arranged in order of collection time;
[0083] The model to be trained is trained by applying each historical monitoring data in the training data set in turn, until the model to be trained meets a preset stop training condition, and the model to be trained is used as a hidden Markov model.
[0084] In the method provided by the embodiment of the present invention, the condition for stopping training may be that the number of observation data used to train the model to be trained is equal to a preset number threshold.
[0085] Among them, each historical monitoring data in the training data set has its corresponding collection time, and each historical monitoring data is used to train the model to be trained in sequence according to the chronological order of its collection time to adjust the model parameters of the model to be trained.
[0086] In the method provided by the embodiment of the present invention, based on the above implementation process, specifically, the real-time collection of the monitoring data of the cluster, such as Figure 3 As shown, it may include:
[0087] S301: Read the task log corresponding to the cluster in real time to obtain the current task running information of the cluster.
[0088] In the method provided by the embodiment of the present invention, the task log records the task running information of the cluster at each time, and the task running information may include the type of currently running tasks, the number of currently running tasks, and the execution status of the tasks, etc.
[0089] S302: Invoke a preset performance indicator collection tool in real time to collect the current cluster performance indicator of the cluster and the node performance indicator of each node in the cluster.
[0090] In the method provided by an embodiment of the present invention, the overall performance status information of the cluster and the performance status information of each node in the cluster can be collected through the performance indicator collection tool, the cluster performance indicators can be obtained from the overall performance status information, and the node performance indicators of each node can be obtained from the performance status information of each node.
[0091] S303: The currently collected cluster performance indicator, each node performance indicator and the task running information are combined into the current monitoring data of the cluster.
[0092] The method provided by the embodiment of the present invention can combine the cluster performance index, the node performance index of each node and the task running information into the monitoring data of the cluster in a preset combination manner.
[0093] In the method provided in the embodiment of the present invention, based on the above implementation process, specifically, the sending of the alarm information corresponding to the abnormal cluster status is as follows: Figure 4 As shown, it may include:
[0094] S401: Generate alarm information based on the abnormal state of the cluster.
[0095] In the method provided by the embodiment of the present invention, the abnormal state type of the cluster abnormal state may be one or more types, and different abnormal state types of the cluster abnormal state may correspond to different alarm information generation methods.
[0096] Herein, an alarm information template corresponding to the type of the abnormal state of the cluster may be obtained, and alarm information may be generated based on the alarm information template.
[0097] S402: Determine a target processing object corresponding to the cluster abnormal state in a preset processing object set.
[0098] In the method provided by the embodiment of the present invention, the processing object set includes at least one processing object, and each processing object corresponds to one or more types of cluster abnormal states, that is, different processing objects may be responsible for processing different types of cluster abnormal states.
[0099] S403: Send the alarm information to the target processing object.
[0100] In the method provided by the embodiment of the present invention, the communication address of the target processing object can be obtained, and the alarm information is sent to the target processing object based on the communication address.
[0101] In the method provided in an embodiment of the present invention, based on the above-mentioned implementation process, specifically, after sending the alarm information corresponding to the cluster status abnormality, it also includes: determining the abnormal status type corresponding to the cluster abnormal status, and determining the abnormal repair action corresponding to the abnormal status type, and executing the abnormal repair action shown. The abnormal modification action can be restarting the node, clearing the cache, and ending the process of tasks with lower priority, etc.
[0102] and Figure 1 Corresponding to the method described above, the embodiment of the present invention further provides a cluster status monitoring device for Figure 1 In the specific implementation of the method, the cluster status monitoring device provided by the embodiment of the present invention can be applied to a computer terminal or various mobile devices, and its structural diagram is as follows Figure 5 As shown, specifically including:
[0103] A determining unit 501 is used to determine, in response to a cluster monitoring instruction, a cluster corresponding to the cluster monitoring instruction, wherein a plurality of nodes are arranged in the cluster;
[0104] A collection unit 502 is used to collect monitoring data of the cluster in real time, wherein the monitoring data includes cluster performance indicator information, node performance indicator information of each node in the cluster, and current task running information of the cluster;
[0105] The processing unit 503 is used to process the currently collected monitoring data using a preset hidden Markov model to obtain the future state of the cluster corresponding to the monitoring data;
[0106] The sending unit 504 is configured to send alarm information corresponding to the abnormal cluster state when the future state of the cluster is characterized as abnormal cluster state.
[0107] The embodiment of the present invention provides a cluster state monitoring device, which determines the cluster corresponding to the cluster monitoring instruction by responding to the cluster monitoring instruction, wherein the cluster is provided with multiple nodes; collects the monitoring data of the cluster in real time, wherein the monitoring data includes cluster performance index information, node performance index information of each node in the cluster, and current task operation information of the cluster; applies a preset hidden Markov model to process the currently collected monitoring data to obtain the future state of the cluster corresponding to the monitoring data; and sends the alarm information corresponding to the abnormal cluster state when the future state of the cluster is characterized as abnormal cluster state. According to the method provided by the present invention, the operation state of the cluster can be predicted based on the cluster performance index information, the node performance index information of each node in the cluster, and the current task operation information of the cluster through the hidden Markov model, so that the alarm information can be issued before the cluster fails, thereby ensuring the stability of the cluster operation.
[0108] In an embodiment provided by the present invention, based on the above solution, specifically, the processing unit 503 includes:
[0109] A preprocessing subunit, used for preprocessing the monitoring data to obtain input parameters matching the hidden Markov model;
[0110] An input subunit, used for inputting the input parameters into the hidden Markov model, so that the hidden Markov model determines the probability value of the cluster being in each preset state at the target future time corresponding to the input parameters;
[0111] The first execution subunit is used to use the state corresponding to the probability value with the largest value among the probability values as the future state of the cluster corresponding to the monitoring data.
[0112] In an embodiment provided by the present invention, based on the above solution, specifically, it further includes: a model setting unit;
[0113] The model setting unit is used to obtain a training data set and a model to be trained, wherein the training data set includes a plurality of historical monitoring data arranged in the order of collection time; each historical monitoring data in the training data set is applied in turn to train the model to be trained until the model to be trained meets a preset stop training condition, and the model to be trained is used as a hidden Markov model.
[0114] In an embodiment provided by the present invention, based on the above solution, specifically, the collection unit 502 includes:
[0115] The reading subunit is used to read the task log corresponding to the cluster in real time to obtain the current task running information of the cluster;
[0116] A collection subunit, used for calling a preset performance indicator collection tool in real time to collect the current cluster performance indicator of the cluster and the node performance indicator of each node in the cluster;
[0117] The second execution subunit is used to form the current monitoring data of the cluster by combining the currently collected cluster performance indicators, the node performance indicators and the task running information.
[0118] In an embodiment provided by the present invention, based on the above solution, specifically, the sending unit 504 includes:
[0119] A generating subunit, configured to generate alarm information based on the abnormal state of the cluster;
[0120] A determination subunit, configured to determine a target processing object corresponding to the abnormal state of the cluster in a preset processing object set;
[0121] The sending subunit is used to send the alarm information to the target processing object.
[0122] The specific principles and execution processes of each unit and module in the cluster state monitoring device disclosed in the above embodiment of the present invention are the same as those of the cluster state monitoring method disclosed in the above embodiment of the present invention. Please refer to the corresponding parts of the cluster state monitoring method provided in the above embodiment of the present invention, and will not be repeated here.
[0123] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned cluster status monitoring method.
[0124] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 6 As shown, it specifically includes a memory 601 and one or more instructions 602, wherein the one or more instructions 602 are stored in the memory 601 and are configured to be executed by one or more processors 603 to perform the following operations:
[0125] In response to a cluster monitoring instruction, determining a cluster corresponding to the cluster monitoring instruction, wherein a plurality of nodes are arranged in the cluster;
[0126] Collecting monitoring data of the cluster in real time, the monitoring data including cluster performance indicator information, node performance indicator information of each node in the cluster, and current task running information of the cluster;
[0127] Applying a preset hidden Markov model to process the currently collected monitoring data to obtain the future state of the cluster corresponding to the monitoring data;
[0128] When the cluster future state is characterized as an abnormal cluster state, alarm information corresponding to the abnormal cluster state is sent.
[0129] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0130] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0131] For the convenience of description, the above device is described as being divided into various units according to their functions. Of course, when implementing the present invention, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0132] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.
[0133] The above is a detailed introduction to a cluster status monitoring method provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A cluster status monitoring method, characterized in that: include: In response to a cluster monitoring instruction, determining a cluster corresponding to the cluster monitoring instruction, wherein a plurality of nodes are arranged in the cluster; Collect monitoring data of the cluster in real time, the monitoring data including cluster performance indicator information, node performance indicator information of each node in the cluster and current task running information of the cluster; the cluster performance indicator information includes the number of cluster nodes, cluster network status, IP address of the Master component in the cluster, IP address of the Worker component, CPU resources of the Worker component, memory resources of the Worker component and cluster disk occupancy statistics; the node performance indicator information includes the CPU load of the node, HTTP service status, SSH service status, zombie process data and disk IO rate; The task running information includes the type of currently running tasks, the number of currently running tasks and the execution status of the tasks; wherein each collected monitoring data corresponds to the time when the monitoring data is collected; Applying a preset hidden Markov model to process the currently collected monitoring data to obtain a future state of the cluster corresponding to the monitoring data; wherein applying the preset hidden Markov model to process the currently collected monitoring data includes applying the preset hidden Markov model to process the monitoring data collected at each moment to obtain a future state sequence of the cluster corresponding to each moment, and the future state sequence of the cluster is used to characterize the state trend of the cluster; When the cluster future state is characterized as an abnormal cluster state, alarm information corresponding to the abnormal cluster state is sent.
2. The method according to claim 1, characterized in that: Apply the preset hidden Markov model to process the currently collected monitoring data to obtain the future state of the cluster corresponding to the monitoring data, including: Preprocessing the monitoring data to obtain input parameters matching the hidden Markov model; Inputting the input parameters into the hidden Markov model, so that the hidden Markov model determines the probability value of the cluster being in each preset state at the target future time corresponding to the input parameters; The state corresponding to the probability value with the largest value among the probability values is used as the future state of the cluster corresponding to the monitoring data.
3. The method according to claim 1, characterized in that The setting process of the hidden Markov model includes: Acquire a training data set and a model to be trained, wherein the training data set includes a plurality of historical monitoring data arranged in order of collection time; The model to be trained is trained by applying each historical monitoring data in the training data set in turn, until the model to be trained meets a preset stop training condition, and the model to be trained is used as a hidden Markov model.
4. The method according to claim 1, characterized in that The real-time collection of monitoring data of the cluster includes: Read the task log corresponding to the cluster in real time to obtain the current task running information of the cluster; Invoke a preset performance indicator collection tool in real time to collect the current cluster performance indicator of the cluster and the node performance indicator of each node in the cluster; The currently collected cluster performance indicators, the node performance indicators and the task running information constitute the current monitoring data of the cluster.
5. The method according to claim 1, characterized in that: The sending of the alarm information corresponding to the abnormal cluster status includes: Generate alarm information based on the abnormal state of the cluster; Determine a target processing object corresponding to the cluster abnormal state in a preset processing object set; The warning information is sent to the target processing object.
6. A cluster status monitoring device, characterized in that: include: A determination unit, configured to determine, in response to a cluster monitoring instruction, a cluster corresponding to the cluster monitoring instruction, wherein a plurality of nodes are arranged in the cluster; A collection unit, used to collect monitoring data of the cluster in real time, wherein the monitoring data includes cluster performance indicator information, node performance indicator information of each node in the cluster, and current task running information of the cluster; the cluster performance indicator information includes the number of cluster nodes, cluster network status, IP address of the Master component in the cluster, IP address of the Worker component, CPU resources of the Worker component, memory resources of the Worker component, and cluster disk occupancy statistics; the node performance indicator information includes the CPU load of the node, HTTP service status, SSH service status, zombie process data, and disk IO rate; The task running information includes the type of currently running tasks, the number of currently running tasks and the execution status of the tasks; wherein each collected monitoring data corresponds to the time when the monitoring data is collected; A processing unit, used to apply a preset hidden Markov model to process the currently collected monitoring data to obtain a future state of the cluster corresponding to the monitoring data; wherein applying the preset hidden Markov model to process the currently collected monitoring data includes applying the preset hidden Markov model to process the monitoring data collected at each moment to obtain a future state sequence of the cluster corresponding to each moment, and the future state sequence of the cluster is used to characterize the state trend of the cluster; The sending unit is configured to send alarm information corresponding to the abnormal cluster state when the future state of the cluster is characterized as abnormal cluster state.
7. The device according to claim 6, characterized in that The processing unit comprises: A preprocessing subunit, used for preprocessing the monitoring data to obtain input parameters matching the hidden Markov model; An input subunit, used for inputting the input parameters into the hidden Markov model, so that the hidden Markov model determines the probability value of the cluster being in each preset state at the target future time corresponding to the input parameters; The first execution subunit is used to use the state corresponding to the probability value with the largest value among the probability values as the future state of the cluster corresponding to the monitoring data.
8. The device according to claim 6, characterized in that Also includes: Model setup unit; The model setting unit is used to obtain a training data set and a model to be trained, wherein the training data set includes a plurality of historical monitoring data arranged in order of collection time;The model to be trained is trained by applying each historical monitoring data in the training data set in turn, until the model to be trained meets a preset stop training condition, and the model to be trained is used as a hidden Markov model.
9. The device according to claim 6, characterized in that The acquisition unit comprises: The reading subunit is used to read the task log corresponding to the cluster in real time to obtain the current task running information of the cluster; A collection subunit, used for calling a preset performance indicator collection tool in real time to collect the current cluster performance indicator of the cluster and the node performance indicator of each node in the cluster; The second execution subunit is used to form the current monitoring data of the cluster by combining the currently collected cluster performance indicators, the node performance indicators and the task running information.
10. The device according to claim 6, characterized in that The sending unit comprises: A generating subunit, configured to generate alarm information based on the abnormal state of the cluster; A determination subunit, configured to determine a target processing object corresponding to the abnormal state of the cluster in a preset processing object set; The sending subunit is used to send the alarm information to the target processing object.
