Fault detection method and device, storage medium and electronic device

Through the automated fault diagnosis process in the Kubernetes cluster, obtain diagnostic request information, determine the target diagnosis method, perform fault detection and generate diagnosis reports, solve the problem of high labor operation and maintenance costs and low efficiency of barriers during cluster container failure diagnosis. High -efficiency and accurate fault detection and treatment.

CN119341899APending Publication Date: 2025-01-21GUANGZHOU BOGUAN TELECOMM TECH LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411329678.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In Kubernetes clusters, there are problems such as high manpower operation and maintenance costs and low troubleshooting efficiency during fault diagnosis, especially in multi-cluster environments, where diagnosis complexity and time-consuming increase.

Method used

By obtaining the diagnostic request information, determine the target diagnosis method, use this method to conduct fault detection of the target node, obtain the fault log data, and generate a fault diagnosis report to achieve automated fault diagnosis and report generation.

Benefits of technology

It improves the efficiency and accuracy of fault detection, reduces the cost and time consumption of manual intervention, realizes fast and efficient fault service detection, reduces human operation and maintenance costs and improves troubleshooting efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119341899A_ABST
    Figure CN119341899A_ABST
Patent Text Reader

Abstract

The invention discloses a fault detection method and device, a storage medium and an electronic device. The method comprises the steps that diagnosis request information is acquired, and the diagnosis request information is used for determining a fault service identifier and a fault service type; based on the diagnosis request information, determining a target diagnosis mode from a plurality of candidate diagnosis modes, the target diagnosis mode being used for representing a fault diagnosis mode corresponding to the fault service type; performing fault detection on the target node by using the target diagnosis mode to obtain fault log data, the target node being used for operating a fault service corresponding to the fault service identifier, and the fault log data being used for recording the operating state of the target node; and generating a fault diagnosis report based on the fault log data. According to the method and the device, the technical problems of high manual operation and maintenance cost and low troubleshooting efficiency during fault diagnosis of the cluster container in related technologies are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a fault detection method, device, storage medium and electronic device. Background Art

[0002] Container cluster deployment orchestration (Kubernetes, K8S) technology has been widely used in Internet companies, allowing operation and maintenance personnel to easily and quickly deploy and run large-scale services on multiple machine nodes. K8S technology involves the application of multiple technical components, and the technical logic chain is complex and lengthy, which results in that when problems occur in the application, operation and maintenance personnel often cannot quickly diagnose and troubleshoot. In addition, for large enterprises, K8S technology is often applied to multiple clusters, which further exacerbates the difficulty of K8S troubleshooting. In the related art, K8S failures are basically manually troubleshooted by related component logs. For application services that use multiple components in K8S, due to the mutual dependence between components, it is also necessary to check multiple component logs to finally determine the problem, thereby increasing the complexity and time-consuming of troubleshooting. In the related art, troubleshooting tools can also be used to start a new container, and troubleshooting commands are manually input based on the container for on-site troubleshooting diagnosis, but this method also has the problems of high manual operation and maintenance costs and low troubleshooting efficiency.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] At least some embodiments of the present application provide a fault detection method, device, storage medium and electronic device to at least solve the technical problems of high manpower operation and maintenance cost and low troubleshooting efficiency in the related art when performing fault diagnosis on cluster containers.

[0005] According to one embodiment of the present application, a fault detection method is provided, including: obtaining diagnostic request information, wherein the diagnostic request information is used to determine a fault service identifier and a fault service type; determining a target diagnostic method from multiple candidate diagnostic methods based on the diagnostic request information, wherein the target diagnostic method is used to represent the fault diagnostic method corresponding to the fault service type; performing fault detection on a target node using the target diagnostic method to obtain fault log data, wherein the target node is used to run the fault service corresponding to the fault service identifier, and the fault log data is used to record the running status of the target node; and generating a fault diagnosis report based on the fault log data.

[0006] According to one embodiment of the present application, a fault detection device is also provided, including: an acquisition module, used to acquire diagnostic request information, wherein the diagnostic request information is used to determine a fault service identifier and a fault service type; a determination module, used to determine a target diagnostic method from multiple candidate diagnostic methods based on the diagnostic request information, wherein the target diagnostic method is used to represent the fault diagnostic method corresponding to the fault service type; a detection module, used to perform fault detection on a target node using the target diagnostic method to obtain fault log data, wherein the target node is used to run the fault service corresponding to the fault service identifier, and the fault log data is used to record the running status of the target node; a generation module, used to generate a fault diagnosis report based on the fault log data.

[0007] According to one embodiment of the present application, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned fault detection method in each embodiment of the present application when running.

[0008] According to one embodiment of the present application, an electronic device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the above-mentioned fault detection method in each embodiment of the present application.

[0009] According to one embodiment of the present application, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the above-mentioned fault detection method in each embodiment of the present application is implemented.

[0010] According to one embodiment of the present application, a computer program product is also provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned fault detection method in each embodiment of the present application is implemented.

[0011] According to one embodiment of the present application, a computer program is also provided. When the computer program is executed by a processor, the above-mentioned fault detection method in each embodiment of the present application is implemented.

[0012] In at least some embodiments of the present application, by obtaining diagnostic request information, and then determining a target diagnostic method from multiple candidate diagnostic methods based on the diagnostic request information, the target diagnostic method is then used to perform fault detection on the target node to obtain fault log data, and finally a fault diagnosis report is generated based on the fault log data, thereby achieving accurate positioning and diagnosis of the faulty service and improving the efficiency and accuracy of fault detection. At the same time, by generating fault diagnosis reports in an automated manner, the cost and time consumption of manual intervention are reduced, and the efficiency of fault handling is improved. Therefore, the embodiments of the present application achieve the purpose of quickly and efficiently detecting the faulty service, thereby achieving the technical effect of reducing the cost of human operation and maintenance and improving troubleshooting efficiency, and thus solving the technical problems of high human operation and maintenance costs and low troubleshooting efficiency when performing fault diagnosis on cluster containers in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0014] Figure 1 is a hardware structure block diagram of a mobile terminal according to a fault detection method in one embodiment of the present application;

[0015] Figure 2 is a flow chart of a fault detection method according to one embodiment of the present application;

[0016] Figure 3 is a schematic diagram of a cluster database registration process according to one embodiment of the present application;

[0017] Figure 4 is a schematic diagram of a fault detection method according to one embodiment of the present application;

[0018] Figure 5 is a schematic diagram of a network diagnosis process according to one embodiment of the present application;

[0019] Figure 6 is a schematic diagram of a scheduling anomaly diagnosis process according to one embodiment of the present application;

[0020] Figure 7 is a schematic diagram of a host crash diagnosis process according to one embodiment of the present application;

[0021] Figure 8 is a schematic diagram of a restart abnormality diagnosis process according to one embodiment of the present application;

[0022] Fig. 9is a schematic diagram of a deletion abnormality diagnosis process according to one embodiment of the present application;

[0023] Fig.10 is a schematic diagram of a mirror image diagnosis process according to one embodiment of the present application;

[0024] Fig.11 is a schematic diagram of an Internet Protocol address pool diagnosis process according to one embodiment of the present application;

[0025] Fig.12 is a schematic diagram of another fault detection method according to one embodiment of the present application;

[0026] Fig.13 is a structural block diagram of a fault detection device according to one embodiment of the present application;

[0027] Fig.14 is a schematic diagram of an electronic device according to one embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application 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 interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:

[0031] Container (Pod): An application distribution and deployment technology that packages, isolates, distributes, and deploys applications and their entire runtime environment. Once the container image is built, it can run on multiple machine nodes. The container environments on multiple machine nodes are consistent and independent of the host environment.

[0032] K8S: A container cluster deployment and orchestration technology. Based on K8S technology, users can directly deploy containers on multiple machine nodes through the control plane, reducing the tedious deployment and expansion operations of the application containerization process.

[0033] The above method embodiments involved in the present disclosure can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, the mobile terminal can be a smart phone, a tablet computer, a handheld computer, a mobile Internet device, a PAD, a game console and other terminal devices. Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a fault detection method according to an embodiment of the present application. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a field-programmable logic device (FPGA), a neural network processor (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data. In one embodiment of the present application, it may also include: an input and output device 108 and a display device 110.

[0034] In some optional embodiments mainly based on game scenarios, the above-mentioned device can also provide a human-computer interaction interface with a touch-sensitive surface, which can sense finger contact and / or gestures to perform human-computer interaction with a graphical user interface (GUI). The human-computer interaction function may include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interface, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for executing the above-mentioned human-computer interaction functions are configured / stored in a computer program product or readable storage medium executable by one or more processors.

[0035] Figure 2 is a flow chart of a fault detection method according to one embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0036] Step S21, obtaining diagnosis request information, wherein the diagnosis request information is used to determine the fault service identifier and the fault service type;

[0037] Step S22, determining a target diagnostic method from a plurality of candidate diagnostic methods based on the diagnostic request information, wherein the target diagnostic method is used to indicate a fault diagnostic method corresponding to the fault service type;

[0038] Step S23, performing fault detection on the target node using a target diagnosis method to obtain fault log data, wherein the target node is used to run the fault service corresponding to the fault service identifier, and the fault log data is used to record the running status of the target node;

[0039] Step S24: generating a fault diagnosis report based on the fault log data.

[0040] The above diagnostic request information can be obtained from the front-end web page. The diagnostic request information is used to determine the fault service identifier and the fault service type. The fault service identifier can generally include but is not limited to the service name, namespace and related resource tags. In the Kubernetes environment, the fault service type includes but is not limited to: network anomaly type and container anomaly type. Among them, network anomalies usually involve communication problems within the Kubernetes cluster or with the outside world, and container anomalies are usually related to the running status, resource restrictions or images of the container. For example, network anomalies can be inter-Pod communication problems, that is, Pods cannot communicate with each other due to network policy misconfiguration or network plug-in failure, or service discovery problems, that is, services cannot be correctly discovered by other Pods due to DNS resolution problems or Service configuration errors. Container anomalies can be container crashes, that is, containers crash due to internal application errors or resource exhaustion, and can also be container startup failures, that is, containers cannot start due to configuration errors, image damage or dependent services are not ready.

[0041] Further, a target diagnostic method is determined from a plurality of candidate diagnostic methods based on the diagnostic request information, and the target diagnostic method is used to indicate a fault diagnostic method corresponding to the fault service type. The plurality of candidate diagnostic methods include a first diagnostic method, a second diagnostic method, a third diagnostic method, and a fourth diagnostic method, and different candidate diagnostic methods have different diagnostic processes and diagnostic scopes.

[0042] The target node is used to detect faults using the target diagnosis method to obtain fault log data. The target node is used to run the fault service corresponding to the fault service identifier. The target node can be at least one machine node running the fault service. The fault log data is used to record the running status of the target node to help determine the cause of the fault and repair it. For example, the fault log data may include but is not limited to Pod logs, node logs, network indicators, etc. By viewing event logs, analyzing network traffic, and checking configuration files, the cause of the fault can be quickly determined.

[0043] By analyzing the fault log data, problems can be discovered and solved in a timely manner to ensure the normal operation of the target node. At the same time, the performance of the target node can be optimized and improved based on the fault log data to improve system stability and reliability. After obtaining the fault log data, a fault diagnosis report is generated based on the fault log data, so that the fault service can be accurately located and diagnosed, improving the maintenance efficiency of the cluster.

[0044] Based on the above steps S21 to S24, by obtaining the diagnostic request information, and then determining the target diagnostic method from multiple candidate diagnostic methods based on the diagnostic request information, the target diagnostic method is then used to perform fault detection on the target node to obtain fault log data, and finally a fault diagnosis report is generated based on the fault log data, thereby achieving accurate positioning and diagnosis of the fault service and improving the efficiency and accuracy of fault detection. At the same time, by generating a fault diagnosis report in an automated manner, the cost and time consumption of manual intervention are reduced, and the efficiency of fault handling is improved. Therefore, the embodiment of the present application achieves the purpose of quickly and efficiently detecting the fault service, thereby achieving the technical effect of reducing the manpower operation and maintenance cost and improving the troubleshooting efficiency, and thus solving the technical problems of high manpower operation and maintenance cost and low troubleshooting efficiency when performing fault diagnosis on cluster containers in the related technology.

[0045] The fault detection method in the embodiment of the present application is further introduced below.

[0046] Optionally, in step S21, obtaining diagnosis request information includes:

[0047] Step S211, parsing the user feedback information to obtain a parsing result, wherein the user feedback information is used to represent the fault service information obtained by using the front-end web page;

[0048] Step S212: fill in the target field in the preset diagnosis request template using the analysis result to generate diagnosis request information.

[0049] The above user feedback information can be the fault service information entered by the user on the front-end web page. For example, the user enters the affected fault service identifier, such as the Pod name, the deployment configuration (Deployment) name, etc. on the front-end web page, and selects the fault type, such as the Pod cannot be started, the network is not connected, etc. By parsing the user feedback information, the container troubleshooting system can automatically identify and understand the key information of the fault service, such as the service identifier, fault phenomenon, and impact range.

[0050] For example, in the container troubleshooting system, the front-end web page can parse the user's input results, use the parsed results to fill in the target fields in the preset diagnostic request template, generate the corresponding diagnostic request information and send it to the control center. The preset diagnostic request template can convert the unstructured data fed back by the user into structured diagnostic request information, which helps to standardize the fault handling process. Structured diagnostic request information helps diagnostic tools or personnel quickly obtain fault context and improve the accuracy of fault diagnosis.

[0051] Specifically, the preset diagnosis request template may be {"error_name":XXX, "error_type":XXX}, where error_name indicates the fault service identifier, and error_type indicates the fault service type. The fault service identifier field and the fault service type field in the preset diagnosis request template are filled using the parsing result. The automated parsing and template filling process can reduce manual input and processing time, thereby speeding up the response to the fault service.

[0052] Based on the above optional embodiments, the user feedback information is parsed to obtain the parsing results, and the parsing results are then used to fill in the target fields in the preset diagnosis request template to generate diagnosis request information, thereby realizing automation and standardization of the fault handling process, which can improve the speed of fault response and processing, further improve the accuracy of fault diagnosis, and facilitate fault tracking, analysis and management.

[0053] Optionally, in step S22, determining a target diagnostic method from a plurality of candidate diagnostic methods based on the diagnostic request information includes:

[0054] Step S221, determining the fault service identifier and the fault service type based on the diagnosis request information;

[0055] Step S222, querying the cluster database based on the faulty service identifier to obtain a query result, wherein the cluster database is used to store service registration information corresponding to multiple candidate nodes, and the query result is used to determine a target cluster and a target node corresponding to the faulty service;

[0056] Step S223, generating a fault diagnosis instruction using the query result, the fault service identifier and the fault service type;

[0057] Step S224 , determining a target diagnosis method from a plurality of candidate diagnosis methods based on the fault diagnosis instruction.

[0058] The above-mentioned multiple candidate nodes can be machine nodes, and a troubleshooting agent service instance (agent) can be run on each machine node. The agent will regularly collect service registration information corresponding to the application service, such as service name, node name and cluster information, and register the application service into the cache of the cluster database. For example, the key field format registered in the database is as follows: {"app_name": XXX, "node": XXX, "cluster": XXX}. Figure 3 is a schematic diagram of a cluster database registration process according to one embodiment of the present application, such as Figure 3 As shown, cluster 1 includes n machine nodes, and cluster n also includes n machine nodes. The service registration information corresponding to each machine node is used to register the service in the cluster database.

[0059] After the control center receives the diagnostic request information sent by the front-end web page, it can obtain the application's fault service identifier from the error_name field and the application's fault service type from the error_type field by parsing the diagnostic request information. Further, based on the fault service identifier, the cluster database is queried to obtain the query result, which can be the node field and cluster field corresponding to the fault service identifier, thereby locating the target node and target cluster where the fault service is located.

[0060] The control center generates fault diagnosis instructions based on the four key fields of target cluster, target node, fault service identifier, and fault service type and sends them to the decision routing. After receiving the fault diagnosis instructions from the control center, the decision routing extracts the information in the fault diagnosis instructions and then determines the target diagnosis method from multiple candidate diagnosis methods.

[0061] Based on the above optional embodiments, the fault service identifier and the fault service type are determined based on the diagnosis request information, and then the cluster database is queried based on the fault service identifier to obtain the query result, and then the query result, the fault service identifier and the fault service type are used to generate a fault diagnosis instruction, and finally the target diagnosis method is determined from multiple candidate diagnosis methods based on the fault diagnosis instruction, thereby further improving the efficiency and accuracy of fault diagnosis and saving manpower and time costs.

[0062] Optionally, in step S224, determining a target diagnostic method from multiple candidate diagnostic methods based on the fault diagnostic instruction includes: in response to the fault service type corresponding to the fault diagnostic instruction being a network abnormality type, determining a first diagnostic method among multiple candidate diagnostic methods as the target diagnostic method, wherein the first diagnostic method is used to perform network diagnosis on the target node.

[0063] Specifically, Figure 4is a schematic diagram of a fault detection method according to one embodiment of the present application, such as Figure 4 As shown, after the decision routing receives the fault diagnosis instruction from the control center, if it is identified that the fault service type corresponding to the fault diagnosis instruction is a network abnormality type, the first diagnostic method among multiple candidate diagnostic methods is determined as the target diagnostic method, and the first diagnostic method is used to perform network diagnosis on the target node.

[0064] Figure 5 is a schematic diagram of a network diagnosis process according to one embodiment of the present application, such as Figure 5 As shown in the figure, during the network diagnosis process, first connect to the container node, enter the container, then check the service connectivity and service status return code inside the container, and obtain the container's network access control list (ACL), and finally transmit the data back. ACL is used to control and filter inbound and outbound network traffic at the network level, by defining a series of rules to allow or deny specific types of network traffic to pass through. These rules can be based on a variety of conditions, such as source IP address, destination IP address, port number, protocol type, etc.

[0065] Based on the above optional embodiments, in response to the fault service type corresponding to the fault diagnosis instruction being a network abnormality type, the first diagnostic method among multiple candidate diagnostic methods is determined as the target diagnostic method. The first diagnostic method is used to perform network diagnosis on the target node, thereby quickly determining the cause of the network abnormality and improving the efficiency and accuracy of fault diagnosis.

[0066] Optionally, in step S224, determining a target diagnostic method from multiple candidate diagnostic methods based on the fault diagnostic instruction includes: in response to the fault service type corresponding to the fault diagnostic instruction being a container abnormality type, determining a target diagnostic method from multiple candidate diagnostic methods based on a query result.

[0067] Specifically, continue as Figure 4 As shown, after the decision routing receives the fault diagnosis instruction from the control center, if it is identified that the fault service type corresponding to the fault diagnosis instruction is a container abnormality type, a target diagnosis method is determined from multiple candidate diagnosis methods based on the query result.

[0068] Based on the above optional embodiment, by responding to the fault service type corresponding to the fault diagnosis instruction being a container abnormality type, a target diagnosis method is determined from multiple candidate diagnosis methods based on the query result, thereby further improving the efficiency and accuracy of fault diagnosis.

[0069] Optionally, determining a target diagnostic method from multiple candidate diagnostic methods based on the query results includes: in response to the absence of node information in the query results, determining a second diagnostic method among the multiple candidate diagnostic methods as the target diagnostic method, wherein the second diagnostic method is used to perform scheduling abnormality diagnosis and host crash diagnosis on the target node.

[0070] Specifically, continue as Figure 4 As shown, after the decision router receives the fault diagnosis instruction from the control center, if it is identified that the fault service type corresponding to the fault diagnosis instruction is a container abnormality type, it is further determined whether there is node information in the query result. When there is no node information in the query result, the second diagnosis method among multiple candidate diagnosis methods is determined as the target diagnosis method, wherein the second diagnosis method is used to perform scheduling abnormality diagnosis and host crash diagnosis on the target node.

[0071] Figure 6 is a schematic diagram of a scheduling abnormality diagnosis process according to one embodiment of the present application, such as Figure 6 As shown in the figure, during the scheduling anomaly diagnosis process, first check whether the Pod cannot be scheduled; if so, further determine whether the Pod is evicted. If the Pod is evicted, obtain the name of the evicted node and calculate the actual resource usage of the node; if it is not evicted, calculate the available resources of all nodes, and finally transmit the data back.

[0072] Figure 7 is a schematic diagram of a host crash diagnosis process according to one embodiment of the present application, such as Figure 7 As shown in the figure, during the host crash diagnosis process, first try to connect to the control plane to obtain Pod node status information, and then check the node status. If the node connection is successful, continue to obtain the kubelet status and kubelet log. Kubelet is a key component in the Kubernetes system and is responsible for managing containers on each node. If the node connection fails, data is directly transmitted back.

[0073] Based on the above optional embodiments, in response to the absence of node information in the query results, the second diagnostic method among multiple candidate diagnostic methods is determined as the target diagnostic method. The second diagnostic method is used to perform scheduling anomaly diagnosis and host crash diagnosis on the target node, thereby quickly determining the cause of the container abnormality and improving the efficiency and accuracy of fault diagnosis.

[0074] Optionally, determining a target diagnostic method from multiple candidate diagnostic methods based on the query results includes: in response to the presence of node information and a container Internet Protocol address corresponding to the node information in the query results, determining a third diagnostic method among the multiple candidate diagnostic methods as the target diagnostic method, wherein the third diagnostic method is used to perform restart abnormality diagnosis, deletion abnormality diagnosis and mirror diagnosis on the target node.

[0075] Specifically, continue as Figure 4 As shown, after the decision routing receives the fault diagnosis instruction from the control center, if it is identified that the fault service type corresponding to the fault diagnosis instruction is a container exception type, and there is node information and the container Internet Protocol address (pod_ip) corresponding to the node information in the query result, the third diagnostic method among multiple candidate diagnostic methods is determined as the target diagnostic method, and the third diagnostic method is used to perform restart exception diagnosis, deletion exception diagnosis and mirror diagnosis on the target node.

[0076] Figure 8 is a schematic diagram of a restart abnormality diagnosis process according to one embodiment of the present application, such as Figure 8 As shown in the figure, during the restart exception diagnosis process, first, connect to the control plane to obtain Pod information, and then determine whether the Pod is restarted. If the Pod is restarted, obtain the container exit code and container log, and further analyze the key information in the log, such as the Out Of Memory (OOM) keyword and specific value, as well as the finalizer keyword and corresponding field, to determine the reason for the container exit, and finally transmit the data back.

[0077] Fig. 9 is a schematic diagram of a deletion abnormality diagnosis process according to one embodiment of the present application, such as Fig. 9 As shown in the figure, in the deletion abnormality diagnosis process, first determine whether the Pod deletion status is abnormal. When the Pod deletion status is detected to be abnormal, obtain the log of the Pod container, and then obtain the Pod metadata from the log, parse the finalizers keyword and corresponding fields in the log to determine whether there is a finalizer blocking the Pod deletion. Then connect to the node to determine whether the Pod has been deleted. If the Pod has been deleted, obtain the kubelet log and transmit the data back.

[0078] Fig.10 is a schematic diagram of a mirror image diagnosis process according to one embodiment of the present application, such as Fig.10 As shown in the figure, during the image diagnosis process, first connect to the control plane to obtain the status information of the Pod, and then check whether the image status of the Pod is abnormal. If the image status is normal, obtain the information of the node where the Pod is located and return the data; if the image status is abnormal, try to connect to the Pod's node, obtain and parse the relevant image credentials to check the validity status of the credentials, so as to determine whether there is a problem in the image pulling or application process, and finally return the data.

[0079] Based on the above optional embodiments, in response to the presence of node information and the container Internet Protocol address corresponding to the node information in the query results, the third diagnostic method among multiple candidate diagnostic methods is determined as the target diagnostic method. The third diagnostic method is used to perform restart abnormality diagnosis, deletion abnormality diagnosis and mirror diagnosis on the target node, thereby quickly determining the cause of the container abnormality and improving the efficiency and accuracy of fault diagnosis.

[0080] Optionally, determining a target diagnostic method from multiple candidate diagnostic methods based on the query results includes: in response to the presence of node information in the query results and the absence of a container Internet Protocol address corresponding to the node information, determining a fourth diagnostic method among the multiple candidate diagnostic methods as the target diagnostic method, wherein the fourth diagnostic method is used to perform Internet Protocol address pool diagnosis on the target node.

[0081] Specifically, continue as Figure 4 As shown, after the decision routing receives the fault diagnosis instruction from the control center, if it is identified that the fault service type corresponding to the fault diagnosis instruction is a container exception type, and there is node information in the query result but there is no container Internet Protocol address corresponding to the node information, then the fourth diagnostic method among multiple candidate diagnostic methods is determined as the target diagnostic method, and the fourth diagnostic method is used to perform Internet Protocol address pool diagnosis on the target node.

[0082] Fig.11 is a schematic diagram of an Internet Protocol address pool diagnosis process according to one embodiment of the present application, such as Fig.11 As shown in the figure, during the Internet Protocol address pool diagnosis process, first, connect to the control plane to check whether the Pod has been assigned an IP address. If no IP is assigned, further obtain the IP pool surplus information and IP allocation details, and then transmit data back to determine whether there are problems such as insufficient IP resources or configuration errors, thereby helping to diagnose and solve the problem of the Pod being unable to obtain an IP address.

[0083] Based on the above optional embodiments, in response to the presence of node information in the query results and the absence of a container Internet Protocol address corresponding to the node information, the fourth diagnostic method among multiple candidate diagnostic methods is determined as the target diagnostic method. The fourth diagnostic method is used to perform Internet Protocol address pool diagnosis on the target node, thereby quickly determining the cause of the container abnormality and improving the efficiency and accuracy of fault diagnosis.

[0084] Optionally, in step S23, the target node is subjected to fault detection using a target diagnosis method, and the obtained fault log data includes:

[0085] Step S231, generating a diagnostic operation instruction based on the target diagnostic method;

[0086] Step S232, sending the diagnostic operation instruction to the troubleshooting agent service instance corresponding to the target node, so that the troubleshooting agent service instance executes the diagnostic operation instruction;

[0087] Step S233, receiving the fault log data returned by the troubleshooting proxy service instance.

[0088] Specifically, a diagnostic operation instruction is generated based on the target diagnostic method, the corresponding target node is connected, and then the diagnostic operation instruction is sent to the troubleshooting agent service instance corresponding to the target node, so that the troubleshooting agent service instance executes the diagnostic operation instruction, collects the corresponding fault log data, and transmits the fault log data back.

[0089] Based on the above optional embodiments, diagnostic operation instructions are generated based on the target diagnosis method, and then the diagnostic operation instructions are sent to the troubleshooting agent service instance corresponding to the target node, so that the troubleshooting agent service instance executes the diagnostic operation instructions, and finally receives the fault log data returned by the troubleshooting agent service instance, thereby further improving the troubleshooting efficiency and the accuracy of fault location.

[0090] Optionally, the fault detection method in the embodiment of the present application further includes: uploading the fault diagnosis report to a front-end web page so that the front-end web page displays the fault diagnosis report.

[0091] Specifically, by parsing the fault log data, the corresponding fault diagnosis report can be automatically generated, and the fault retrieval report can be uploaded to the front-end web page for display. The operation and maintenance personnel can quickly diagnose the problem and provide solutions based on the fault diagnosis report, thereby further improving the troubleshooting efficiency.

[0092] Fig.12 is a schematic diagram of another fault detection method according to one embodiment of the present application, such as Fig.12 As shown, in the container troubleshooting system, the front-end web page parses the user feedback information to obtain the parsing result, and then uses the parsing result to fill in the target field in the preset diagnosis request template, generate the diagnosis request information and send it to the control center. By parsing the diagnosis request information, the control center can obtain the application's fault service identifier from the error_name field and the application's fault service type from the error_type field. Furthermore, based on the fault service identifier, the cluster database is queried to obtain the query result, which can be the node field and cluster field corresponding to the fault service identifier, thereby locating the target node and target cluster where the fault service is located.

[0093] The control center generates a fault diagnosis instruction based on the four key fields of target cluster, target node, fault service identifier, and fault service type and sends it to the decision routing. After receiving the fault diagnosis instruction from the control center, the decision routing extracts the information in the fault diagnosis instruction and then determines the target diagnosis method from multiple candidate diagnosis methods, that is, selects the troubleshooting module corresponding to the target diagnosis method from troubleshooting module 1 to troubleshooting module n.

[0094] Furthermore, a diagnostic operation instruction is generated based on the target diagnostic method, the corresponding target node is connected, and then the diagnostic operation instruction is sent to the troubleshooting agent service instance corresponding to the target node, so that the troubleshooting agent service instance executes the diagnostic operation instruction, collects the corresponding fault log data, and transmits the fault log data back to the troubleshooting module. A fault diagnosis report is generated based on the fault log data, and the fault diagnosis report is uploaded to the front-end webpage so that the front-end webpage can display the fault diagnosis report.

[0095] In the embodiment of the present application, by obtaining the diagnostic request information, and then determining the target diagnostic method from multiple candidate diagnostic methods based on the diagnostic request information, the target diagnostic method is then used to perform fault detection on the target node, and fault log data is obtained. Finally, a fault diagnosis report is generated based on the fault log data, thereby achieving accurate positioning and diagnosis of the fault service and improving the efficiency and accuracy of fault detection. At the same time, the fault diagnosis report is generated in an automated manner, which has strong scalability and supports multi-cluster diagnosis, thereby reducing the cost and time consumption of manual intervention and improving the efficiency of fault handling.

[0096] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0097] In this embodiment, a fault detection device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0098] Fig.13is a structural block diagram of a fault detection device according to one embodiment of the present application, such as Fig.13 As shown, the device comprises:

[0099] The acquisition module 1301 is used to acquire the diagnosis request information, wherein the diagnosis request information is used to determine the fault service identifier and the fault service type;

[0100] A determination module 1302 is used to determine a target diagnosis method from a plurality of candidate diagnosis methods based on the diagnosis request information, wherein the target diagnosis method is used to indicate a fault diagnosis method corresponding to the fault service type;

[0101] The detection module 1303 is used to perform fault detection on the target node by using the target diagnosis method to obtain fault log data, wherein the target node is used to run the fault service corresponding to the fault service identifier, and the fault log data is used to record the running status of the target node;

[0102] The generating module 1304 is used to generate a fault diagnosis report based on the fault log data.

[0103] Optionally, the acquisition module 1301 is also used to: parse the user feedback information to obtain a parsing result, wherein the user feedback information is used to represent the fault service information obtained using the front-end web page; use the parsing result to fill in the target field in the preset diagnosis request template to generate diagnosis request information.

[0104] Optionally, the determination module 1302 is also used to: determine the fault service identifier and the fault service type based on the diagnosis request information; query the cluster database based on the fault service identifier to obtain a query result, wherein the cluster database is used to store service registration information corresponding to multiple candidate nodes, and the query result is used to determine the target cluster and target node corresponding to the fault service; generate a fault diagnosis instruction using the query result, the fault service identifier and the fault service type; and determine a target diagnosis method from multiple candidate diagnosis methods based on the fault diagnosis instruction.

[0105] Optionally, the determination module 1302 is further used to: in response to the fault service type corresponding to the fault diagnosis instruction being a network abnormality type, determine a first diagnostic method among multiple candidate diagnostic methods as a target diagnostic method, wherein the first diagnostic method is used to perform network diagnosis on the target node.

[0106] Optionally, the determination module 1302 is further configured to: in response to the fault service type corresponding to the fault diagnosis instruction being a container abnormality type, determine a target diagnosis method from a plurality of candidate diagnosis methods based on a query result.

[0107] Optionally, the determination module 1302 is further used to: in response to the absence of node information in the query result, determine a second diagnosis method among multiple candidate diagnosis methods as a target diagnosis method, wherein the second diagnosis method is used to perform scheduling abnormality diagnosis and host crash diagnosis on the target node.

[0108] Optionally, the determination module 1302 is also used to: in response to the presence of node information and a container Internet Protocol address corresponding to the node information in the query results, determine a third diagnostic method among multiple candidate diagnostic methods as a target diagnostic method, wherein the third diagnostic method is used to perform restart abnormality diagnosis, deletion abnormality diagnosis and mirror diagnosis on the target node.

[0109] Optionally, determination module 1302 is also used to: in response to the presence of node information in the query result and the absence of a container Internet Protocol address corresponding to the node information, determine a fourth diagnostic method among multiple candidate diagnostic methods as a target diagnostic method, wherein the fourth diagnostic method is used to perform Internet Protocol address pool diagnosis on the target node.

[0110] Optionally, the detection module 1303 is also used to: generate diagnostic operation instructions based on the target diagnostic method; send the diagnostic operation instructions to the troubleshooting agent service instance corresponding to the target node so that the troubleshooting agent service instance executes the diagnostic operation instructions; and receive fault log data returned by the troubleshooting agent service instance.

[0111] Optionally, the fault detection device further includes: a processing module 1305, configured to upload the fault diagnosis report to a front-end webpage so that the front-end webpage displays the fault diagnosis report.

[0112] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0113] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0114] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0115] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group.

[0116] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0117] S1, obtaining diagnostic request information, wherein the diagnostic request information is used to determine a fault service identifier and a fault service type;

[0118] S2, determining a target diagnostic method from a plurality of candidate diagnostic methods based on the diagnostic request information, wherein the target diagnostic method is used to indicate a fault diagnostic method corresponding to the fault service type;

[0119] S3, performing fault detection on the target node using a target diagnosis method to obtain fault log data, wherein the target node is used to run the fault service corresponding to the fault service identifier, and the fault log data is used to record the running status of the target node;

[0120] S4, generating a fault diagnosis report based on the fault log data.

[0121] Optionally, the computer-readable storage medium is also configured to store program codes for executing the following steps: parsing the user feedback information to obtain a parsing result, wherein the user feedback information is used to represent the fault service information obtained using the front-end web page; using the parsing result to fill in the target field in the preset diagnostic request template to generate diagnostic request information.

[0122] Optionally, the computer-readable storage medium is also configured to store program codes for executing the following steps: determining a fault service identifier and a fault service type based on diagnostic request information; querying a cluster database based on the fault service identifier to obtain a query result, wherein the cluster database is used to store service registration information corresponding to multiple candidate nodes, and the query result is used to determine a target cluster and a target node corresponding to the fault service; generating a fault diagnosis instruction using the query result, the fault service identifier and the fault service type; and determining a target diagnosis method from multiple candidate diagnosis methods based on the fault diagnosis instruction.

[0123] Optionally, the computer-readable storage medium is also configured to store program code for executing the following steps: in response to the fault service type corresponding to the fault diagnosis instruction being a network abnormality type, determining a first diagnostic method among multiple candidate diagnostic methods as a target diagnostic method, wherein the first diagnostic method is used to perform network diagnosis on the target node.

[0124] Optionally, the computer-readable storage medium is further configured to store program code for executing the following steps: in response to the fault service type corresponding to the fault diagnosis instruction being a container abnormality type, determining a target diagnosis method from a plurality of candidate diagnosis methods based on a query result.

[0125] Optionally, the computer-readable storage medium is also configured to store program code for executing the following steps: in response to the absence of node information in the query result, determining a second diagnostic method among multiple candidate diagnostic methods as a target diagnostic method, wherein the second diagnostic method is used to perform scheduling abnormality diagnosis and host crash diagnosis on the target node.

[0126] Optionally, the computer-readable storage medium is also configured to store program code for executing the following steps: in response to the presence of node information and a container Internet Protocol address corresponding to the node information in the query results, determining a third diagnostic method among multiple candidate diagnostic methods as a target diagnostic method, wherein the third diagnostic method is used to perform restart abnormality diagnosis, deletion abnormality diagnosis and mirror diagnosis on the target node.

[0127] Optionally, the computer-readable storage medium is also configured to store program code for executing the following steps: in response to the presence of node information in the query result and the absence of a container Internet Protocol address corresponding to the node information, determining a fourth diagnostic method among multiple candidate diagnostic methods as a target diagnostic method, wherein the fourth diagnostic method is used to perform Internet Protocol address pool diagnosis on the target node.

[0128] Optionally, the above-mentioned computer-readable storage medium is also configured to store program codes for executing the following steps: generating diagnostic operation instructions based on the target diagnostic method; sending the diagnostic operation instructions to the troubleshooting agent service instance corresponding to the target node so that the troubleshooting agent service instance executes the diagnostic operation instructions; and receiving fault log data returned by the troubleshooting agent service instance.

[0129] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: uploading the fault diagnosis report to a front-end webpage so that the front-end webpage displays the fault diagnosis report.

[0130] In the computer-readable storage medium of this embodiment, by obtaining the diagnostic request information, and then determining the target diagnostic method from multiple candidate diagnostic methods based on the diagnostic request information, the target diagnostic method is then used to perform fault detection on the target node to obtain fault log data, and finally a fault diagnosis report is generated based on the fault log data, thereby achieving accurate positioning and diagnosis of the fault service and improving the efficiency and accuracy of fault detection. At the same time, by generating fault diagnosis reports in an automated manner, the cost and time consumption of manual intervention are reduced, and the efficiency of fault handling is improved. Therefore, the embodiment of the present application achieves the purpose of quickly and efficiently detecting the fault service, thereby achieving the technical effect of reducing the manpower operation and maintenance cost and improving the troubleshooting efficiency, and thus solving the technical problems of high manpower operation and maintenance cost and low troubleshooting efficiency when performing fault diagnosis on cluster containers in related technologies.

[0131] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0132] In an exemplary embodiment of the present application, a program product capable of implementing the above method of the present embodiment is stored on a computer-readable storage medium. In some possible implementations, various aspects of the embodiments of the present application can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present application described in the above "Exemplary Method" section of the present embodiment.

[0133] According to the program product for implementing the above method in the embodiment of the present application, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the embodiment of the present application is not limited thereto. In the embodiment of the present application, the computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0134] The program product may be in any combination of one or more computer-readable media. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive) of computer-readable storage media include: an electrical connection with one or more wires, a portable 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 thereof.

[0135] It should be noted that the program code contained in the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0136] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0137] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0138] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0139] S1, obtaining diagnostic request information, wherein the diagnostic request information is used to determine a fault service identifier and a fault service type;

[0140] S2, determining a target diagnostic method from a plurality of candidate diagnostic methods based on the diagnostic request information, wherein the target diagnostic method is used to indicate a fault diagnostic method corresponding to the fault service type;

[0141] S3, performing fault detection on the target node using a target diagnosis method to obtain fault log data, wherein the target node is used to run the fault service corresponding to the fault service identifier, and the fault log data is used to record the running status of the target node;

[0142] S4, generating a fault diagnosis report based on the fault log data.

[0143] Optionally, the processor can also be configured to perform the following steps through a computer program: parsing the user feedback information to obtain a parsing result, wherein the user feedback information is used to represent the fault service information obtained using the front-end web page; using the parsing result to fill in the target field in the preset diagnostic request template to generate diagnostic request information.

[0144] Optionally, the processor may also be configured to perform the following steps through a computer program: determining a fault service identifier and a fault service type based on diagnostic request information; querying a cluster database based on the fault service identifier to obtain a query result, wherein the cluster database is used to store service registration information corresponding to a plurality of candidate nodes, and the query result is used to determine a target cluster and a target node corresponding to the fault service; generating a fault diagnosis instruction using the query result, the fault service identifier and the fault service type; and determining a target diagnosis method from a plurality of candidate diagnosis methods based on the fault diagnosis instruction.

[0145] Optionally, the processor can also be configured to perform the following steps through a computer program: in response to the fault service type corresponding to the fault diagnosis instruction being a network abnormality type, a first diagnostic method among multiple candidate diagnostic methods is determined as a target diagnostic method, wherein the first diagnostic method is used to perform network diagnosis on the target node.

[0146] Optionally, the processor may also be configured to execute the following steps through a computer program: in response to the fault service type corresponding to the fault diagnosis instruction being a container abnormality type, determining a target diagnosis method from a plurality of candidate diagnosis methods based on a query result.

[0147] Optionally, the processor may also be configured to perform the following steps through a computer program: in response to the absence of node information in the query result, determining a second diagnostic method among multiple candidate diagnostic methods as a target diagnostic method, wherein the second diagnostic method is used to perform scheduling abnormality diagnosis and host crash diagnosis on the target node.

[0148] Optionally, the processor can also be configured to perform the following steps through a computer program: in response to the presence of node information and a container Internet Protocol address corresponding to the node information in the query results, determining a third diagnostic method among multiple candidate diagnostic methods as a target diagnostic method, wherein the third diagnostic method is used to perform restart abnormality diagnosis, deletion abnormality diagnosis and mirror diagnosis on the target node.

[0149] Optionally, the processor can also be configured to perform the following steps through a computer program: in response to the presence of node information in the query result and the absence of a container Internet Protocol address corresponding to the node information, determining a fourth diagnostic method among multiple candidate diagnostic methods as a target diagnostic method, wherein the fourth diagnostic method is used to perform Internet Protocol address pool diagnosis on the target node.

[0150] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: generate diagnostic operation instructions based on the target diagnostic method; send the diagnostic operation instructions to the troubleshooting agent service instance corresponding to the target node so that the troubleshooting agent service instance executes the diagnostic operation instructions; receive fault log data returned by the troubleshooting agent service instance.

[0151] Optionally, the processor may also be configured to perform the following steps through a computer program: uploading the fault diagnosis report to a front-end webpage so that the front-end webpage displays the fault diagnosis report.

[0152] In the electronic device of this embodiment, by obtaining the diagnostic request information, and then determining the target diagnostic method from multiple candidate diagnostic methods based on the diagnostic request information, the target diagnostic method is then used to perform fault detection on the target node to obtain fault log data, and finally a fault diagnosis report is generated based on the fault log data, thereby achieving accurate positioning and diagnosis of the fault service and improving the efficiency and accuracy of fault detection. At the same time, by generating the fault diagnosis report in an automated manner, the cost and time consumption of manual intervention are reduced, and the efficiency of fault handling is improved. Therefore, the embodiment of the present application achieves the purpose of quickly and efficiently detecting the fault service, thereby achieving the technical effect of reducing the manpower operation and maintenance cost and improving the troubleshooting efficiency, and thus solving the technical problems of high manpower operation and maintenance cost and low troubleshooting efficiency when performing fault diagnosis on cluster containers in the related technology.

[0153] Fig.14 is a schematic diagram of an electronic device according to an embodiment of the present application. Fig.14 As shown, the electronic device 1400 is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0154] like Fig.14 As shown, the electronic device 1400 is in the form of a general computing device. The components of the electronic device 1400 may include but are not limited to: the at least one processor 1410, the at least one memory 1420, a bus 1430 connecting different system components (including the memory 1420 and the processor 1410), and a display 1440.

[0155] The memory 1420 stores program codes, which can be executed by the processor 1410, so that the processor 1410 executes the steps described in the method part of the embodiment of the present application according to various exemplary embodiments of the present application.

[0156] The memory 1420 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 14201 and / or a cache memory unit 14202, and may further include a read-only memory unit (ROM) 14203, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.

[0157] In some examples, the memory 1420 may also include a program / utility 14204 having a set (at least one) of program modules 14205, such program modules 14205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include the implementation of a network environment. The memory 1420 may further include a memory remotely disposed relative to the processor 1410, and these remote memories may be connected to the electronic device 1400 via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0158] The bus 1430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a local bus of the processor 1410, or a bus using any of a variety of bus architectures.

[0159] The display 1440 may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 1400 .

[0160] Optionally, the electronic device 1400 may also communicate with one or more external devices 1500 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 1400, and / or any device that enables the electronic device 1400 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1450. Furthermore, the electronic device 1400 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1460. Fig.14As shown, the network adapter 1460 communicates with other modules of the electronic device 1400 via the bus 1430. It should be understood that although Fig.14 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 1400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0161] The electronic device 1400 may further include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply and / or a camera.

[0162] It can be understood by those skilled in the art that Fig.14 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig.14 More or fewer components as shown, or with Figure 1 The memory 1420 may be used to store computer programs and corresponding data, such as the computer programs and corresponding data corresponding to the fault detection method in the embodiment of the present application. The processor 1410 executes various functional applications and data processing by running the computer programs stored in the memory 1420, that is, implementing the above-mentioned fault detection method.

[0163] The embodiment of the present application further provides a computer program product. Optionally, in this embodiment, the computer program product may include a computer program, and the computer program implements the method provided in the embodiment when executed by a processor.

[0164] Optionally, the computer program included in the above-mentioned computer program product is executed by a processor to perform the following steps:

[0165] S1, obtaining diagnostic request information, wherein the diagnostic request information is used to determine a fault service identifier and a fault service type;

[0166] S2, determining a target diagnostic method from a plurality of candidate diagnostic methods based on the diagnostic request information, wherein the target diagnostic method is used to indicate a fault diagnostic method corresponding to the fault service type;

[0167] S3, performing fault detection on the target node using a target diagnosis method to obtain fault log data, wherein the target node is used to run the fault service corresponding to the fault service identifier, and the fault log data is used to record the running status of the target node;

[0168] S4, generating a fault diagnosis report based on the fault log data.

[0169] The embodiments of the present application also provide a computer program product. Optionally, the computer program product may include a non-volatile computer-readable storage medium, which may be used to store a computer program, and when the computer program is executed by a processor, the method provided in the embodiments is implemented.

[0170] Optionally, the computer program stored in the non-volatile computer-readable storage medium is used by the processor to execute the following steps:

[0171] S1, obtaining diagnostic request information, wherein the diagnostic request information is used to determine a fault service identifier and a fault service type;

[0172] S2, determining a target diagnostic method from a plurality of candidate diagnostic methods based on the diagnostic request information, wherein the target diagnostic method is used to indicate a fault diagnostic method corresponding to the fault service type;

[0173] S3, performing fault detection on the target node using a target diagnosis method to obtain fault log data, wherein the target node is used to run the fault service corresponding to the fault service identifier, and the fault log data is used to record the running status of the target node;

[0174] S4, generating a fault diagnosis report based on the fault log data.

[0175] The embodiment of the present application further provides a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the method provided in the above embodiment is implemented.

[0176] Optionally, the computer program is executed by a processor to perform the following steps:

[0177] S1, obtaining diagnostic request information, wherein the diagnostic request information is used to determine a fault service identifier and a fault service type;

[0178] S2, determining a target diagnostic method from a plurality of candidate diagnostic methods based on the diagnostic request information, wherein the target diagnostic method is used to indicate a fault diagnostic method corresponding to the fault service type;

[0179] S3, performing fault detection on the target node using a target diagnosis method to obtain fault log data, wherein the target node is used to run the fault service corresponding to the fault service identifier, and the fault log data is used to record the running status of the target node;

[0180] S4, generating a fault diagnosis report based on the fault log data.

[0181] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0182] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0183] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0184] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0185] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0186] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.

[0187] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A fault detection method, characterized in that: include: Obtaining diagnostic request information, wherein the diagnostic request information is used to determine a fault service identifier and a fault service type; Determining a target diagnostic method from a plurality of candidate diagnostic methods based on the diagnostic request information, wherein the target diagnostic method is used to represent the fault diagnostic method corresponding to the fault service type; Performing fault detection on a target node using the target diagnosis method to obtain fault log data, wherein the target node is used to run the fault service corresponding to the fault service identifier, and the fault log data is used to record the running status of the target node; A fault diagnosis report is generated based on the fault log data.

2. The fault detection method according to claim 1, characterized in that: Acquiring the diagnosis request information includes: Parsing the user feedback information to obtain a parsing result, wherein the user feedback information is used to represent the fault service information obtained by using the front-end web page; The target field in the preset diagnosis request template is filled using the analysis result to generate the diagnosis request information.

3. The fault detection method according to claim 1, characterized in that: Determining the target diagnosis method from the plurality of candidate diagnosis methods based on the diagnosis request information includes: Determine the fault service identifier and the fault service type based on the diagnosis request information; Based on the fault service identifier, query the cluster database to obtain a query result, wherein the cluster database is used to store service registration information corresponding to multiple candidate nodes, and the query result is used to determine the target cluster and the target node corresponding to the fault service; Generate a fault diagnosis instruction using the query result, the fault service identifier and the fault service type; The target diagnosis method is determined from the plurality of candidate diagnosis methods based on the fault diagnosis instruction.

4. The fault detection method according to claim 3, characterized in that: Determining the target diagnosis method from the plurality of candidate diagnosis methods based on the fault diagnosis instruction includes: In response to the fault service type corresponding to the fault diagnosis instruction being a network abnormality type, a first diagnostic method among the multiple candidate diagnostic methods is determined as the target diagnostic method, wherein the first diagnostic method is used to perform network diagnosis on the target node.

5. The fault detection method according to claim 3, characterized in that: Determining the target diagnosis method from the plurality of candidate diagnosis methods based on the fault diagnosis instruction includes: In response to the fault service type corresponding to the fault diagnosis instruction being a container abnormality type, the target diagnosis method is determined from the multiple candidate diagnosis methods based on the query result.

6. The fault detection method according to claim 5, characterized in that: Determining the target diagnosis method from the multiple candidate diagnosis methods based on the query result includes: In response to the absence of node information in the query result, a second diagnostic method among the multiple candidate diagnostic methods is determined as the target diagnostic method, wherein the second diagnostic method is used to perform scheduling abnormality diagnosis and host crash diagnosis on the target node.

7. The fault detection method according to claim 5, characterized in that: Determining the target diagnosis method from the multiple candidate diagnosis methods based on the query result includes: In response to the presence of node information and a container Internet Protocol address corresponding to the node information in the query result, a third diagnostic method among the multiple candidate diagnostic methods is determined as the target diagnostic method, wherein the third diagnostic method is used to perform restart abnormality diagnosis, deletion abnormality diagnosis and mirror diagnosis on the target node.

8. The fault detection method according to claim 5, characterized in that: Determining the target diagnosis method from the multiple candidate diagnosis methods based on the query result includes: In response to the presence of node information in the query result and the absence of a container Internet Protocol address corresponding to the node information, a fourth diagnostic method among the multiple candidate diagnostic methods is determined as the target diagnostic method, wherein the fourth diagnostic method is used to perform Internet Protocol address pool diagnosis on the target node.

9. The fault detection method according to claim 1, characterized in that: The target node is subjected to fault detection using the target diagnosis method, and the fault log data obtained includes: generating a diagnostic operation instruction based on the target diagnostic method; Sending the diagnostic operation instruction to the troubleshooting agent service instance corresponding to the target node, so that the troubleshooting agent service instance executes the diagnostic operation instruction; Receive the fault log data returned by the troubleshooting agent service instance.

10. The fault detection method according to claim 1, characterized in that: The method further comprises: The fault diagnosis report is uploaded to a front-end webpage so that the front-end webpage displays the fault diagnosis report.

11. A fault detection device, characterized in that: The fault detection device comprises: An acquisition module, used to acquire diagnostic request information, wherein the diagnostic request information is used to determine a fault service identifier and a fault service type; a determination module, configured to determine a target diagnosis method from a plurality of candidate diagnosis methods based on the diagnosis request information, wherein the target diagnosis method is used to represent a fault diagnosis method corresponding to the fault service type; a detection module, configured to perform fault detection on a target node using the target diagnosis method to obtain fault log data, wherein the target node is configured to run the fault service corresponding to the fault service identifier, and the fault log data is configured to record the running status of the target node; A generating module is used to generate a fault diagnosis report based on the fault log data.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the fault detection method according to any one of claims 1 to 10 when executed by a processor.

13. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the fault detection method according to any one of claims 1 to 10.

14. A computer program product, characterized in that The invention comprises a computer program, which implements the fault detection method according to any one of claims 1 to 10 when being executed by a processor.

Citation Information

Cited By

  • Equipment fault diagnosis method, electronic equipment, storage medium and program product

    CN120086722A

  • Fault diagnosis method, server and computer readable storage medium

    CN120611787A