Server cluster health inspection method and device, computer equipment and storage medium
By generating dependency trees and derivative status data tables and conducting targeted health inspections, the problem of failure and low efficiency in the existing technology is solved, and fast response and efficient fault handling is achieved.
Patent Information
- Application Number
- CN202411339562.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-12-31
AI Technical Summary
The existing server cluster health inspection mechanism cannot detect fault locations in time, and the full inspection efficiency is low, resulting in slow failure response and recovery speed, and the inability to effectively manage huge and complex systems.
By generating dependency trees, establishing derivative status data tables, traversing status information regularly, forming a set to be inspected for directional health inspections, generating inspection reports, reducing unnecessary inspection tasks, and improving inspection efficiency.
It realizes timely acquisition of status information of abnormal modules, reduces the time and burden of health inspections, improves the efficiency of health inspections, can respond to cluster alarms in a timely manner, and improves fault response and recovery speed.
Smart Images

Figure CN119232614A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a server cluster health inspection method, device, computer equipment and storage medium. Background Art
[0002] With the increasing scale of server clusters and the rapid development of related storage business technologies, the connection topology between nodes is not only becoming more complex, but also intertwined into a huge network, which contains a large number of hardware devices and intricate software modules. This highly integrated environment has greatly improved data processing capabilities and system flexibility, but it has also significantly increased potential failure points. The larger the server scale, the more components that need to be maintained. A small failure in any link may trigger a chain reaction in the cluster, resulting in service interruption or performance degradation.
[0003] Therefore, while enjoying the performance advantages brought by the expansion of server clusters, how to effectively manage this large and complex system, reduce the possibility of failures, and improve failure response and recovery speed has become an important issue currently faced. In order to deal with the above abnormal situations, a health inspection mechanism is designed in the cluster. The current health inspection mechanism basically requires users to actively trigger it. This user-initiated triggering mode has a large lag. Generally, the health status of the cluster is obtained after a problem occurs in the environment, and the abnormal information of the environment cannot be obtained in time. In addition, the current health inspection is basically a comprehensive inspection, and no directional inspection is implemented. Many modules that are obviously healthy will also be checked during the health inspection process, which virtually reduces the efficiency of the health inspection. Summary of the invention
[0004] Based on this, a server cluster health inspection method, device, computer equipment and storage medium are provided to solve the technical problem that the current server cluster cannot effectively detect the fault location, and the healthy modules are inspected during the health inspection process, which reduces the efficiency of the health inspection. It aims to obtain the status information of the abnormal module in time, reduce the time consumption and environmental burden of conventional health inspection, and improve the efficiency of health inspection.
[0005] In one aspect, a server cluster health inspection method is provided, the method comprising:
[0006] Obtain the functional modules of the server cluster, and generate a dependency tree according to the association and dependency relationship between the functional modules;
[0007] Generate a derived status data table for health inspection according to the dependency tree, wherein the derived status data table stores the name and status information of each functional module;
[0008] In response to the target functional module generating alarm information or being detected to have a fault, updating the state information of the target functional module in the derived state data table from a normal state to an abnormal state;
[0009] Periodically traverse the state information in the derived state data table, take the function module in abnormal state as the abnormal function module, obtain the dependent function module that has an association and dependency relationship with the abnormal function module, and form a set to be inspected;
[0010] Perform a health inspection on the set to be inspected, generate an inspection report and save it.
[0011] In one embodiment, the step of obtaining the functional modules of the server cluster and generating a dependency tree according to the association and dependency relationship between the functional modules includes:
[0012] Acquire hardware and software modules of each server node in the server cluster, and assign preset numbers to the hardware and software modules to form multiple functional modules;
[0013] Obtain the association and dependency relationship between the functional modules, use the name or number of the functional module as the key value (key), and use the number of the functional module that depends on the functional module as the attribute value (value);
[0014] The names of the functional modules are connected according to the attribute values to form a dependency tree.
[0015] In one embodiment, the derived status data table for health inspection is generated according to the dependency tree, and the name and status information of each functional module are stored in the derived status data table, including:
[0016] Establishing a derived status data table for health inspection, setting the derived status data table to include the name and status information of the functional module;
[0017] Each functional module in the dependency tree is traversed, and the name and status information of each functional module are filled in the derived status data table, wherein the status information includes a normal status and an abnormal status, wherein the normal status is represented by a first data, and the abnormal status is represented by a second data.
[0018] In one embodiment, the server cluster health inspection method further includes:
[0019] Traversing each functional module in the dependency tree, obtaining the key value and attribute value of each functional module and converting them into a dictionary or a list;
[0020] Writing a dictionary or list of each functional module into a data exchange format file of the dependency tree, wherein the data exchange format file is used to be triggered and read during health inspection;
[0021] In response to obtaining a function module associated with and dependent on the abnormal function module, searching the data exchange format file of the dependency tree for a function module associated with and dependent on the abnormal function module as a dependent function module, and forming a to-be-inspected set with the abnormal function module and the dependent function module;
[0022] In response to forming a to-be-inspected set after traversing the derived status data table, traversing a data exchange format (json) file corresponding to each functional module in the to-be-inspected set to obtain an inspection item;
[0023] Determine whether there is an ongoing inspection task in the server cluster;
[0024] If there is an ongoing inspection task in the server cluster, cancel the inspection command;
[0025] If there is no inspection task in progress in the server cluster, issuing an inspection command according to the inspection item;
[0026] In response to receiving the inspection command, performing a directed health inspection according to the inspection items;
[0027] In response to cancelling the issuance of the inspection command, increasing the period of regularly traversing the derivative status data table;
[0028] In response to generating the inspection report, the period of regularly traversing the derived status data table is reduced.
[0029] In one embodiment, the server cluster health inspection method further includes:
[0030] After traversing the status information in the derived status data table, if there is no abnormal function module, determining whether to actively trigger a full inspection command;
[0031] If the full inspection command is actively triggered, a full health inspection is performed on the functional modules of the server cluster, and an inspection report is generated and saved.
[0032] In one embodiment, the server cluster health inspection method further includes:
[0033] When generating an inspection report, the status information in the derived status data table is updated according to the inspection result of the inspection report; when the abnormal function module is not faulty, the abnormal status of the abnormal function module in the derived status data table corresponding to the abnormal function module is corrected to a normal status; when there is a faulty function module, the normal status of the faulty function module in the derived status data table corresponding to the faulty function module is corrected to an abnormal status;
[0034] In response to a request to download the inspection report, the generated inspection report is provided to the user for downloading.
[0035] In one embodiment, the server cluster health inspection method further includes:
[0036] After the inspection report is generated, if there is a faulty functional module, fault alarm information is generated based on the faulty functional module.
[0037] On the other hand, a server cluster health inspection device is provided, the device comprising:
[0038] A dependency tree generation module is used to obtain the functional modules of the server cluster and generate a dependency tree according to the association and dependency relationship between the functional modules;
[0039] A derived state data table generation module is used to generate a derived state data table for health inspection according to the dependency tree, wherein the derived state data table stores the name and state information of each functional module;
[0040] A state management module, configured to update the state information of the target function module in the derived state data table from a normal state to an abnormal state in response to the target function module generating an alarm or being detected to have a fault;
[0041] A to-be-inspected set management module is used to periodically traverse the state information in the derived state data table, take the function modules in abnormal state as abnormal function modules, obtain the dependent function modules that are associated with and dependent on the abnormal function modules, and form a to-be-inspected set;
[0042] The inspection management module is used to perform health inspection on the set to be inspected, generate and save an inspection report.
[0043] In another aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0044] Obtain the functional modules of the server cluster, and generate a dependency tree according to the association and dependency relationship between the functional modules;
[0045] Generate a derived status data table for health inspection according to the dependency tree, wherein the derived status data table stores the name and status information of each functional module;
[0046] In response to the target functional module generating alarm information or being detected to have a fault, updating the state information of the target functional module in the derived state data table from a normal state to an abnormal state;
[0047] Periodically traverse the state information in the derived state data table, take the function module in abnormal state as the abnormal function module, obtain the dependent function module that has an association and dependency relationship with the abnormal function module, and form a set to be inspected;
[0048] Perform a health inspection on the set to be inspected, generate an inspection report and save it.
[0049] In another aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0050] Obtain the functional modules of the server cluster, and generate a dependency tree according to the association and dependency relationship between the functional modules;
[0051] Generate a derived status data table for health inspection according to the dependency tree, wherein the derived status data table stores the name and status information of each functional module;
[0052] In response to the target functional module generating alarm information or being detected to have a fault, updating the state information of the target functional module in the derived state data table from a normal state to an abnormal state;
[0053] Periodically traverse the state information in the derived state data table, take the function module in abnormal state as the abnormal function module, obtain the dependent function module that has an association and dependency relationship with the abnormal function module, and form a set to be inspected;
[0054] Perform a health inspection on the set to be inspected, generate an inspection report and save it.
[0055] The above-mentioned server cluster health inspection method, device, computer equipment and storage medium perform association management on each functional module of the server cluster by generating a dependency tree, and generate a derived status data table for health inspection according to the dependency tree, wherein the name and status information of each functional module are stored in the derived status data table. When the status information in the derived status data table is an abnormal state, based on the dependent functional module that has an association and dependency relationship with the abnormal functional module, the abnormal functional module and the dependent functional module are formed into a to-be-inspected set to realize a targeted health inspection. When an alarm message appears in the cluster or each node, a targeted health inspection is performed on the modules to which it belongs and related to the alarm message, and the information of the modules is collected. The targeted health inspection mechanism does not require manual triggering, which can not only obtain abnormal information on the environment in a timely manner, but also reduces the time consumption of the comprehensive health inspection process and the burden of the inspection function, thereby improving the efficiency of the health inspection function. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0057] Figure 1 This is an application environment diagram of a server cluster health inspection method in one embodiment of the present application;
[0058] Figure 2 This is a flow chart of a server cluster health inspection method in one embodiment of the present application;
[0059] Figure 3 A logical diagram of a server cluster health inspection method in one embodiment of the present application;
[0060] Figure 4 A flowchart of obtaining the functional modules of a server cluster and generating a dependency tree according to the association and dependency relationship between the functional modules in one embodiment of the present application;
[0061] Figure 5 A structural block diagram of a dependency tree of functional modules of a server cluster in one embodiment of the present application;
[0062] Figure 6 A flowchart of a step of generating a derived status data table for health inspection according to the dependency tree in one embodiment of the present application, wherein the derived status data table stores the name and status information of each functional module;
[0063] Figure 7 This is a structural block diagram of a server cluster health inspection device in one embodiment of the present application;
[0064] Figure 8 This is a diagram of the internal structure of a computer device in one embodiment of the present application. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0066] As described in the background technology, the current server health inspection framework structure is roughly as follows: the manual page actively triggers and issues commands, the management node is responsible for collecting the full amount of information related to the hardware and software modules of the cluster and the current node, and other nodes are responsible for collecting the full amount of information related to the hardware and software modules of their respective nodes, and after the collection is completed, a unified summary is generated to generate a report. The current triggering scenario is relatively simple, and it is a full inspection, which causes a waste of resources and is not conducive to the information location of abnormal modules.
[0067] In order to solve the above problems, the embodiment of the present invention creatively proposes a server cluster health inspection method. When an alarm message appears in the cluster or each node, a targeted health inspection is performed on the module to which it belongs and related to the alarm message, and the module information is collected. This targeted health inspection mechanism that does not require manual triggering can not only obtain abnormal information on the environment in a timely manner, but also reduce the time consumption of the comprehensive health inspection process and the burden of the inspection function, thereby improving the efficiency of the health inspection function.
[0068] The server cluster health inspection method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server cluster 101 through the network. Among them, the terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server cluster 101 can be implemented with an independent server or a server cluster composed of multiple servers. The server cluster 101 is composed of functional modules such as hardware and software modules of each server node, and the server cluster 101 performs health inspections on itself. The terminal 102 can check the inspection report to understand the functional modules that have failed, which is convenient for maintenance and replacement.
[0069] In one embodiment, Figure 2 , Figure 3 As shown, a server cluster health inspection method is provided, which is applied to Figure 1 Taking the server cluster 101 in the example as an example, the following steps are included:
[0070] Step S1, obtaining the functional modules of the server cluster, and generating a dependency tree according to the association and dependency relationship between the functional modules;
[0071] Step S2, generating a derived status data table for health inspection according to the dependency tree, wherein the derived status data table stores the name and status information of each functional module;
[0072] Step S3, in response to the target functional module generating an alarm or being detected to have a fault, updating the state information of the target functional module in the derived state data table from a normal state to an abnormal state;
[0073] Step S4, regularly traversing the state information in the derived state data table, taking the function module in the abnormal state as the abnormal function module, obtaining the dependent function modules that are associated with and dependent on the abnormal function module, and forming a set to be inspected;
[0074] Step S5, perform a health inspection on the set to be inspected, generate an inspection report and save it.
[0075] Among them, the functional modules are roughly divided into cluster type and node type. Cluster type: cluster configuration, cluster status, cluster authorization, storage pool, network, version, etc. Node type: disk temperature, CPU, fan, power supply, network card, OSD, memory usage, high availability, etc.
[0076] Specifically, cluster alarm refers to the notification or warning mechanism automatically triggered by the system in the cluster management system when a part or the whole operation of the cluster is abnormal or reaches a preset threshold. Health inspection is a systematic work to conduct a comprehensive inspection of the cluster as a whole and its various components to evaluate its operation status, performance and potential problems.
[0077] This embodiment manages the association of each functional module of the server cluster by generating a dependency tree, and generates a derived status data table for health inspection based on the dependency tree, wherein the name and status information of each functional module are stored in the derived status data table. When the status information in the derived status data table is abnormal, the abnormal functional module and the dependent functional module are formed into a to-be-inspected set based on the dependent functional module that has an association and dependency relationship with the abnormal functional module to implement a targeted health inspection. When an alarm message appears in the cluster or each node, a targeted health inspection is performed on the modules to which it belongs and related to the alarm message, and the information of the modules is collected. The targeted health inspection mechanism does not require manual triggering, which can not only obtain abnormal information on the environment in a timely manner, but also reduces the time consumption of the comprehensive health inspection process and the burden of the inspection function, thereby improving the efficiency of the health inspection function.
[0078] like Figure 4 As shown, in this embodiment, the step of obtaining the functional modules of the server cluster and generating a dependency tree according to the association and dependency relationship between the functional modules includes:
[0079] Step S11, obtaining the hardware and software modules of each server node in the server cluster, and assigning preset numbers to the hardware and software modules to form multiple functional modules;
[0080] Step S12, obtaining the association and dependency relationship between the functional modules, using the name or number of the functional module as a key value (Key), and using the number of the functional module that depends on the functional module as an attribute value (Value);
[0081] Step S13: Connect the names of the functional modules according to the attribute values to form a dependency tree.
[0082] Generate the following information for the association and dependency between each functional module: Figure 5 The dependency tree of some functional modules shown in FIG. A dependency tree is a tree structure used to represent the dependency relationship between various structural modules. It is understandable that each functional module in the dependency tree is assigned a special number or name. Figure 5 The name in can be either text or English abbreviation. The dependency tree can clearly show the association and dependency relationship between each functional module.
[0083] like Figure 6 As shown, in this embodiment, the derived status data table for health inspection is generated according to the dependency tree, and the name and status information of each functional module stored in the derived status data table includes:
[0084] Step S21, establishing a derived status data table for health inspection, setting the derived status data table to include the name and status information of the functional module;
[0085] Step S22, traverse each functional module in the dependency tree, and fill the name and status information of each functional module in the derived status data table, wherein the status information includes a normal state and an abnormal state, wherein the normal state is represented by a first data and the abnormal state is represented by a second data.
[0086] This embodiment can update the inspection module status data table according to the module to which the alarm belongs, as a basis for directional inspection.
[0087] The module information and dependency relationships in the dependency tree can be traversed and converted into a dictionary (or list, depending on specific needs). Figure 5 In the dependency tree, each module can be assigned a special number. In the data exchange format (json) file, the name or number of each module is used as the 'Key' value, and the corresponding dependent module number is the 'Value' value. Write each module and write it to the json file as the read file when the health inspection is triggered. For example, the following format:
[0088]
[0089]
[0090] In order to realize the directional health inspection function, it is also necessary to establish a status data table derived from the health inspection items. Its main function is to update the status information of the inspection function module according to the alarm information. Its general structure is shown in Table 1. The derived status data table only records the status information of each module. "1" means normal and "0" means abnormal. When the cluster is built, the status information of all modules is normal. With the generation of the first alarm, the multi-attribute modules are classified according to the content of the alarm, and the health inspection status table is updated. When the alarm is restored, the corresponding module status in the data table will also be restored.
[0091] Table 1 Derivative status data table
[0092]
[0093] The normal state is represented by the first data "1", and the abnormal state is represented by the second data "0".
[0094] like Figure 3 As shown, in this embodiment, the server cluster health inspection method also includes:
[0095] Traversing each functional module in the dependency tree, obtaining the key value and attribute value of each functional module and converting them into a dictionary or a list;
[0096] Writing the dictionary or list of each functional module into a data exchange format (json) file of the dependency tree, wherein the data exchange format (json) file is used to be triggered and read during health inspection;
[0097] In response to obtaining a function module associated with and dependent on the abnormal function module, searching a data exchange format (json) file of the dependency tree for a function module associated with and dependent on the abnormal function module as a dependent function module, and forming a to-be-inspected set with the abnormal function module and the dependent function module;
[0098] In response to forming a to-be-inspected set after traversing the derived status data table, traversing a data exchange format (json) file corresponding to each functional module in the to-be-inspected set to obtain an inspection item;
[0099] Determine whether there is an ongoing inspection task in the server cluster;
[0100] If there is an ongoing inspection task in the server cluster, cancel the inspection command;
[0101] If there is no inspection task in progress in the server cluster, issuing an inspection command according to the inspection item;
[0102] In response to receiving the inspection command, performing a directed health inspection according to the inspection items;
[0103] In response to cancelling the issuance of the inspection command, increasing the period of regularly traversing the derivative status data table;
[0104] In response to generating the inspection report, the period of regularly traversing the derived status data table is reduced.
[0105] In order to realize the adaptive timing inspection function of health inspection, a feedback balance mechanism is added to the inspection strategy. Figure 3 As shown, since alarms are constantly changing, new alarms are generated and existing alarms are restored, in order to obtain the latest inspection information more timely, after the directional health inspection completes the report generation, the cycle of the health inspection scheduled task is reduced to update the inspection information status faster. However, the cycle of the scheduled task will not decrease with the number of health inspections. After determining the inspection items that require directional inspections, it is determined whether there are tasks being inspected. If so, it means that the cycle of the scheduled task is too short, resulting in task tailgating. Therefore, the inspection command to be issued should be canceled, and the cycle of the health inspection scheduled task should be increased. Through this mechanism, the scheduled cycle of the health inspection reaches a dynamic balance state, ensuring that the information of the inspection items can be obtained in a timely manner without conflicting tasks.
[0106] Before issuing a directional inspection task, it will determine whether there is a scheduled task running to prevent task conflicts, and based on this, dynamically adjust the task cycle. An adaptive scheduled inspection strategy is designed. By continuously adjusting the scheduled task cycle, the health inspection function can record the environment abnormal module information in a timely manner, greatly reducing the lag of health inspection information.
[0107] In order to ensure the dynamic management of the server cluster, when the server nodes in the server cluster increase or decrease, the function module, dependency tree, derived state data table and dependency tree data exchange format (json) file of the server cluster need to be updated in time. Therefore, in this embodiment, the server cluster health inspection method also includes:
[0108] In response to the increase or decrease of server nodes in the server cluster, the function modules added or decreased in the server cluster are obtained, and the dependency tree, the derived state data table and the data exchange format (json) file of the dependency tree are updated according to the added or decreased function modules.
[0109] By dynamically and in real time detecting whether the server cluster has changed, and timely updating the dependency tree, derived status data table, and dependency tree data exchange format (json) file according to the added or reduced functional modules, it is possible to ensure the information of the inspection items of the controlled functional modules, manage the corresponding functional modules in a timely manner, and realize adaptive scheduled inspection of health inspections.
[0110] like Figure 3 As shown, in this embodiment, the server cluster health inspection method also includes:
[0111] After traversing the status information in the derived status data table, if there is no abnormal function module, determining whether to actively trigger a full inspection command;
[0112] If the full inspection command is actively triggered, a full health inspection is performed on the functional modules of the server cluster, and an inspection report is generated and saved.
[0113] In view of the current health inspection method that can only be actively triggered or scheduled full inspection, this application proposes an adaptive timed directional strategy. The main mechanism of the strategy is as follows: during the cluster construction process, a derived status data table of the health inspection function module and a json file generated according to the dependency tree of the function module will be generated. After the cluster is built, a default value will be set as the period for the health inspection function module to regularly traverse the derived status data table. If the traversal result shows that the module status in the data table is normal, there is no need to perform a health inspection. If the user needs to obtain health inspection information, it will be manually triggered, and a full health inspection will be performed to obtain the inspection information of all function modules. If the traversal result shows that there are abnormal items in the function module in the derived status data table, the abnormal function module in the data table will be obtained, and the abnormal module will be recorded after the traversal is completed. The dependent function modules of the abnormal module are searched in the json file of the dependency tree, and these modules are sent as inspection items of the health inspection. Before issuing the command, it is also necessary to judge whether there is an ongoing health inspection task in the environment. If it exists, cancel the task here. If it does not exist, issue the command and perform targeted health inspection according to the inspection items. After generating the health inspection report, save it for users to download. The specific process is as follows Figure 3 shown.
[0114] Under the method and strategy of targeted and scheduled health inspection, the mechanism for users to actively send full health inspection is retained so that they can obtain full health inspection information.
[0115] like Figure 3 As shown, in this embodiment, the server cluster health inspection method also includes:
[0116] When generating an inspection report, the status information in the derived status data table is updated according to the inspection result of the inspection report; when the abnormal function module is not faulty, the abnormal status of the abnormal function module in the derived status data table corresponding to the abnormal function module is corrected to a normal status; when there is a faulty function module, the normal status of the faulty function module in the derived status data table corresponding to the faulty function module is corrected to an abnormal status;
[0117] In response to a request to download the inspection report, the generated inspection report is provided to the user for downloading.
[0118] like Figure 2 As shown, in this embodiment, the server cluster health inspection method also includes:
[0119] Step S6: after the inspection report is generated, if there is a faulty functional module, a fault alarm information is generated based on the faulty functional module.
[0120] See also Figure 3 , the detailed process is:
[0121] (1) Build a cluster environment, generate a health inspection derived status data table, and generate a dependency tree json file based on the dependency relationships between the health inspection modules.
[0122] (2) The generation and recovery of environmental alarms will update the status of each module in the derived status data table. The health inspection function has a scheduled task, which will periodically traverse the derived status data table to check whether there are any abnormal items.
[0123] (3) If there are no abnormal items, the health inspection task will not be issued. If the user needs to obtain health inspection information, it needs to be manually triggered to perform a full inspection.
[0124] (4) If there are any abnormal items, obtain the dependent modules in the JSON file based on the abnormal module, use these modules as inspection items for health inspection, and issue commands.
[0125] (5) Before issuing the command, determine whether there is an ongoing health inspection task. If so, cancel the health inspection command and increase the period of the health inspection scheduled task. If not, issue the command normally, complete the health inspection and generate a report for the user to download, and reduce the period of the health inspection scheduled task.
[0126] In the above-mentioned server cluster health inspection method, the functional modules of the server cluster are associated and managed by generating a dependency tree, and a derived status data table for health inspection is generated according to the dependency tree. The name and status information of each functional module are stored in the derived status data table. When the status information in the derived status data table is an abnormal state, based on the dependent functional modules that are associated and dependent with the abnormal functional modules, the abnormal functional modules and the dependent functional modules are formed into a to-be-inspected set to realize targeted health inspection. When alarm information appears in the cluster or each node, a targeted health inspection is performed on the modules to which it belongs and related to the alarm information, and the information of the modules is collected. The targeted health inspection mechanism does not need to be manually triggered, which can not only obtain abnormal information on the environment in a timely manner, but also reduce the time consumption of the comprehensive health inspection process and the burden of the inspection function, thereby improving the efficiency of the health inspection function.
[0127] It should be understood that although Figure 2-Figure 6 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-Figure 6 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0128] In one embodiment, Figure 7 As shown, a server cluster health inspection device 100 is provided, including: a dependency tree generation module 1, a derivative state data table generation module 2, a state management module 3, a to-be-inspected set management module 4, and an inspection management module 5.
[0129] The dependency tree generation module 1 is used to obtain the functional modules of the server cluster and generate a dependency tree according to the association and dependency relationship between the functional modules.
[0130] The derived status data table generating module 2 is used to generate a derived status data table for health inspection according to the dependency tree, and the derived status data table stores the name and status information of each functional module.
[0131] The state management module 3 is used for updating the state information of the target function module in the derived state data table from a normal state to an abnormal state in response to the target function module generating an alarm or being detected to have a fault.
[0132] The inspection set management module 4 is used to periodically traverse the status information in the derived status data table, take the function modules in abnormal status as abnormal function modules, obtain the dependent function modules that are associated and dependent on the abnormal function modules, and form the inspection set.
[0133] The inspection management module 5 is used to perform health inspection on the set to be inspected, generate an inspection report and save it.
[0134] In this embodiment, the step of obtaining the functional modules of the server cluster and generating a dependency tree according to the association and dependency relationship between the functional modules includes:
[0135] Acquire hardware and software modules of each server node in the server cluster, and assign preset numbers to the hardware and software modules to form multiple functional modules;
[0136] Obtain the association and dependency relationship between the functional modules, use the name or number of the functional module as the key value (key), and use the number of the functional module that depends on the functional module as the attribute value (value);
[0137] The names of the functional modules are connected according to the attribute values to form a dependency tree.
[0138] In this embodiment, the derived status data table for health inspection is generated according to the dependency tree, and the name and status information of each functional module are stored in the derived status data table, including:
[0139] Establishing a derived status data table for health inspection, setting the derived status data table to include the name and status information of the functional module;
[0140] Each functional module in the dependency tree is traversed, and the name and status information of each functional module are filled in the derived status data table, wherein the status information includes a normal status and an abnormal status, wherein the normal status is represented by a first data, and the abnormal status is represented by a second data.
[0141] like Figure 7 As shown, in this embodiment, the server cluster health inspection device 100 further includes: a data exchange format conversion module 6 , an inspection item acquisition module 7 , an inspection command issuing module 8 and a timed traversal cycle management module 9 .
[0142] The data exchange format conversion module 6 is used to traverse each functional module in the dependency tree, obtain the key value and attribute value of each functional module and convert them into a dictionary or list; write the dictionary or list of each functional module into the data exchange format (json) file of the dependency tree, and the data exchange format (json) file is used to be triggered and read during health inspections.
[0143] In response to obtaining a function module that is associated with and dependent on the abnormal function module, the inspection item acquisition module 7 searches for a function module that is associated with and dependent on the abnormal function module in the data exchange format (json) file of the dependency tree as a dependent function module, and forms a to-be-inspected set with the abnormal function module and the dependent function module; in response to forming a to-be-inspected set after traversing the derived status data table, the inspection item is obtained by traversing the data exchange format (json) file corresponding to each function module in the to-be-inspected set.
[0144] The inspection command issuing module 8 is used to determine whether there is an ongoing inspection task in the server cluster; if there is an ongoing inspection task in the server cluster, cancel the issuance of this inspection command; if there is no ongoing inspection task in the server cluster, issue the inspection command according to the inspection item; in response to receiving the inspection command, perform a targeted health inspection according to the inspection item.
[0145] The timed traversal cycle management module 9 increases the period of the timed traversal of the derived state data table in response to canceling the issuance of the inspection command; and decreases the period of the timed traversal of the derived state data table in response to generating an inspection report.
[0146] like Figure 7 As shown, in this embodiment, the server cluster health inspection device 100 further includes: a full inspection module 10.
[0147] The full inspection module 10 is used to determine whether to actively trigger a full inspection command after traversing the status information in the derived status data table if there is no abnormal functional module; if the full inspection command is actively triggered, a full health inspection is performed on the functional modules of the server cluster, and an inspection report is generated and saved.
[0148] like Figure 7 As shown, in this embodiment, the server cluster health inspection device 100 further includes: a status information updating module 11 and an inspection report download management module 12 .
[0149] The status information update module 11 is used to update the status information in the derived status data table according to the inspection results of the inspection report when generating an inspection report; when the abnormal function module is not faulty, the abnormal state corresponding to the abnormal function module in the derived status data table is corrected to a normal state; when there is a faulty function module, the normal state corresponding to the faulty function module in the derived status data table is corrected to an abnormal state.
[0150] In response to a request for downloading an inspection report, the inspection report download management module 12 provides the generated inspection report for downloading by the user.
[0151] like Figure 7 As shown, in this embodiment, the server cluster health inspection device 100 further includes: an alarm module 13.
[0152] The alarm module 13 is used to generate an alarm message indicating a fault based on a functional module that has a fault after generating the inspection report, if there is a functional module that has a fault.
[0153] In the above-mentioned server cluster health inspection device, the functional modules of the server cluster are associated and managed by generating a dependency tree, and a derived status data table for health inspection is generated according to the dependency tree. The name and status information of each functional module are stored in the derived status data table. When the status information in the derived status data table is an abnormal state, based on the dependent functional modules that are associated and dependent with the abnormal functional modules, the abnormal functional modules and the dependent functional modules are formed into a set to be inspected to realize targeted health inspection. When alarm information appears in the cluster or each node, targeted health inspection is performed on the modules to which it belongs and related to the alarm information, and the information of the modules is collected. The targeted health inspection mechanism does not need to be manually triggered, which can not only obtain abnormal information on the environment in a timely manner, but also reduce the time consumption of the comprehensive health inspection process and the burden of the inspection function, thereby improving the efficiency of the health inspection function.
[0154] For the specific limitations of the server cluster health inspection device, please refer to the limitations of the server cluster health inspection method above, which will not be repeated here. Each module in the above-mentioned server cluster health inspection device can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0155] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0156] Obtain the functional modules of the server cluster, and generate a dependency tree according to the association and dependency relationship between the functional modules;
[0157] Generate a derived status data table for health inspection according to the dependency tree, wherein the derived status data table stores the name and status information of each functional module;
[0158] In response to the target functional module generating alarm information or being detected to have a fault, updating the state information of the target functional module in the derived state data table from a normal state to an abnormal state;
[0159] Periodically traverse the state information in the derived state data table, take the function module in abnormal state as the abnormal function module, obtain the dependent function module that has an association and dependency relationship with the abnormal function module, and form a set to be inspected;
[0160] Perform a health inspection on the set to be inspected, generate an inspection report and save it.
[0161] In one embodiment, the computer program further implements the following steps when executed by a processor:
[0162] The step of obtaining the functional modules of the server cluster and generating a dependency tree according to the association and dependency relationship between the functional modules includes:
[0163] Acquire hardware and software modules of each server node in the server cluster, and assign preset numbers to the hardware and software modules to form multiple functional modules;
[0164] Obtain the association and dependency relationship between the functional modules, use the name or number of the functional module as the key value (key), and use the number of the functional module that depends on the functional module as the attribute value (value);
[0165] The names of the functional modules are connected according to the attribute values to form a dependency tree.
[0166] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0167] The derived status data table for health inspection is generated according to the dependency tree, and the name and status information of each functional module are stored in the derived status data table, including:
[0168] Establishing a derived status data table for health inspection, setting the derived status data table to include the name and status information of the functional module;
[0169] Each functional module in the dependency tree is traversed, and the name and status information of each functional module are filled in the derived status data table, wherein the status information includes a normal status and an abnormal status, wherein the normal status is represented by a first data, and the abnormal status is represented by a second data.
[0170] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0171] Traversing each functional module in the dependency tree, obtaining the key value and attribute value of each functional module and converting them into a dictionary or a list;
[0172] Writing the dictionary or list of each functional module into a data exchange format (json) file of the dependency tree, wherein the data exchange format (json) file is used to be triggered and read during health inspection;
[0173] In response to obtaining a function module associated with and dependent on the abnormal function module, searching a data exchange format (json) file of the dependency tree for a function module associated with and dependent on the abnormal function module as a dependent function module, and forming a to-be-inspected set with the abnormal function module and the dependent function module;
[0174] In response to forming a to-be-inspected set after traversing the derived status data table, traversing a data exchange format (json) file corresponding to each functional module in the to-be-inspected set to obtain an inspection item;
[0175] Determine whether there is an ongoing inspection task in the server cluster;
[0176] If there is an ongoing inspection task in the server cluster, cancel the inspection command;
[0177] If there is no inspection task in progress in the server cluster, issuing an inspection command according to the inspection item;
[0178] In response to receiving the inspection command, performing a directed health inspection according to the inspection items;
[0179] In response to cancelling the issuance of the inspection command, increasing the period of regularly traversing the derivative status data table;
[0180] In response to generating the inspection report, the period of regularly traversing the derived status data table is reduced.
[0181] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0182] After traversing the status information in the derived status data table, if there is no abnormal function module, determining whether to actively trigger a full inspection command;
[0183] If the full inspection command is actively triggered, a full health inspection is performed on the functional modules of the server cluster, and an inspection report is generated and saved.
[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0185] When generating an inspection report, the status information in the derived status data table is updated according to the inspection result of the inspection report; when the abnormal function module is not faulty, the abnormal status of the abnormal function module in the derived status data table corresponding to the abnormal function module is corrected to a normal status; when there is a faulty function module, the normal status of the faulty function module in the derived status data table corresponding to the faulty function module is corrected to an abnormal status;
[0186] In response to a request to download the inspection report, the generated inspection report is provided to the user for downloading.
[0187] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0188] After the inspection report is generated, if there is a faulty functional module, fault alarm information is generated based on the faulty functional module.
[0189] For specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the server cluster health inspection method above, which will not be repeated here.
[0190] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in Figure Y. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store server cluster health inspection data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a server cluster health inspection method is implemented.
[0191] Those skilled in the art will understand that the structure shown in FIG. Y is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0192] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0193] Obtain the functional modules of the server cluster, and generate a dependency tree according to the association and dependency relationship between the functional modules;
[0194] Generate a derived status data table for health inspection according to the dependency tree, wherein the derived status data table stores the name and status information of each functional module;
[0195] In response to the target functional module generating alarm information or being detected to have a fault, updating the state information of the target functional module in the derived state data table from a normal state to an abnormal state;
[0196] Periodically traverse the state information in the derived state data table, take the function module in abnormal state as the abnormal function module, obtain the dependent function module that has an association and dependency relationship with the abnormal function module, and form a set to be inspected;
[0197] Perform a health inspection on the set to be inspected, generate an inspection report and save it.
[0198] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0199] The step of obtaining the functional modules of the server cluster and generating a dependency tree according to the association and dependency relationship between the functional modules includes:
[0200] Acquire hardware and software modules of each server node in the server cluster, and assign preset numbers to the hardware and software modules to form multiple functional modules;
[0201] Obtain the association and dependency relationship between the functional modules, use the name or number of the functional module as the key value (key), and use the number of the functional module that depends on the functional module as the attribute value (value);
[0202] The names of the functional modules are connected according to the attribute values to form a dependency tree.
[0203] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0204] The derived status data table for health inspection is generated according to the dependency tree, and the name and status information of each functional module are stored in the derived status data table, including:
[0205] Establishing a derived status data table for health inspection, setting the derived status data table to include the name and status information of the functional module;
[0206] Each functional module in the dependency tree is traversed, and the name and status information of each functional module are filled in the derived status data table, wherein the status information includes a normal status and an abnormal status, wherein the normal status is represented by a first data, and the abnormal status is represented by a second data.
[0207] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0208] Traversing each functional module in the dependency tree, obtaining the key value and attribute value of each functional module and converting them into a dictionary or a list;
[0209] Writing the dictionary or list of each functional module into a data exchange format (json) file of the dependency tree, wherein the data exchange format (json) file is used to be triggered and read during health inspection;
[0210] In response to obtaining a function module associated with and dependent on the abnormal function module, searching a data exchange format (json) file of the dependency tree for a function module associated with and dependent on the abnormal function module as a dependent function module, and forming a to-be-inspected set with the abnormal function module and the dependent function module;
[0211] In response to forming a to-be-inspected set after traversing the derived status data table, traversing a data exchange format (json) file corresponding to each functional module in the to-be-inspected set to obtain an inspection item;
[0212] Determine whether there is an ongoing inspection task in the server cluster;
[0213] If there is an ongoing inspection task in the server cluster, cancel the inspection command;
[0214] If there is no inspection task in progress in the server cluster, issuing an inspection command according to the inspection item;
[0215] In response to receiving the inspection command, performing a directed health inspection according to the inspection items;
[0216] In response to cancelling the issuance of the inspection command, increasing the period of regularly traversing the derivative status data table;
[0217] In response to generating the inspection report, the period of regularly traversing the derived status data table is reduced.
[0218] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0219] After traversing the status information in the derived status data table, if there is no abnormal function module, determining whether to actively trigger a full inspection command;
[0220] If the full inspection command is actively triggered, a full health inspection is performed on the functional modules of the server cluster, and an inspection report is generated and saved.
[0221] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0222] When generating an inspection report, the status information in the derived status data table is updated according to the inspection result of the inspection report; when the abnormal function module is not faulty, the abnormal status of the abnormal function module in the derived status data table corresponding to the abnormal function module is corrected to a normal status; when there is a faulty function module, the normal status of the faulty function module in the derived status data table corresponding to the faulty function module is corrected to an abnormal status;
[0223] In response to a request to download the inspection report, the generated inspection report is provided to the user for downloading.
[0224] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0225] After the inspection report is generated, if there is a faulty functional module, fault alarm information is generated based on the faulty functional module.
[0226] For specific limitations on the steps implemented when the processor executes the computer program, please refer to the limitations on the server cluster health inspection method above, which will not be repeated here.
[0227] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0228] Obtain the functional modules of the server cluster, and generate a dependency tree according to the association and dependency relationship between the functional modules;
[0229] Generate a derived status data table for health inspection according to the dependency tree, wherein the derived status data table stores the name and status information of each functional module;
[0230] In response to the target functional module generating alarm information or being detected to have a fault, updating the state information of the target functional module in the derived state data table from a normal state to an abnormal state;
[0231] Periodically traverse the state information in the derived state data table, take the function module in abnormal state as the abnormal function module, obtain the dependent function module that has an association and dependency relationship with the abnormal function module, and form a set to be inspected;
[0232] Perform a health inspection on the set to be inspected, generate an inspection report and save it.
[0233] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0234] The step of obtaining the functional modules of the server cluster and generating a dependency tree according to the association and dependency relationship between the functional modules includes:
[0235] Acquire hardware and software modules of each server node in the server cluster, and assign preset numbers to the hardware and software modules to form multiple functional modules;
[0236] Obtain the association and dependency relationship between the functional modules, use the name or number of the functional module as the key value (key), and use the number of the functional module that depends on the functional module as the attribute value (value);
[0237] The names of the functional modules are connected according to the attribute values to form a dependency tree.
[0238] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0239] The derived status data table for health inspection is generated according to the dependency tree, and the name and status information of each functional module are stored in the derived status data table, including:
[0240] Establishing a derived status data table for health inspection, setting the derived status data table to include the name and status information of the functional module;
[0241] Each functional module in the dependency tree is traversed, and the name and status information of each functional module are filled in the derived status data table, wherein the status information includes a normal status and an abnormal status, wherein the normal status is represented by a first data, and the abnormal status is represented by a second data.
[0242] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0243] Traversing each functional module in the dependency tree, obtaining the key value and attribute value of each functional module and converting them into a dictionary or a list;
[0244] Writing the dictionary or list of each functional module into a data exchange format (json) file of the dependency tree, wherein the data exchange format (json) file is used to be triggered and read during health inspection;
[0245] In response to obtaining a function module associated with and dependent on the abnormal function module, searching a data exchange format (json) file of the dependency tree for a function module associated with and dependent on the abnormal function module as a dependent function module, and forming a to-be-inspected set with the abnormal function module and the dependent function module;
[0246] In response to forming a to-be-inspected set after traversing the derived status data table, traversing a data exchange format (json) file corresponding to each functional module in the to-be-inspected set to obtain an inspection item;
[0247] Determine whether there is an ongoing inspection task in the server cluster;
[0248] If there is an ongoing inspection task in the server cluster, cancel the inspection command;
[0249] If there is no inspection task in progress in the server cluster, issuing an inspection command according to the inspection item;
[0250] In response to receiving the inspection command, performing a directed health inspection according to the inspection items;
[0251] In response to cancelling the issuance of the inspection command, increasing the period of regularly traversing the derivative status data table;
[0252] In response to generating the inspection report, the period of regularly traversing the derived status data table is reduced.
[0253] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0254] After traversing the status information in the derived status data table, if there is no abnormal function module, determining whether to actively trigger a full inspection command;
[0255] If the full inspection command is actively triggered, a full health inspection is performed on the functional modules of the server cluster, and an inspection report is generated and saved.
[0256] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0257] When generating an inspection report, the status information in the derived status data table is updated according to the inspection result of the inspection report; when the abnormal function module is not faulty, the abnormal status of the abnormal function module in the derived status data table corresponding to the abnormal function module is corrected to a normal status; when there is a faulty function module, the normal status of the faulty function module in the derived status data table corresponding to the faulty function module is corrected to an abnormal status;
[0258] In response to a request to download the inspection report, the generated inspection report is provided to the user for downloading.
[0259] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0260] After the inspection report is generated, if there is a faulty functional module, fault alarm information is generated based on the faulty functional module.
[0261] For specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the server cluster health inspection method above, which will not be repeated here.
[0262] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0263] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0264] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A server cluster health inspection method, characterized in that: The method comprises: Obtain the functional modules of the server cluster, and generate a dependency tree according to the association and dependency relationship between the functional modules; Generate a derived status data table for health inspection according to the dependency tree, wherein the derived status data table stores the name and status information of each functional module; In response to the target functional module generating alarm information or being detected to have a fault, updating the state information of the target functional module in the derived state data table from a normal state to an abnormal state; Periodically traverse the state information in the derived state data table, take the function module in abnormal state as the abnormal function module, obtain the dependent function module that has an association and dependency relationship with the abnormal function module, and form a set to be inspected; Perform a health inspection on the set to be inspected, generate an inspection report and save it.
2. The server cluster health inspection method according to claim 1, characterized in that: The step of obtaining the functional modules of the server cluster and generating a dependency tree according to the association and dependency relationship between the functional modules includes: Acquire hardware and software modules of each server node in the server cluster, and assign preset numbers to the hardware and software modules to form multiple functional modules; Obtain the association and dependency relationship between the functional modules, use the name or number of the functional module as the key value, and use the number of the functional module that depends on the functional module as the attribute value; The names of the functional modules are connected according to the attribute values to form a dependency tree.
3. The server cluster health inspection method according to claim 2, characterized in that: The derived status data table for health inspection is generated according to the dependency tree, and the name and status information of each functional module are stored in the derived status data table, including: Establishing a derived status data table for health inspection, setting the derived status data table to include the name and status information of the functional module; Each functional module in the dependency tree is traversed, and the name and status information of each functional module are filled in the derived status data table, wherein the status information includes a normal status and an abnormal status, wherein the normal status is represented by a first data, and the abnormal status is represented by a second data.
4. The server cluster health inspection method according to claim 2, characterized in that: The server cluster health inspection method also includes: Traversing each functional module in the dependency tree, obtaining the key value and attribute value of each functional module and converting them into a dictionary or a list; Writing a dictionary or list of each functional module into a data exchange format file of the dependency tree, wherein the data exchange format file is used to be triggered and read during health inspection; In response to obtaining a function module associated with and dependent on the abnormal function module, searching the data exchange format file of the dependency tree for a function module associated with and dependent on the abnormal function module as a dependent function module, and forming a to-be-inspected set with the abnormal function module and the dependent function module; In response to forming a to-be-inspected set after traversing the derived state data table, traversing the data exchange format file corresponding to each functional module in the to-be-inspected set to obtain an inspection item; Determine whether there is an ongoing inspection task in the server cluster; If there is an ongoing inspection task in the server cluster, cancel the inspection command; If there is no inspection task in progress in the server cluster, issuing an inspection command according to the inspection item; In response to receiving the inspection command, performing a directed health inspection according to the inspection items; In response to cancelling the issuance of the inspection command, increasing the period of regularly traversing the derivative status data table; In response to generating the inspection report, the period of regularly traversing the derived status data table is reduced.
5. The server cluster health inspection method according to claim 1, characterized in that: The server cluster health inspection method also includes: After traversing the status information in the derived status data table, if there is no abnormal function module, determining whether to actively trigger a full inspection command; If the full inspection command is actively triggered, a full health inspection is performed on the functional modules of the server cluster, and an inspection report is generated and saved.
6. The server cluster health inspection method according to claim 1 or 5, characterized in that: The server cluster health inspection method also includes: When generating an inspection report, the status information in the derived status data table is updated according to the inspection result of the inspection report; when the abnormal function module is not faulty, the abnormal status of the abnormal function module in the derived status data table corresponding to the abnormal function module is corrected to a normal status; when there is a faulty function module, the normal status of the faulty function module in the derived status data table corresponding to the faulty function module is corrected to an abnormal status; In response to a request to download the inspection report, the generated inspection report is provided to the user for downloading.
7. The server cluster health inspection method according to claim 6, characterized in that: The server cluster health inspection method also includes: After the inspection report is generated, if there is a faulty functional module, fault alarm information is generated based on the faulty functional module.
8. A server cluster health inspection device, characterized in that: The device comprises: A dependency tree generation module is used to obtain the functional modules of the server cluster and generate a dependency tree according to the association and dependency relationship between the functional modules; A derived state data table generation module is used to generate a derived state data table for health inspection according to the dependency tree, wherein the derived state data table stores the name and state information of each functional module; A state management module, configured to update the state information of the target function module in the derived state data table from a normal state to an abnormal state in response to the target function module generating an alarm or being detected to have a fault; A to-be-inspected set management module is used to periodically traverse the state information in the derived state data table, take the function modules in abnormal state as abnormal function modules, obtain the dependent function modules that are associated with and dependent on the abnormal function modules, and form a to-be-inspected set; The inspection management module is used to perform health inspection on the set to be inspected, generate and save an inspection report.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Cluster fault detection method and device
CN110716842A
Cluster inspection method, device and system
CN113472577A
Inspection report generation method and device, computer equipment and storage medium
CN115695266A
Automatic inspection method and system for cloud platform cluster monitoring index data
CN116340110A
Server hardware state monitoring method and apparatus, electronic device, and medium
WO2022134352A1
