Cluster inspection method and device, electronic equipment and storage medium
By implementing inspection permission verification, permission information verification and cluster inspection options display in Kubernetes cluster, the problem of difficult to accurately grasp the cluster configuration and operating status in the existing technology is solved, and one-click automatic inspection is realized , improves inspection efficiency and accuracy.
Patent Information
- Application Number
- CN202411731336.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-18
AI Technical Summary
The existing technology is difficult to achieve real-time and accurate grasp of Kubernetes cluster configuration items and overall resource operation, resulting in heavy operations and easy to miss.
By responsive to the inspection permission verification operation, obtain input permission information and verify it, display cluster inspection options, including configuration inspection options and running inspection options. Then, in response to the inspection trigger operation, a one-click automatic inspection of the target cluster is carried out to obtain the cluster inspection results.
Real-time and accurate grasp of cluster configuration and operating status is achieved, reducing the workload of operators, avoiding omissions, and improving the efficiency and accuracy of patrols.
Smart Images

Figure CN119473512A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer application technology, and in particular to a cluster inspection method, device, electronic equipment and storage medium. Background Art
[0002] As the scale of Kubernetes clusters in production environments expands, the related cluster configuration items and overall resource operation data become more and more complicated.
[0003] In the related art, the cluster is usually inspected regularly by manually operating cluster inspection tools to grasp the cluster configuration items and the overall resource operation status. However, the operation work of the operator is relatively heavy and there are usually omissions, so it is difficult to achieve real-time and accurate grasp of the cluster configuration items and the overall resource operation status. Summary of the invention
[0004] The present invention provides a cluster inspection method, device, electronic device and storage medium to solve the current technical problem of being difficult to achieve real-time and accurate grasp of cluster configuration items and overall resource operation status.
[0005] According to one aspect of the present invention, a cluster inspection method is provided, the method comprising:
[0006] In response to the inspection authority verification operation, obtaining input authority information;
[0007] Verifying the input permission information, and displaying cluster inspection options when the input permission information meets the verification conditions, wherein the cluster inspection options include configuration inspection options and / or operation inspection options;
[0008] In response to the inspection triggering operation for the cluster inspection option, the target cluster is inspected to obtain a cluster inspection result.
[0009] According to another aspect of the present invention, a cluster inspection device is provided, the device comprising:
[0010] The authority verification module is used to obtain input authority information in response to the inspection authority verification operation;
[0011] An option display module, used to verify the input permission information, and display cluster inspection options when the input permission information meets the verification conditions, wherein the cluster inspection options include configuration inspection options and / or operation inspection options;
[0012] The cluster inspection module is used to inspect the target cluster in response to the inspection trigger operation for the cluster inspection option, and obtain the cluster inspection result.
[0013] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the cluster inspection method described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the cluster inspection method described in any embodiment of the present invention when executed.
[0018] The technical solution of the embodiment of the present invention obtains input permission information by responding to the inspection permission verification operation; verifies the input permission information, and displays cluster inspection options when the input permission information meets the verification conditions, wherein the cluster inspection options include configuration inspection options and / or operation inspection options; and inspects the target cluster in response to the inspection trigger operation for the cluster inspection options to obtain cluster inspection results. The effect of one-click automatic inspection of the configuration and operation status of the target cluster is achieved, and real-time and accurate grasp of cluster configuration items and overall resource operation status is achieved.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] 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.
[0021] Figure 1 is a flow chart of a cluster inspection method provided according to Embodiment 1 of the present invention;
[0022] Figure 2 is a flow chart of a cluster inspection method provided according to Embodiment 2 of the present invention;
[0023] Figure 3This is an overall flow chart of a cluster configuration inspection provided according to an embodiment of the present invention;
[0024] Figure 4 is a flow chart of a cluster inspection method provided according to Embodiment 3 of the present invention;
[0025] Figure 5 This is an overall flow chart of a cluster operation inspection provided according to an embodiment of the present invention;
[0026] Figure 6 is a structural schematic diagram of a cluster inspection device provided according to Embodiment 4 of the present invention;
[0027] Figure 7 It is a structural schematic diagram of an electronic device for implementing the cluster inspection method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Embodiment 1
[0031] Figure 1 A flow chart of a cluster inspection method is provided for the first embodiment of the present invention. This embodiment is applicable to the case of comprehensive inspection of a cluster and cluster nodes. The method can be executed by a cluster inspection device. The cluster inspection device can be implemented in the form of hardware and / or software. The cluster inspection device can be configured in a computer. Figure 1 As shown, the method includes:
[0032] S110 . In response to the inspection authority verification operation, obtain input authority information.
[0033] The inspection authority verification operation can be understood as an operation of verifying the inspection authority of the operator. Optionally, the inspection authority verification operation can be an operation of inputting the operator's authority information related to the inspection authority. Exemplarily, the inspection authority verification operation can be inputting the operator's name and the operation verification code corresponding to the name.
[0034] The input authority information may be information input based on the inspection authority verification operation. Optionally, the input authority information may include the name of the operator and an operation verification code corresponding to the name.
[0035] S120: Verify the input permission information, and display a cluster inspection option if the input permission information meets the verification condition.
[0036] The cluster inspection options include configuration inspection options and / or operation inspection options.
[0037] The configuration inspection option may be understood as an option related to cluster configuration inspection. The operation inspection option may be understood as an option related to cluster operation status inspection.
[0038] In the embodiment of the present invention, by triggering the configuration inspection option, a one-click automatic inspection effect for the configuration of the target cluster can be achieved. By triggering the operation inspection option, a one-click automatic inspection effect for the operation status of the target cluster can be achieved.
[0039] S130 . In response to the inspection triggering operation for the cluster inspection option, inspect the target cluster to obtain a cluster inspection result.
[0040] The cluster inspection result can be understood as the output result of a one-click automatic inspection for the target cluster. Optionally, the cluster inspection result may include a configuration inspection result and / or an operation inspection result. The configuration inspection result is determined by triggering the configuration inspection option, and the operation inspection result is determined by triggering the operation inspection option.
[0041] Optionally, after obtaining the cluster inspection result, the method further includes:
[0042] Generate a target inspection report corresponding to the cluster inspection result, and send the target inspection report to the inspection monitoring terminal by email.
[0043] The target inspection report may be understood as a report related to cluster inspection results. In the embodiment of the present invention, the generation format of the target inspection report may be preset according to scenario requirements, and is not specifically limited here.
[0044] The inspection monitoring terminal can be understood as a terminal for monitoring cluster inspection. In the embodiment of the present invention, there can be one or more inspection monitoring terminals.
[0045] Based on the above embodiment, after the cluster inspection result is determined, the inspection report is automatically generated and sent to the inspection monitoring terminal, so that the inspection monitoring terminal can understand the configuration and operation status of the target cluster by regularly receiving the inspection report.
[0046] The technical solution of the embodiment of the present invention obtains input permission information by responding to the inspection permission verification operation; verifies the input permission information, and displays cluster inspection options when the input permission information meets the verification conditions, wherein the cluster inspection options include configuration inspection options and / or operation inspection options; and inspects the target cluster in response to the inspection trigger operation for the cluster inspection options to obtain cluster inspection results. The effect of one-click automatic inspection of the configuration and operation status of the target cluster is achieved, and real-time and accurate grasp of cluster configuration items and overall resource operation status is achieved.
[0047] Embodiment 2
[0048] Figure 2 This is a flow chart of a cluster inspection method provided in Embodiment 2 of the present invention. This embodiment is to inspect the target cluster in response to the inspection trigger operation for the cluster inspection option described in the above embodiment, and refine the cluster inspection result. Figure 2 As shown, the method includes:
[0049] S210: In response to the inspection authority verification operation, obtain input authority information.
[0050] S220: Verify the input permission information, and display a cluster inspection option if the input permission information meets the verification condition.
[0051] S230: Determine a target cluster in response to a trigger operation on the configuration inspection option.
[0052] The target cluster can be understood as a cluster to be configured for inspection, which can be a Kubernetes cluster.
[0053] S240, determining a management cluster and a business cluster in the target cluster, inspecting the cluster configuration of the management cluster according to a first cluster inspection rule to obtain a first inspection result, and inspecting the cluster configuration of the business cluster according to a second cluster inspection rule to obtain a second inspection result.
[0054] In the embodiment of the present invention, the target cluster may include a management cluster and a service cluster. The management cluster and the service cluster may be divided before the inspection.
[0055] Among them, the management cluster can be used to process management-related work, and the business cluster can be used to process business-related work; the management cluster can manage the business cluster.
[0056] The first cluster inspection rule and the second cluster inspection rule may be understood as two cluster inspection rules; the two may be different or the same.
[0057] In the embodiment of the present invention, specific cluster inspection rules can be preset according to the needs of the scene and are not specifically limited here.
[0058] The first inspection result can be understood as a configuration inspection result of a management cluster. The second inspection result can be understood as a configuration inspection result of a service cluster.
[0059] S250: Use the first inspection result and the second inspection result as cluster inspection results.
[0060] Optionally, after obtaining the second inspection result, the method further includes:
[0061] Determine a first cluster node in the management cluster, and inspect the node configuration of the first cluster node according to a first node inspection rule to obtain a third inspection result;
[0062] Determine a second cluster node in the business class cluster, and inspect the node configuration of the second cluster node according to the second node inspection rule to obtain a fourth inspection result;
[0063] The taking the first inspection result and the second inspection result as the cluster inspection result includes:
[0064] The first inspection result, the second inspection result, the third inspection result and the fourth inspection result are used as cluster inspection results.
[0065] The first cluster node may be a cluster node in the management cluster. In the embodiment of the present invention, the first cluster node may include multiple cluster nodes. Each cluster node may correspond to a server.
[0066] The first node inspection rule and the second node inspection rule may be understood as two cluster node inspection rules; the two may be different or the same.
[0067] In the embodiment of the present invention, the specific cluster node inspection rules can be preset according to the needs of the scene, and are not specifically limited here. The cluster node inspection rules may include inspection rules related to baseline security.
[0068] The third inspection result can be understood as a configuration inspection result of cluster nodes in a management cluster. The fourth inspection result can be understood as a configuration inspection result of cluster nodes in a service cluster.
[0069] Optionally, the first node inspection rule includes a management node inspection rule and a service node inspection rule; and inspecting the node configuration of the first cluster node according to the first node inspection rule to obtain a third inspection result includes:
[0070] Determine management nodes and service nodes in the first cluster nodes;
[0071] Inspecting the node configuration of the management node according to the management node inspection rule to obtain a first sub-inspection result, and inspecting the node configuration of the service node according to the service node inspection rule to obtain a second sub-inspection result;
[0072] The first sub-inspection result and the second sub-inspection result are used as the third inspection result.
[0073] The cluster nodes in the management cluster, that is, the first cluster nodes, may include management nodes and service nodes.
[0074] In the embodiment of the present invention, the division of the management nodes and the service nodes may be completed before the inspection.
[0075] Among them, management nodes can be used to process management-related tasks, and business nodes can be used to process business-related tasks; management nodes can manage business nodes.
[0076] The management node inspection rule and the service node inspection rule can be understood as two cluster node inspection rules; the two can be different or the same.
[0077] In the embodiment of the present invention, the above two specific cluster inspection rules can be preset according to the requirements of the scene, and are not specifically limited here.
[0078] The first sub-inspection result can be understood as a configuration inspection result of the management class nodes in the management class cluster. The second sub-inspection result can be understood as a configuration inspection result of the service class nodes in the management class cluster.
[0079] The technical solution of the embodiment of the present invention determines the target cluster by responding to the trigger operation for the configuration inspection option; determines the management cluster and the business cluster in the target cluster, inspects the cluster configuration of the management cluster according to the first cluster inspection rule to obtain the first inspection result, inspects the cluster configuration of the business cluster according to the second cluster inspection rule to obtain the second inspection result; and uses the first inspection result and the second inspection result as the cluster inspection result. The classified cluster configuration inspection is realized, and the accuracy of cluster registration inspection is improved.
[0080] The following is a further explanation of cluster configuration inspection:
[0081] In an embodiment of the present invention, cluster configuration inspection includes obtaining nodes and clusters, issuing inspection scripts, summarizing inspection results and generating reports. Specifically, permission verification is performed through the Cloud Container Engine (CCE) interface to obtain basic information about clusters and nodes in the target data center; inspection scripts are issued based on the basic information, and are divided into cluster inspections, node inspections, and security baseline inspections according to different inspection levels. The inspection results of all clusters and nodes are passed into the aggregation script as output parameters, and the inspection results are summarized and a report is generated; and the report is sent to the cluster management end via email. Among them, CCE is a Kubernetes cluster hosting service.
[0082] Figure 3 FIG. 1 is an overall flow chart of a cluster configuration inspection provided according to an embodiment of the present invention. Figure 3 As shown, specifically, obtain the full cluster list and each cluster node list respectively. At the cluster level, check whether the cluster type is a management cluster, check whether the management cluster-specific plug-in installation and management cluster-specific configuration are correct for the management cluster; check the business cluster plug-in installation and configuration for the business cluster; and finally perform a general configuration check.
[0083] Based on the solution of the embodiment of the present invention, a one-click automatic and comprehensive cluster configuration inspection is implemented, which can effectively assist the user's cluster inspection work and improve the user experience.
[0084] Embodiment 3
[0085] Figure 4This is a flow chart of a cluster inspection method provided in Embodiment 3 of the present invention. This embodiment is to inspect the target cluster in response to the inspection trigger operation for the cluster inspection option described in the above embodiment, and refine the cluster inspection result. Figure 4 As shown, the method includes:
[0086] S310: In response to the inspection authority verification operation, obtain input authority information.
[0087] S320: Verify the input permission information, and display a cluster inspection option if the input permission information meets the verification condition.
[0088] S330: Determine a target cluster in response to a trigger operation on the running inspection option.
[0089] The target cluster can be understood as a cluster to be inspected for running status, which can be a Kubernetes cluster.
[0090] In the embodiment of the present invention, the cluster to be inspected for configuration and the cluster to be inspected for running status may be the same as or different from each other.
[0091] S340. Determine the running cluster nodes and namespaces under the target cluster, inspect the running status of the cluster nodes according to the node running inspection rules to obtain a node inspection sequence, and inspect the running status of the namespace according to the space inspection rules to obtain a space inspection sequence.
[0092] The running cluster node may be understood as a cluster node running under the target cluster.
[0093] The namespace can be understood as a namespace running under the target cluster. The namespace is created by developers under the target cluster during the project development phase.
[0094] The node operation inspection rule and the space inspection rule can be understood as two different operation status inspection rules; the two can be different or the same.
[0095] In the embodiment of the present invention, specific operation status inspection rules can be preset according to the needs of the scene and are not specifically limited here.
[0096] The node inspection sequence can be understood as the inspection output parameters of the running status of the running cluster nodes. The space inspection sequence can be understood as the inspection output parameters of the running status of the namespace.
[0097] In the embodiment of the present invention, the inspection of the running status of the cluster may be periodic, and therefore, the output inspection parameter, that is, the output parameter, may be an inspection sequence.
[0098] Specifically, the inspection result can be determined by comparing the previous and next data in the inspection sequence.
[0099] S350. Determine a cluster inspection result according to the node inspection sequence and the space inspection sequence.
[0100] Optionally, after determining the cluster nodes and namespaces in the target cluster, the method further includes:
[0101] Determine the workload under the namespace, inspect the running status of the workload according to the load inspection rule, and obtain a load inspection sequence;
[0102] The determining the cluster inspection result according to the node inspection sequence and the space inspection sequence includes:
[0103] A cluster inspection result is determined according to the node inspection sequence, the space inspection sequence, and the load inspection sequence.
[0104] In the embodiment of the present invention, the workload under the namespace can be understood as an application that can be run on Kubernetes. The same namespace can include multiple workloads.
[0105] The load inspection rule may be understood as a rule for inspecting the operating status of the workload.
[0106] In the embodiment of the present invention, specific load inspection rules can be preset according to the needs of the scene and are not specifically limited here.
[0107] The load inspection sequence can be understood as an inspection parameter output of the operating status of the workload.
[0108] In the embodiment of the present invention, the inspection result can be determined by comparing multiple data in the inspection sequence and the previous and next data.
[0109] The technical solution of the embodiment of the present invention determines the target cluster by responding to the trigger operation for the operation inspection option; determines the operation cluster nodes and namespaces under the target cluster, inspects the operation status of the cluster nodes according to the node operation inspection rules to obtain a node inspection sequence, inspects the operation status of the namespace according to the space inspection rules to obtain a space inspection sequence; and determines the cluster inspection result according to the node inspection sequence and the space inspection sequence. The method of performing cluster operation status inspection by dividing dimensions (operation cluster nodes and namespaces) can improve the accuracy of cluster operation inspection.
[0110] The following is a further explanation of cluster operation inspection:
[0111] In an embodiment of the present invention, cluster operation inspection includes: performing permission verification through the CCE interface, obtaining basic information of cluster nodes and namespaces, obtaining different types of indicator information at different times based on the basic information, and comparing the results at different times; marking key items according to operation requirements; associating with information in the configuration management database (CMDB) to obtain relevant operation and maintenance information, such as application name, operation and maintenance department, and management personnel; and sending the generated reports or statements to the inspection and monitoring end mailbox at regular intervals.
[0112] Figure 5 FIG. 1 is an overall flow chart of a cluster operation inspection provided according to an embodiment of the present invention. Figure 5 As shown, specifically, obtain the full cluster list; set inspection rules of different granularities for multiple dimensions such as clusters, nodes, namespaces, and workloads in the cluster, and send inspection query requests to the Prometheus data source; query the relevant data of various resources such as the central processing unit (CPU), memory, and network connection table on the current day, the previous day, the current week, and the previous week (for example, indicators such as the highest utilization rate and the average utilization rate) and compare them to obtain changes in resource utilization rates; mark abnormal entries for each resource; aggregate the results into tables, tables, or reports, and send them to the inspection monitoring terminal by email.
[0113] Based on the solution of the embodiment of the present invention, a one-click automatic and comprehensive cluster operation inspection is implemented, which can effectively assist the user's cluster inspection work and improve the user experience.
[0114] Embodiment 4
[0115] Figure 6 This is a schematic diagram of the structure of a cluster inspection device provided in Embodiment 4 of the present invention. Figure 6 As shown, the device includes: an authority verification module 410 , an option display module 420 and a cluster inspection module 430 .
[0116] Among them, the authority verification module 410 is used to obtain input authority information in response to the inspection authority verification operation; the option display module 420 is used to verify the input authority information, and when the input authority information meets the verification conditions, display the cluster inspection options, wherein the cluster inspection options include configuration inspection options and / or operation inspection options; the cluster inspection module 430 is used to inspect the target cluster in response to the inspection trigger operation for the cluster inspection options, and obtain the cluster inspection results.
[0117] The technical solution of the embodiment of the present invention obtains input permission information by responding to the inspection permission verification operation; verifies the input permission information, and displays cluster inspection options when the input permission information meets the verification conditions, wherein the cluster inspection options include configuration inspection options and / or operation inspection options; and inspects the target cluster in response to the inspection trigger operation for the cluster inspection options to obtain cluster inspection results. The effect of one-click automatic inspection of the configuration and operation status of the target cluster is achieved, and real-time and accurate grasp of cluster configuration items and overall resource operation status is achieved.
[0118] Optionally, the cluster inspection device further includes:
[0119] The email sending module is used to generate a target inspection report corresponding to the cluster inspection result after the cluster inspection result is obtained, and send the target inspection report to the inspection monitoring terminal by email sending.
[0120] Optionally, the cluster inspection module 430 includes: a configuration inspection response unit, a cluster configuration inspection unit, and an inspection result determination unit;
[0121] The configuration inspection response unit is used to determine the target cluster in response to a trigger operation for the configuration inspection option;
[0122] The cluster configuration inspection unit is used to determine the management cluster and the service cluster in the target cluster, inspect the cluster configuration of the management cluster according to the first cluster inspection rule to obtain a first inspection result, and inspect the cluster configuration of the service cluster according to the second cluster inspection rule to obtain a second inspection result;
[0123] The inspection result determining unit is configured to use the first inspection result and the second inspection result as cluster inspection results.
[0124] Optionally, the cluster inspection module 430 further includes: a first configuration inspection unit and a second configuration inspection unit;
[0125] The first configuration inspection unit is used to determine the first cluster node in the management cluster after obtaining the second inspection result, and inspect the node configuration of the first cluster node according to the first node inspection rule to obtain a third inspection result;
[0126] The second configuration inspection unit is used to determine a second cluster node in the service class cluster, inspect the node configuration of the second cluster node according to the second node inspection rule, and obtain a fourth inspection result;
[0127] The inspection result determination unit is configured to use the first inspection result, the second inspection result, the third inspection result, and the fourth inspection result as cluster inspection results.
[0128] Optionally, the first node inspection rule includes a management node inspection rule and a service node inspection rule; and the first configuration inspection unit is specifically configured to:
[0129] Determine management nodes and service nodes in the first cluster nodes;
[0130] Inspecting the node configuration of the management node according to the management node inspection rule to obtain a first sub-inspection result, and inspecting the node configuration of the service node according to the service node inspection rule to obtain a second sub-inspection result;
[0131] The first sub-inspection result and the second sub-inspection result are used as the third inspection result.
[0132] Optionally, the cluster inspection module 430 includes: an operation inspection response unit, a cluster operation inspection unit, and an inspection result detection unit;
[0133] The operation inspection response unit is used to determine the target cluster in response to the trigger operation for the operation inspection option;
[0134] The cluster operation inspection unit is used to determine the operation cluster nodes and namespaces under the target cluster, inspect the operation status of the cluster nodes according to the node operation inspection rules to obtain a node inspection sequence, and inspect the operation status of the namespace according to the space inspection rules to obtain a space inspection sequence;
[0135] The inspection result detection unit is used to determine the cluster inspection result according to the node inspection sequence and the space inspection sequence.
[0136] Optionally, the cluster inspection module 430 further includes:
[0137] A workload inspection unit, configured to, after determining the cluster nodes and namespaces in the target cluster, determine the workload under the namespace, inspect the running state of the workload according to a load inspection rule, and obtain a load inspection sequence;
[0138] The inspection result detection unit is specifically used for:
[0139] A cluster inspection result is determined according to the node inspection sequence, the space inspection sequence, and the load inspection sequence.
[0140] The cluster inspection device provided in the embodiment of the present invention can execute the cluster inspection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0141] Embodiment 5
[0142] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0143] like Figure 7 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0144] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0145] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the cluster inspection method.
[0146] In some embodiments, the cluster inspection method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the cluster inspection method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the cluster inspection method in any other appropriate manner (e.g., by means of firmware).
[0147] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0148] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0149] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0150] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0151] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0152] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0153] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0154] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A cluster inspection method, characterized in that: include: In response to the inspection authority verification operation, obtaining input authority information; Verifying the input permission information, and displaying cluster inspection options when the input permission information meets the verification conditions, wherein the cluster inspection options include configuration inspection options and / or operation inspection options; In response to the inspection triggering operation for the cluster inspection option, an inspection is performed on the target cluster to obtain a cluster inspection result.
2. The method according to claim 1, characterized in that After obtaining the cluster inspection result, the method further includes: Generate a target inspection report corresponding to the cluster inspection result, and send the target inspection report to the inspection monitoring terminal by email.
3. The method according to claim 1, characterized in that In response to the inspection trigger operation for the cluster inspection option, inspecting the target cluster to obtain a cluster inspection result includes: In response to a trigger operation for the configuration inspection option, determining a target cluster; Determine a management cluster and a business cluster in the target cluster, inspect the cluster configuration of the management cluster according to the first cluster inspection rule to obtain a first inspection result, and inspect the cluster configuration of the business cluster according to the second cluster inspection rule to obtain a second inspection result; The first inspection result and the second inspection result are used as cluster inspection results.
4. The method according to claim 3, characterized in that After obtaining the second inspection result, the method further includes: Determine a first cluster node in the management cluster, and inspect the node configuration of the first cluster node according to a first node inspection rule to obtain a third inspection result; Determine a second cluster node in the business class cluster, and inspect the node configuration of the second cluster node according to the second node inspection rule to obtain a fourth inspection result; The taking the first inspection result and the second inspection result as the cluster inspection result includes: The first inspection result, the second inspection result, the third inspection result and the fourth inspection result are used as cluster inspection results.
5. The method according to claim 4, characterized in that The first node inspection rules include management node inspection rules and service node inspection rules; The step of inspecting the node configuration of the first cluster node according to the first node inspection rule to obtain a third inspection result includes: Determine management nodes and service nodes in the first cluster nodes; Inspecting the node configuration of the management node according to the management node inspection rule to obtain a first sub-inspection result, and inspecting the node configuration of the service node according to the service node inspection rule to obtain a second sub-inspection result; The first sub-inspection result and the second sub-inspection result are used as the third inspection result.
6. The method according to claim 1, characterized in that In response to the inspection trigger operation for the cluster inspection option, inspecting the target cluster to obtain a cluster inspection result includes: In response to a trigger operation for the running inspection option, determining a target cluster; Determine the running cluster nodes and namespaces under the target cluster, inspect the running status of the cluster nodes according to the node running inspection rules to obtain a node inspection sequence, and inspect the running status of the namespace according to the space inspection rules to obtain a space inspection sequence; A cluster inspection result is determined according to the node inspection sequence and the space inspection sequence.
7. The method according to claim 6, characterized in that After determining the cluster nodes and namespaces in the target cluster, the method further includes: Determine the workload under the namespace, inspect the running status of the workload according to the load inspection rule, and obtain a load inspection sequence; The determining the cluster inspection result according to the node inspection sequence and the space inspection sequence includes: A cluster inspection result is determined according to the node inspection sequence, the space inspection sequence, and the load inspection sequence.
8. A cluster inspection device, characterized in that: include: The authority verification module is used to obtain input authority information in response to the inspection authority verification operation; An option display module, used to verify the input permission information, and display cluster inspection options when the input permission information meets the verification conditions, wherein the cluster inspection options include configuration inspection options and / or operation inspection options; The cluster inspection module is used to inspect the target cluster in response to the inspection trigger operation for the cluster inspection option, and obtain the cluster inspection result.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the cluster inspection method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the cluster inspection method according to any one of claims 1 to 7 when executed.