Application diagnosis method, device, equipment and computer readable storage medium

By receiving notifications of changes in probe service information in the K8s container, the diagnostic probe component is automatically started for application problem diagnosis, which solves the problem of low fault diagnosis efficiency in the K8s container, and achieves efficient troubleshooting and positioning without operation and maintenance intervention.

CN117376105BActive Publication Date: 2025-01-07ZHUHAI HENGQIN YOUZU CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311198866.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-15
Publication Date
2025-01-07
Estimated Expiration
2043-09-15

AI Technical Summary

Technical Problem

In the prior art, the fault diagnosis efficiency of the application services in the K8s container is low, and operation and maintenance personnel need to manually enter the container to start the diagnostic tool, resulting in low fault diagnosis efficiency and long time.

Method used

By receiving notification information about the change in the probe service information sent by the diagnostic client component, obtaining the information of the application service in the K8s container, and controlling the start of the diagnostic probe component to realize automatic linking and application problem diagnosis, reducing operation and maintenance personnel intervention.

Benefits of technology

It improves the fault diagnosis efficiency of application services in K8s containers, shortens the problem location time, and improves the problem troubleshooting efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117376105B_ABST
    Figure CN117376105B_ABST
Patent Text Reader

Abstract

The present invention discloses an application diagnosis method, device, equipment and computer-readable storage medium, the method comprising: a diagnostic client component receives notification information of changes in probe service information sent by a registration discovery component; obtains first service information of a first application service in a K8s container corresponding to the notification information, and controls the startup of a diagnostic probe component in the K8s container; and performs application problem diagnosis on the first application service through the diagnostic probe component based on the first service information. The present invention enables the diagnostic client component to automatically link to the K8s container to perform application service diagnosis through the diagnostic probe component, and does not require intervention by operation and maintenance personnel during the fault diagnosis process of the application service in the K8s container, thereby improving the fault diagnosis efficiency of the application service in the K8s container, thereby improving the problem troubleshooting efficiency and reducing the problem location time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an application diagnosis method, device, equipment and computer-readable storage medium. Background Art

[0002] As cloud computing technology continues to mature, container technology has gradually become a hot spot in the industry and is increasingly being applied to various fields. K8s (full name: Kubernetes) is an orchestration tool based on container technology that provides a series of functions such as deployment and operation, resource scheduling, and service discovery for containerized applications. The stability of applications on K8s is very important. At present, the solution idea for detecting application stability is generally to perform programmatic verification with the help of external data, such as monitoring Warning events and configuring threshold warnings.

[0003] However, when this method of monitoring application operation status needs to collect data on faults, operation and maintenance personnel need to manually enter the container and start the diagnostic tools in the application for diagnosis. It is impossible to observe and obtain online fault data in the first time, resulting in low efficiency of fault diagnosis in application monitoring and a long time to define abnormal conditions.

[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of the present invention is to provide an application diagnosis method, device, equipment and computer-readable storage medium, aiming to solve the technical problem of low efficiency in fault diagnosis of application services in K8s containers.

[0006] To achieve the above object, the present invention provides an application diagnosis method, which comprises the following steps:

[0007] The diagnostic client component receives the notification information of the probe service information change sent by the registration discovery component;

[0008] Obtaining first service information of a first application service in a K8s container corresponding to the notification information, and controlling the startup of a diagnostic probe component in the K8s container;

[0009] Based on the first service information, application problem diagnosis is performed on the first application service through the diagnostic probe component.

[0010] Further, the step of diagnosing application problems of the first application service through the diagnostic probe component based on the first service information includes:

[0011] Opening a diagnostic console, and establishing a communication link with the first application service based on the first service information;

[0012] Based on the communication link, application problem diagnosis is performed on the first application service through the diagnostic probe component.

[0013] Further, the step of establishing a communication link with the first application service based on the first service information includes:

[0014] Obtain the target IP address and target port information in the first service information;

[0015] Based on the target IP address and the target port information, the communication link is established with the first application service, wherein the communication link is a socket bidirectional link.

[0016] Furthermore, the step of the diagnosis client component receiving the notification information of the probe service information change sent by the registration discovery component includes:

[0017] The diagnosis client component receives the notification information, wherein the registration discovery component sends notification information of the change of the probe service information of the first application service to the diagnosis client component when detecting that there is a first application service with service information change in the application services corresponding to the registered probe components.

[0018] Furthermore, before the step of the diagnosis client component receiving the notification information of the probe service information change sent by the registration discovery component, the application diagnosis method further includes:

[0019] Obtain the registered diagnostic probe components in the registration discovery component, and determine the diagnostic service list based on the application services corresponding to the registered diagnostic probe components;

[0020] The step of obtaining the first service information of the first application service in the K8s container corresponding to the notification information includes:

[0021] If the first application service belongs to the diagnostic service list, the first service information is obtained.

[0022] Furthermore, before the step of obtaining the diagnostic probe component registered in the registration discovery component, the application diagnosis method further includes:

[0023] The second application service in the K8s container obtains corresponding second service information, and performs a registration operation of the diagnostic probe component in the registration discovery component based on the second service information.

[0024] Furthermore, the second application service in the K8s container obtains corresponding second service information, and performs a registration operation of the diagnostic probe component in the registration discovery component based on the second service information, including:

[0025] When the second application service is started, the diagnostic probe component is loaded;

[0026] The second application service obtains corresponding second service information, and performs a registration operation of the diagnostic probe component in the registration discovery component based on the second service information.

[0027] In addition, to achieve the above-mentioned purpose, the present invention further provides an application diagnosis device, the application diagnosis device comprising:

[0028] The receiving module is used to receive the notification information of the probe service information change sent by the registration discovery component;

[0029] An acquisition module, used to acquire first service information of a first application service in a K8s container corresponding to the notification information, and control the startup of a diagnostic probe component in the K8s container;

[0030] A diagnosis module is used to diagnose application problems of the first application service through the diagnosis probe component based on the first service information.

[0031] In addition, to achieve the above-mentioned purpose, the present invention also provides an application diagnostic device, which includes: a memory, a processor, and an application diagnostic program stored in the memory and executable on the processor, and the application diagnostic program implements the steps of the aforementioned application diagnostic method when executed by the processor.

[0032] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, characterized in that an application diagnostic program is stored on the computer-readable storage medium, and when the application diagnostic program is executed by the processor, the steps of the aforementioned application diagnostic method are implemented.

[0033] The present invention receives notification information of changes in probe service information sent by a registration discovery component through a diagnostic client component; then obtains the first service information of a first application service in a K8s container corresponding to the notification information, and controls the startup of a diagnostic probe component in the K8s container; then, based on the first service information, the first application service is diagnosed with application problems through the diagnostic probe component. The diagnostic probe component enables the diagnostic client component to automatically link to the K8s container to diagnose the application service. During the fault diagnosis process of the application service in the K8s container, there is no need for operation and maintenance personnel to intervene, which improves the fault diagnosis efficiency of the application service in the K8s container, thereby improving the problem troubleshooting efficiency and reducing the problem location time. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a schematic diagram of the structure of an application diagnostic device in a hardware operating environment involved in an embodiment of the present invention;

[0035] Figure 2 This is a flow chart of a first embodiment of the diagnostic method of the present invention;

[0036] Figure 3 It is a schematic diagram of functional modules of an embodiment of an application diagnosis device of the present invention.

[0037] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0038] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0039] like Figure 1 As shown, Figure 1 It is a schematic diagram of the structure of an application diagnostic device in a hardware operating environment involved in an embodiment of the present invention.

[0040] The application diagnostic device of the embodiment of the present invention can be a PC, or it can be a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a portable computer, or other portable terminal devices with display function.

[0041] like Figure 1 As shown, the application diagnostic device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0042] Optionally, the application diagnostic device may also include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like. Among them, sensors include light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display screen according to the brightness of the ambient light, and the proximity sensor may turn off the display screen and / or backlight when the application diagnostic device is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the application diagnostic device can also be configured with other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which will not be repeated here.

[0043] Those skilled in the art will understand that Figure 1 The terminal structure shown in the figure does not constitute a limitation on the application diagnostic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0044] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application diagnostic program.

[0045] exist Figure 1 In the application diagnostic device shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the client (user end) and communicate data with the client; and the processor 1001 can be used to call the application diagnostic program stored in the memory 1005.

[0046] In this embodiment, the application diagnosis device includes: a memory 1005, a processor 1001, and an application diagnosis program stored in the memory 1005 and executable on the processor 1001, wherein the processor 1001 calls the application diagnosis program stored in the memory 1005 and performs the following operations:

[0047] The diagnostic client component receives the notification information of the probe service information change sent by the registration discovery component;

[0048] Obtaining first service information of a first application service in a K8s container corresponding to the notification information, and controlling the startup of a diagnostic probe component in the K8s container;

[0049] Based on the first service information, application problem diagnosis is performed on the first application service through the diagnostic probe component.

[0050] Further, the processor 1001 may call the application diagnostic program stored in the memory 1005, and further perform the following operations:

[0051] Opening a diagnostic console, and establishing a communication link with the first application service based on the first service information;

[0052] Based on the communication link, application problem diagnosis is performed on the first application service through the diagnostic probe component.

[0053] Further, the processor 1001 may call the application diagnostic program stored in the memory 1005, and further perform the following operations:

[0054] Obtain the target IP address and target port information in the first service information;

[0055] Based on the target IP address and the target port information, the communication link is established with the first application service, wherein the communication link is a socket bidirectional link.

[0056] Further, the processor 1001 may call the application diagnostic program stored in the memory 1005, and further perform the following operations:

[0057] The diagnosis client component receives the notification information, wherein the registration discovery component sends notification information of the change of the probe service information of the first application service to the diagnosis client component when detecting that there is a first application service with service information change in the application services corresponding to the registered probe components.

[0058] Further, the processor 1001 may call the application diagnostic program stored in the memory 1005, and further perform the following operations:

[0059] Obtain the registered diagnostic probe components in the registration discovery component, and determine the diagnostic service list based on the application services corresponding to the registered diagnostic probe components;

[0060] The step of obtaining the first service information of the first application service in the K8s container corresponding to the notification information includes:

[0061] If the first application service belongs to the diagnostic service list, the first service information is obtained.

[0062] Further, the processor 1001 may call the application diagnostic program stored in the memory 1005, and further perform the following operations:

[0063] The second application service in the K8s container obtains corresponding second service information, and performs a registration operation of the diagnostic probe component in the registration discovery component based on the second service information.

[0064] Further, the processor 1001 may call the application diagnostic program stored in the memory 1005, and further perform the following operations:

[0065] When the second application service is started, the diagnostic probe component is loaded;

[0066] The second application service obtains corresponding second service information, and performs a registration operation of the diagnostic probe component in the registration discovery component based on the second service information.

[0067] The present invention also provides an application diagnosis method, referring to Figure 2 , Figure 2 It is a flowchart of the first embodiment of the diagnostic method of the present invention.

[0068] In this embodiment, the application diagnosis method includes:

[0069] Step S101, the diagnosis client component receives the notification information of the probe service information change sent by the registration discovery component;

[0070] In this embodiment, a diagnostic probe component is set for each K8s container. When each application service in the K8s container is started, the diagnostic probe component is loaded, and then the currently started application service obtains the corresponding service information. The service information may include the service name, IP address, and port information, etc. Then, the currently started application service performs a registration operation of the diagnostic probe component in the registration and discovery component based on the service information. Specifically, the registration and discovery component can bind the service information of the currently started application service with the corresponding diagnostic probe component.

[0071] Next, the diagnostic client component subscribes to the registered diagnostic probe component and obtains a diagnostic service list. Specifically, the diagnostic client component obtains the registered diagnostic probe component in the registered discovery component, and determines the diagnostic service list based on the application service corresponding to the registered diagnostic probe component. For example, the diagnostic client component obtains all service information bound to the registered diagnostic probe component in the registered discovery component, and generates a diagnostic service list based on each registered diagnostic probe component and all service information bound to the registered diagnostic probe component. The diagnostic service list may include service information of each application service and the corresponding diagnostic probe component. After the diagnostic client component subscribes to the diagnostic probe component, when the probe service information in the registered discovery component changes, the diagnostic client component is notified. For example, a notification message of the change in the probe service information may be sent to the diagnostic client component.

[0072] In this embodiment, the diagnosis client component receives the notification information of the probe service information change sent by the registration discovery component. Further, in a possible implementation, step S101 includes:

[0073] The diagnosis client component receives the notification information, wherein the registration discovery component sends notification information of the change of the probe service information of the first application service to the diagnosis client component when detecting that there is a first application service with service information change in the application services corresponding to the registered probe components.

[0074] In this embodiment, when there is a first application service whose service information has changed in the application services corresponding to the registered probe components, the registration and discovery component sends notification information of the change in the probe service information of the first application service to the diagnostic client component. For example, when the IP address changes after the application service is restarted, the registration and discovery component determines that the probe service information of the application service has changed; when the port information of the application service changes, the registration and discovery component determines that the probe service information of the application service has changed.

[0075] Step S102, obtaining first service information of a first application service in a K8s container corresponding to the notification information, and controlling the startup of a diagnostic probe component in the K8s container;

[0076] In this embodiment, after the diagnostic client component receives the notification information of the change in probe service information sent by the registration discovery component, it obtains the first service information of the first application service in the K8s container corresponding to the notification information. Specifically, the diagnostic client component can first obtain the diagnostic probe component corresponding to the notification information, determine the K8s container corresponding to the notification information based on the diagnostic probe component, and determine the application service in the K8s container whose probe service information has changed, and then obtain the first service information of the first application service whose probe service information has changed.

[0077] In this embodiment, when the first service information is obtained, the diagnostic client component controls the diagnostic probe component in the K8s container to start, so as to diagnose the first application service through the diagnostic probe component in the K8s container.

[0078] Step S103: diagnose application problems of the first application service through the diagnostic probe component based on the first service information.

[0079] In this embodiment, after the diagnostic probe component in the K8s container is started, the diagnostic client component diagnoses application problems on the first application service through the diagnostic probe component based on the first service information, so as to achieve timely diagnosis of the first application service and improve the fault diagnosis efficiency of the application service in the K8s container.

[0080] Furthermore, in a possible implementation, before step S101, the application diagnosis method further includes:

[0081] Step S104, obtaining the registered diagnostic probe components in the registration discovery component, and determining a diagnostic service list based on the application services corresponding to the registered diagnostic probe components;

[0082] Step S102 includes: if the first application service belongs to the diagnostic service list, obtaining the first service information.

[0083] Furthermore, in another possible implementation, before step S104, the application diagnosis method further includes:

[0084] Step S105: The second application service in the K8s container obtains corresponding second service information, and performs a registration operation of the diagnostic probe component in the registration discovery component based on the second service information.

[0085] Further, in another possible implementation, step S105 includes:

[0086] Step S1051, when the second application service is started, the diagnostic probe component is loaded;

[0087] Step S1052: the second application service obtains corresponding second service information, and performs a registration operation of the diagnostic probe component in the registration discovery component based on the second service information.

[0088] In this embodiment, a diagnostic probe component is set for each K8s container. When each second application service in the K8s container is started, the second application service loads the diagnostic probe component. Then, the currently started second application service obtains the corresponding second service information. The second service information may include the service name, IP address and port information of the second application service. Then, the currently started second application service performs a registration operation of the diagnostic probe component in the registration discovery component based on the second service information. Specifically, the registration discovery component can bind the second service information of the currently started second application service with the corresponding diagnostic probe component.

[0089] In this embodiment, the diagnostic client component subscribes to the registered diagnostic probe component and obtains the diagnostic service list. Specifically, the diagnostic client component obtains the registered diagnostic probe component in the registered discovery component, and determines the diagnostic service list based on the application service corresponding to the registered diagnostic probe component. For example, the diagnostic client component obtains all service information bound to the registered diagnostic probe component in the registered discovery component, and generates a diagnostic service list based on each registered diagnostic probe component and all service information bound to the registered diagnostic probe component. The diagnostic service list may include the service information of each application service and the corresponding diagnostic probe component. After the diagnostic client component subscribes to the diagnostic probe component, when the probe service information in the registered discovery component changes, the diagnostic client component is notified. For example, a notification message of the change in the probe service information may be sent to the diagnostic client component.

[0090] In this embodiment, when there is a first application service whose service information has changed in the application services corresponding to the registered probe components, the registration and discovery component sends notification information of the change in the probe service information of the first application service to the diagnostic client component. For example, when the IP address changes after the application service is restarted, the registration and discovery component determines that the probe service information of the application service has changed; when the port information of the application service changes, the registration and discovery component determines that the probe service information of the application service has changed.

[0091] In this embodiment, after the diagnostic client component receives the notification information of the change in probe service information sent by the registration discovery component, it determines whether the first application service belongs to the diagnostic service list. If the first application service belongs to the diagnostic service list, the first service information is obtained. Specifically, the diagnostic client component can first obtain the diagnostic probe component corresponding to the notification information, determine the K8s container corresponding to the notification information based on the diagnostic probe component, and determine the application service whose probe service information has changed in the K8s container, and then obtain the first service information of the first application service whose probe service information has changed.

[0092] The application diagnosis method proposed in this embodiment receives the notification information of the change of the probe service information sent by the registration discovery component through the diagnostic client component; then obtains the first service information of the first application service in the K8s container corresponding to the notification information, and controls the startup of the diagnostic probe component in the K8s container; then, based on the first service information, the application problem diagnosis is performed on the first application service through the diagnostic probe component, and the diagnostic probe component enables the diagnostic client component to automatically link to the K8s container to diagnose the application service. In the fault diagnosis process of the application service in the K8s container, there is no need for the intervention of the operation and maintenance personnel, which improves the fault diagnosis efficiency of the application service in the K8s container, thereby improving the problem troubleshooting efficiency and reducing the problem location time.

[0093] Based on the first embodiment, a second embodiment of the application diagnosis method of the present invention is proposed. In this embodiment, step S103 includes:

[0094] Step S301, opening a diagnostic console, and establishing a communication link with the first application service based on the first service information;

[0095] Step S302: diagnose application problems of the first application service through the diagnostic probe component based on the communication link.

[0096] In this embodiment, after the diagnostic probe component in the K8s container is started, the diagnostic client component opens the diagnostic console and establishes a communication link with the first application service based on the first service information.

[0097] Then, after the communication link is established, the diagnostic client component diagnoses application problems on the first application service through the diagnostic probe component based on the communication link, that is, based on the communication link, the diagnostic client component diagnoses application problems on the first application service through the diagnostic probe component to achieve timely diagnosis of the first application service and improve the fault diagnosis efficiency of the application service in the K8s container.

[0098] The application diagnosis method proposed in this embodiment opens the diagnosis console and establishes a communication link with the first application service based on the first service information; then diagnoses the application problem of the first application service through the diagnosis probe component based on the communication link, and diagnoses the application problem of the application service through the diagnosis probe component by automatically opening the diagnosis console, so that the diagnosis client component can automatically link to the K8s container to diagnose the application service. In the fault diagnosis process of the application service in the K8s container, there is no need for the intervention of the operation and maintenance personnel, which improves the fault diagnosis efficiency of the application service in the K8s container, thereby improving the problem troubleshooting efficiency and reducing the problem location time.

[0099] Based on the second embodiment, a third embodiment of the application diagnosis method of the present invention is proposed. In this embodiment, step S201 includes:

[0100] Step S301, obtaining the target IP address and target port information in the first service information;

[0101] Step S302: establishing the communication link with the first application service based on the target IP address and the target port information, wherein the communication link is a socket bidirectional link.

[0102] In this embodiment, after opening the diagnostic console, the diagnostic client component obtains the target IP address and target port information in the first service information. Specifically, the diagnostic client component can obtain the target IP address and target port information in the first service information in the diagnostic service list.

[0103] After obtaining the target IP address and target port information, the diagnostic client component establishes the communication link with the first application service based on the target IP address and target port information, wherein the communication link is a socket bidirectional link. It can be understood that the diagnostic client component establishes a socket bidirectional link channel with the first application service based on the target IP address and target port information through the existing socket bidirectional link algorithm.

[0104] The application diagnosis method proposed in this embodiment obtains the target IP address and the target port information in the first service information; then, based on the target IP address and the target port information, establishes the communication link with the first application service, wherein the communication link is a socket bidirectional link, and establishes a socket bidirectional link between the diagnostic client component and the application service to diagnose the application service in the K8s container through the socket bidirectional link, thereby further improving the fault diagnosis efficiency of the application service in the K8s container, thereby improving the problem troubleshooting efficiency and reducing the problem location time.

[0105] The present invention also provides an application diagnosis device, referring to Figure 3 , the application diagnostic device comprises:

[0106] The receiving module 10 is used to receive the notification information of the probe service information change sent by the registration discovery component;

[0107] An acquisition module 20 is used to acquire first service information of a first application service in a K8s container corresponding to the notification information, and control the startup of a diagnostic probe component in the K8s container;

[0108] The diagnosis module 30 is used to perform application problem diagnosis on the first application service through the diagnosis probe component based on the first service information.

[0109] The methods executed by the above-mentioned program units can refer to the various embodiments of the application diagnosis method of the present invention, and will not be described in detail here.

[0110] The present invention also provides a computer-readable storage medium.

[0111] The computer-readable storage medium of the present invention stores an application diagnosis program, and when the application diagnosis program is executed by a processor, the steps of the application diagnosis method described above are implemented.

[0112] Among them, the method implemented when the application diagnosis program running on the processor is executed can refer to the various embodiments of the application diagnosis method of the present invention, and will not be repeated here.

[0113] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0114] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0115] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods 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 such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0116] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An application diagnosis method, characterized in that: The application diagnosis method comprises the following steps: The diagnostic client component receives the notification information of the probe service information change sent by the registration discovery component. When the IP address or port information of the application service in the K8s container changes, the registration discovery component determines that the probe service information of the application service has changed, and sends the notification information of the probe service information change to the diagnostic client component; Obtain the first service information of the first application service in the K8s container corresponding to the notification information, and control the startup of the diagnostic probe component in the K8s container, wherein the first service information includes the service name, IP address and port information, obtain the registered diagnostic probe component in the registration discovery component, and determine the diagnostic service list based on the application service corresponding to the registered diagnostic probe component. If the first application service belongs to the diagnostic service list, obtain the first service information; Based on the first service information, the diagnostic probe component diagnoses application problems of the first application service; When the second application service is started, the diagnostic probe component is loaded, the second application service obtains corresponding second service information, and performs a registration operation of the diagnostic probe component in the registration discovery component based on the second service information.

2. The application diagnosis method according to claim 1, characterized in that: The step of diagnosing the application problem of the first application service through the diagnostic probe component based on the first service information includes: Opening a diagnostic console, and establishing a communication link with the first application service based on the first service information; Based on the communication link, application problem diagnosis is performed on the first application service through the diagnostic probe component.

3. The application diagnosis method according to claim 2, characterized in that: The step of establishing a communication link with the first application service based on the first service information includes: Obtain the target IP address and target port information in the first service information; Based on the target IP address and the target port information, the communication link is established with the first application service, wherein the communication link is a socket bidirectional link.

4. The application diagnosis method according to claim 1, characterized in that: The step of the diagnosis client component receiving the notification information of the probe service information change sent by the registration discovery component comprises: The diagnosis client component receives the notification information, wherein the registration discovery component sends notification information of the change of the probe service information of the first application service to the diagnosis client component when detecting that there is a first application service with service information change in the application services corresponding to the registered probe components.

5. An application diagnostic device, characterized in that: The application diagnostic device comprises: A receiving module is used to receive a notification message of a change in the probe service information sent by the registration discovery component. When the IP address or port information of the application service in the K8s container changes, the registration discovery component determines that the probe service information of the application service has changed, and sends a notification message of the change in the probe service information to the diagnostic client component; An acquisition module is used to acquire first service information of a first application service in a K8s container corresponding to the notification information, and control the startup of a diagnostic probe component in the K8s container, wherein the first service information includes a service name, an IP address, and port information, acquire a registered diagnostic probe component in a registration discovery component, and determine a diagnostic service list based on the application service corresponding to the registered diagnostic probe component. If the first application service belongs to the diagnostic service list, acquire the first service information; A diagnosis module, configured to perform application problem diagnosis on the first application service through the diagnosis probe component based on the first service information; The application diagnosis device is also used to load the diagnostic probe component when the second application service is started, the second application service obtains the corresponding second service information, and performs a registration operation of the diagnostic probe component in the registration discovery component based on the second service information.

6. An application diagnostic device, characterized in that: The application diagnostic device comprises: a memory, a processor, and an application diagnostic program stored in the memory and executable on the processor, wherein the application diagnostic program implements the steps of the application diagnostic method according to any one of claims 1 to 4 when executed by the processor.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an application diagnostic program, which, when executed by a processor, implements the steps of the application diagnostic method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Cloud data center Kubernetes cluster container health examination method and device

    CN108737215A

  • Health state checking method, device and system

    CN110659184A