Abnormality detection method, device and equipment for paas application

By using agents in the PaaS platform to perform system-level health checks, the difficulty of anomaly detection in existing technologies that cannot distinguish between application and container environment problems is solved, and more accurate anomaly location and processing is achieved.

CN119728481BActive Publication Date: 2025-10-24INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411952540.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-10-24
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

The health check methods of existing PaaS platforms cannot effectively distinguish between application problems and application container environment problems, resulting in inaccurate anomaly detection.

Method used

An agent is used to perform system-level health checks. If everything is normal, an application health check is performed. In case of an abnormality, the abnormal information is reported to the control device for processing.

Benefits of technology

It decouples the health checks of applications and application containers, improves the accuracy of anomaly detection and the efficiency of problem location, and reduces the impact on the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728481B_ABST
    Figure CN119728481B_ABST
Patent Text Reader

Abstract

The application provides an abnormality detection method, device and equipment of a PaaS application, and relates to the field of cloud computing. The method is applied to a PaaS application server, a PaaS application is deployed in an application container, and the method comprises the following steps: receiving a health detection instruction sent by a PaaS control device; performing a system level health check on the application container according to the health detection instruction by using an agent; if the system level health check result of the application container is normal, performing a health check on the application program by using the agent; and if the health check result of the application program is abnormal, returning first abnormality information to the PaaS control device, wherein the first abnormality information is used for processing the abnormal application program by the PaaS control device. The method of the application realizes decoupling of health checks on the application program and the application container, and facilitates positioning and processing of problems when the health check is abnormal.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of cloud computing, and particularly relates to an abnormality detection method, device and equipment of a PaaS application. BACKGROUND

[0002] Platform as a Service (PaaS) is a cloud computing service mode, which provides an online platform for users to develop, run and manage application programs on a fully managed infrastructure. Users do not need to manage the underlying infrastructure (such as servers, storage and network) or the runtime environment of the platform, and only need to focus on writing and deploying application code.

[0003] For the application program of the PaaS platform, a common health check method mainly provides a health check link or a health check script of the application program by the application side, and the PaaS control device initiates the execution of the health check link or the health script at regular intervals, judges the health of the application program according to the returned result, and if the application program is abnormal, the PaaS control device initiates the restart of the application container. However, in the above health check scheme, the health detection of the application side is closely coupled with the overall operation of the application container, and it is unable to distinguish whether the health detection abnormality is caused by the problem of the application program itself or the environment problem of the application container. SUMMARY

[0004] The present application provides an abnormality detection method, device and equipment of a PaaS application, to realize the decoupling of the health check of the application program and the application container, and facilitate the positioning and processing of the problem when the health detection is abnormal.

[0005] In a first aspect, the present application provides an abnormality detection method of a PaaS application, applied to a PaaS application server, wherein the PaaS application is deployed in an application container, and the method comprises the following steps:

[0006] receiving a health detection instruction sent by a PaaS control device;

[0007] performing a system-level health check on the application container according to the health detection instruction by using an agent (Agent);

[0008] if the system-level health check result of the application container is normal, performing a health check on the application program by using the Agent;

[0009] if the health check result of the application program is abnormal, returning first abnormality information to the PaaS control device, wherein the first abnormality information is used for the PaaS control device to process the abnormal application program.

[0010] In a second aspect, the present application provides an abnormality detection method of a PaaS application, applied to a PaaS control device, wherein the PaaS application is deployed in an application container, and the method comprises the following steps:

[0011] sending a health detection instruction to a PaaS application server, wherein the health detection instruction is used to instruct the PaaS application server to perform a system-level health check on the application container by using an agent according to the health detection instruction, and perform a health check on the application program by using the agent if the system-level health check result of the application container is normal;

[0012] receiving first abnormality information sent by the PaaS application server, wherein the first abnormality information is sent in the case that the health check result of the application program is abnormal;

[0013] processing the abnormal application program according to the first abnormality information.

[0014] In a third aspect, the present application provides an abnormality detection device of a PaaS application, applied to a PaaS application server, wherein the device comprises the following steps:

[0015] a receiving module, configured to receive a health detection instruction sent by a PaaS control device;

[0016] a processing module, configured to perform a system-level health check on the application container by using an agent according to the health detection instruction;

[0017] performing a health check on the application program by using the agent if the system-level health check result of the application container is normal;

[0018] a sending module, configured to return first abnormality information to the PaaS control device if the health check result of the application program is abnormal, wherein the first abnormality information is used for the PaaS control device to process the abnormal application program.

[0019] In a fourth aspect, the present application provides an abnormality detection device of a PaaS application, applied to a PaaS control device, wherein the device comprises the following steps:

[0020] a sending module, configured to send a health detection instruction to a PaaS application server, wherein the health detection instruction is used to instruct the PaaS application server to perform a system-level health check on the application container by using an agent according to the health detection instruction, and perform a health check on the application program by using the agent if the system-level health check result of the application container is normal;

[0021] receive the first exception information sent by the PaaS application server, the first exception information being sent in a case where the health check result of the application program is abnormal;

[0022] process the abnormal application program according to the first exception information.

[0023] In a fifth aspect, the present application provides a server, comprising: a processor, and a memory connected with the processor in communication;

[0024] The memory stores computer-executed instructions.

[0025] The processor executes the computer-executed instructions stored in the memory to implement the method in the first aspect.

[0026] In a sixth aspect, the present application provides a control device, comprising: a processor, and a memory connected with the processor in communication;

[0027] The memory stores computer-executed instructions.

[0028] The processor executes the computer-executed instructions stored in the memory to implement the method in the second aspect.

[0029] In a seventh aspect, the present application provides a computer-readable storage medium, which stores computer-executed instructions, and the computer-executed instructions are executed by a processor to implement the method in the first aspect, or the computer-executed instructions are executed by the processor to implement the method in the second aspect.

[0030] In an eighth aspect, the present application provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the method in the first aspect, or the computer program is executed by the processor to implement the method in the second aspect.

[0031] The PaaS application program exception detection method, device and equipment provided by the present application realize decoupling of health check of the application program and the application container, first perform system level health check on the application container, if the check result is normal, further perform health check on the application program, if the health check result of the application program is abnormal, perform exception processing on the application program, which is convenient for positioning and processing of problems when the health check is abnormal. BRIEF DESCRIPTION OF DRAWINGS

[0032] The accompanying drawings incorporated in and forming a part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.

[0033] Figure 1An application scenario schematic diagram provided for an embodiment of the present application;

[0034] Figure 2 A general health detection principle schematic diagram of a PaaS application provided for an embodiment of the present application;

[0035] Figure 3 A flow of an abnormality detection method of a PaaS application provided for an embodiment of the present application Figure 1 ;

[0036] Figure 4 A principle diagram of an abnormality detection method of a PaaS application provided for an embodiment of the present application;

[0037] Figure 5 A flow of an abnormality detection method of a PaaS application provided for an embodiment of the present application Figure 2 ;

[0038] Figure 6 A flow of an abnormality detection method of a PaaS application provided for an embodiment of the present application Figure 3 ;

[0039] Figure 7a An interaction flow of an abnormality detection method of a PaaS application provided for an embodiment of the present application Figure 1 ;

[0040] Figure 7b An interaction flow of an abnormality detection method of a PaaS application provided for an embodiment of the present application Figure 2 ;

[0041] Figure 8 A structure schematic of an abnormality detection apparatus of a PaaS application provided for an embodiment of the present application Figure 1 ;

[0042] Figure 9 A structure schematic of an abnormality detection apparatus of a PaaS application provided for an embodiment of the present application Figure 2 ;

[0043] Figure 10 A structure schematic of a server provided for an embodiment of the present application;

[0044] Figure 11 A structure schematic of a control device provided for an embodiment of the present application.

[0045] The specific embodiments of the present application have been shown through the above-described drawings, and will be described in more detail hereinafter. These drawings and written descriptions are not intended to limit the scope of the concept of the present application by any means, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0046] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, like reference numerals refer to like elements throughout the description. The following exemplary embodiments are not representative of all embodiments consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.

[0047] It should be noted that the PaaS application exception detection method, device and equipment provided in the present application can be used in the field of cloud computing, and can also be used in any field other than cloud computing. The application field of the PaaS application exception detection method, device and equipment in the present application is not limited.

[0048] First, the PaaS application exception detection method, device and equipment provided in the present application will be described in combination with Figure 1 The application scenario suitable for the present application is introduced.

[0049] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present application is shown in Figure 1 As shown, the application scenario includes a PaaS application server 11 and a PaaS control device 12. The PaaS application server 11 and the PaaS control device 12 can communicate through a network. The PaaS application server 11 is provided with a plurality of application programs, and the plurality of application programs are deployed in an application container.

[0050] In the related art, as shown in Figure 2 The PaaS control device initiates the execution of a health check link or a health script at regular intervals, judges the health of the application program according to the returned result, and initiates the restart of the application container if the health is abnormal. However, in the above health check scheme, the health detection of the application side is closely coupled with the overall operation of the application container, and it is unable to distinguish whether the health detection abnormality is caused by the problem of the application program itself or the problem of the environment of the application container.

[0051] The PaaS application exception detection method provided in the present application aims to solve the above technical problems in the prior art.

[0052] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described again in some embodiments. The embodiments of the present application will be described below with reference to the drawings.

[0053] Figure 3 The flow of the PaaS application exception detection method provided by an embodiment of the present application is shown in Figure 1The method is applied to a PaaS application server, and a PaaS application is deployed in an application container, as shown in Figure 3 The method comprises the following steps.

[0054] S301. Receiving a health detection instruction sent by a PaaS control device.

[0055] Specifically, the health detection instruction sent by the PaaS control device is used to instruct the PaaS application server to perform health check on the application container and the application deployed in the application container.

[0056] Optionally, the PaaS control device can send the health detection instruction at a regular time to trigger the PaaS application server to perform the health check. Optionally, before sending the health detection instruction, it can be detected whether a time interval from a last health check is greater than or equal to a preset threshold; if the time interval is greater than or equal to the preset threshold, the health detection instruction is sent, that is, the health check is performed.

[0057] S302. Performing system-level health check on the application container according to the health detection instruction by using an agent.

[0058] Specifically, the agent performs system-level health check on the application container according to the health detection instruction, for example, checks CPU, memory, process, storage device, input and output (IO), etc., such as CPU occupancy, memory usage (such as checking whether there is memory leakage or deficiency), number of running processes, available space of the storage device, read and write speed, etc., whether the read and write operations are normal, such as whether the read and write speed is normal, etc.

[0059] Based on the information obtained by checking the above aspects, it is determined whether the state of the application container is healthy, that is, whether the health check result is normal.

[0060] S303. If the system-level health check result of the application container is normal, performing health check on the application by using the agent.

[0061] If the health check result of the application is normal, performing health check on the application by using the agent to ensure that the application runs normally. The health check of the application usually includes at least one of the following aspects:

[0062] 1. Availability check: ensuring that the application is accessible. For example, it is achieved by verifying whether a preset response information is returned by a simple HTTP request.

[0063] 2. Response time: monitoring the response time of the application to ensure that it provides a response within a reasonable time range. A too long response time may indicate a performance problem.

[0064] 3. Resource usage: Check the system resources used by the application, including CPU, memory, disk I / O, and network bandwidth, to ensure they are within normal ranges.

[0065] 4. Dependency check: Verify that external services or components on which the application depends (such as databases, cache services, third-party Application Programming Interfaces (APIs), etc.) are functioning properly.

[0066] 5. Log monitoring: Analyze application logs to detect errors, exceptions, or warning messages, which can help identify potential issues.

[0067] 6. Database connectivity: Ensure that the application can successfully connect to the database and perform basic query operations.

[0068] 7. Security check: Verify that the security configuration of the application is correct, including checking the validity of certificates, and that authentication and authorization mechanisms are working properly.

[0069] 8. Load testing: Conduct periodic load testing to determine the performance and stability of the application under high load conditions.

[0070] 9. Version and configuration check: Ensure that the version and configuration of the application are up-to-date and meet expectations.

[0071] By conducting regular health checks on the above aspects, potential issues can be identified and addressed, ensuring the reliability and performance of the application.

[0072] S304, if the health check result of the application is abnormal, return first exception information to the PaaS control device, and the first exception information is used for the PaaS control device to process the abnormal application.

[0073] If the health check result of the application in S303 is abnormal, that is, the state of the application is abnormal, first exception information is returned to the PaaS control device, and the first exception information is used for the PaaS control device to process the abnormal application, such as indicating to restart the application or issuing an alarm.

[0074] The abnormality detection method of the PaaS application provided by the embodiment comprises the following steps: receiving a health detection instruction sent by a PaaS control device; performing system-level health checking on an application container according to the health detection instruction by using an agent; if the system-level health checking result of the application container is normal, performing health checking on the application program by using the agent; further, if the health checking result of the application program is abnormal, returning first abnormality information to the PaaS control device, and the first abnormality information is used for the PaaS control device to process the abnormal application program. In the above scheme, the health checking of the application program and the application container is decoupled. First, the system-level health checking is performed on the application container. If the checking result is normal, the health checking is further performed on the application program. If the health checking result of the application program is abnormal, the abnormality processing is performed on the application program, so as to facilitate the positioning and processing of the problem when the health detection is abnormal.

[0075] In some embodiments, the step S303 of performing health checking on the application program by using the agent can be implemented in the following manner:

[0076] The agent is used to call a detection program script or a detection link to perform health checking on the application program.

[0077] Specifically, the detection program script or the detection link used for health detection of the application program can be set in advance, and the agent can be used to call the detection program script or the detection link to perform health checking on the application program.

[0078] In the above embodiment, the agent is used to call the detection program script or the detection link to perform health checking on the application program, so that the health checking of the application program can be quickly implemented, and the efficiency is high.

[0079] In some embodiments, the step S303 of performing health checking on the application program by using the agent can be implemented in the following manner:

[0080] According to the priority of the application program, the application program to be checked is determined.

[0081] The agent is used to perform health checking on the application program to be checked.

[0082] Specifically, the priority of the application program can be determined, and the application program to be checked at present can be determined based on the priority. For example, for multiple application programs, the multiple application programs can be sequentially subjected to health checking according to the priority, so that the multiple application programs are not simultaneously subjected to checking, and the resources are not occupied too much, thereby avoiding affecting the normal use of the business.

[0083] In some embodiments, after the step S304, the following step is further included:

[0084] receiving a first restart instruction sent by the PaaS control device; the first restart instruction is used to instruct to restart the abnormal application;

[0085] restarting the application according to the first restart instruction.

[0086] Specifically, the PaaS control device receives first exception information indicating that the health check result of the application is abnormal, sends a first restart instruction to the PaaS application server, and instructs to restart the abnormal application; the PaaS application server restarts the application according to the first restart instruction. For example, the PaaS application server restarts the application according to the first restart instruction by using an agent.

[0087] In the above embodiment, the PaaS control device sends a first restart instruction to the PaaS application server to instruct to restart the abnormal application, which realizes problem troubleshooting of the abnormal application and does not need to restart the entire application container, thereby reducing the impact on the entire system.

[0088] In some embodiments, the step S302 of "restarting the application container according to the health detection instruction by using an agent" can be implemented in the following manner:

[0089] collecting state information of the application container at a system level by using the agent, the state information including at least one of the following: CPU state information, memory state information, process state information, storage device state information, and input / output (IO) state information;

[0090] determining a health check result of the application container at a system level according to the state information of the application container at a system level;

[0091] After the step S302, the method further includes:

[0092] if the health check result of the application container at a system level is abnormal, returning second exception information to the PaaS control device;

[0093] receiving a second restart instruction sent by the PaaS control device; the second restart instruction is used to instruct to restart the application container;

[0094] restarting the application container according to the second restart instruction.

[0095] Specifically, in the system-level health check of the application container, the Agent is used to collect the system-level state information of the application container, and the system-level health check result of the application container is determined according to the collected system-level state information of the application container.

[0096] For example, for the CPU state information, if the CPU occupancy rate is greater than or equal to a first preset threshold, it is determined that the system-level health check result of the application container is abnormal.

[0097] For the memory state information, if the memory usage rate is greater than or equal to a second preset threshold, it is determined that the system health check result of the application container is abnormal.

[0098] For the process state information, if the number of simultaneously running processes is greater than or equal to a third preset threshold, it is determined that the system health check result of the application container is abnormal.

[0099] For the storage device state information, if the available space of the storage device is less than or equal to a fourth preset threshold, it is determined that the system health check result of the application container is abnormal; or, if the read-write speed of the storage device is less than or equal to a fifth preset threshold, it is determined that the system health check result of the application container is abnormal.

[0100] For the IO state information, if the read-write speed of the read-write operation is less than or equal to a sixth preset threshold, it is determined that the system health check result of the application container is abnormal.

[0101] Optionally, if the system-level health check result of the application container is abnormal, the PaaS control device returns second abnormal information; the PaaS control device sends a second restart instruction to the PaaS application server according to the second abnormal information, the PaaS application server receives the second restart instruction sent by the PaaS control device; the second restart instruction is used to instruct to restart the application container; the PaaS application server restarts the application container according to the second restart instruction, realizing abnormal processing of the system level.

[0102] In the above embodiment, the Agent is used to collect the system-level state information of the application container, and the system-level health check result of the application container is determined according to the system-level state information of the application container; the system-level health check of the application container is realized, and the state information of the application container is more easily collected, thereby improving the reliability and user experience of the system.

[0103] For example, as shown in Figure 5 the method comprises the following steps:

[0104] S51, the PaaS control device triggers a health detection instruction at a time;

[0105] S52, determining whether to perform system-level health check of the application container;

[0106] If it is determined to perform system-level health check of the application container, performing S53, the Agent collects health status information of the application container system level, and performs health check;

[0107] If it is determined not to perform system-level health check of the application container, performing S54, the Agent calls the detection program script or detection link of the application program, and performs health check of the application program;

[0108] If it is not a health detection instruction, performing S55, determining whether it is a container restart instruction;

[0109] If it is a container restart instruction, performing S56, restarting the application program;

[0110] If it is not a container restart instruction, performing S57, the Agent calls the program script to restart the abnormal application program.

[0111] Figure 6 The flow of the abnormal detection method of the PaaS application provided by the embodiment Figure 2 The method is applied to a PaaS control device, and a PaaS application is deployed in an application container, as shown in Figure 6 The method comprises the following steps.

[0112] S601, sending a health detection instruction to a PaaS application server; the health detection instruction is used to instruct the PaaS application server to perform system-level health check of the application container according to the health detection instruction by using an Agent; if the system-level health check result of the application container is normal, the Agent performs health check of the application program;

[0113] S602, receiving first abnormal information sent by the PaaS application server; the first abnormal information is sent in the case that the health check result of the application program is abnormal;

[0114] S603, processing the abnormal application program according to the first abnormal information.

[0115] In some embodiments, the processing of the abnormal application program according to the first abnormal information comprises:

[0116] sending a first restart instruction to the PaaS application server; the first restart instruction is used to instruct to restart the abnormal application program.

[0117] In some embodiments, the method further comprises:

[0118] receive second exception information sent by the PaaS application server; the second exception information is sent in a case where it is determined that the system-level health check result of the application container is abnormal, and the system-level health check result of the application container is determined based on state information of a system level of the application container;

[0119] send, according to the second exception information, a second restart instruction to the PaaS application server; the second restart instruction is used to instruct to restart the application container.

[0120] The PaaS application exception detection method provided in the embodiment has similar implementation principles and beneficial effects to the method on the PaaS application server side, and thus will not be described herein.

[0121] Figure 7a An interaction process of the PaaS application exception detection method provided in the embodiment Figure 1 As shown in Figure 7a the method comprises the following steps.

[0122] S71, the PaaS control device sends a health detection instruction to the PaaS application server;

[0123] S72, the PaaS application server performs system-level health check on the application container according to the health detection instruction by using an agent Agent;

[0124] S73, if the system-level health check result of the application container is normal, the PaaS application server performs health check on the application program by using the Agent;

[0125] S74, if the health check result of the application program is abnormal, the PaaS application server returns first exception information to the PaaS control device;

[0126] S75, the PaaS control device processes the abnormal application program according to the first exception information.

[0127] Figure 7b An interaction process of the PaaS application exception detection method provided in the embodiment Figure 2 As shown in Figure 7b the method comprises the following steps.

[0128] S71, the PaaS control device sends a health detection instruction to the PaaS application server;

[0129] S72, the PaaS application server performs system-level health check on the application container according to the health detection instruction by using an agent Agent;

[0130] S72a, if the system level health check result of the application container is abnormal, return second abnormal information to the PaaS control device;

[0131] S72b, the PaaS control device sends a first restart instruction to the PaaS application server, for instructing to restart the application container;

[0132] S73, if the system level health check result of the application container is normal, the PaaS application server uses the Agent to perform health check on the application program;

[0133] S74, if the health check result of the application program is abnormal, the PaaS application server returns first abnormal information to the PaaS control device;

[0134] S75, the PaaS control device sends a first restart instruction to the PaaS application server, for instructing to restart the abnormal application program.

[0135] In summary, the method of the embodiment of the application decouples the PaaS health check from the system level and the application level through the Agent, separates the health check, start, stop, restart and other actions of the application program from the application container, facilitates the positioning of the problem in the abnormal case, and the Agent integrates the health check of the application container, facilitating the collection of the state information of the running environment in the application container.

[0136] Optionally, the Agent can be made in the basic image of the application container, uniformly maintained and upgraded, and extended conveniently, which is conducive to promoting the standardized cloud application health check mechanism.

[0137] Optionally, the system level health check, the application level health check or the health check strategy combining the two can be independently set in the embodiment of the application.

[0138] Figure 8 The structure of the PaaS application program abnormality detection device provided by the embodiment of the application Figure 1 As shown in Figure 8 The PaaS application program abnormality detection device is applied to a PaaS application server, and includes:

[0139] The receiving module 801 is configured to receive a health detection instruction sent by a PaaS control device;

[0140] The processing module 802 is configured to perform system level health check on the application container according to the health detection instruction through an Agent;

[0141] if the health check result of the system level of the application container is normal, performing health check on the application by the Agent;

[0142] The sending module 803 is configured to return first exception information to the PaaS control device if the health check result of the processing module on the application is abnormal, and the first exception information is used for the PaaS control device to process the abnormal application.

[0143] In a possible implementation, the processing module 802 is specifically configured to:

[0144] perform health check on the application by calling a detection program script or a detection link by using the Agent.

[0145] In a possible implementation, the receiving module 801 is further configured to:

[0146] After the sending module 803 returns the first exception information to the PaaS control device, receive a first restart instruction sent by the PaaS control device; the first restart instruction is used to instruct to restart the abnormal application.

[0147] The processing module 802 is further configured to:

[0148] According to the first restart instruction, restart the application.

[0149] In a possible implementation, the processing module 802 is specifically configured to:

[0150] Collect state information of the system level of the application container by using the Agent, and the state information includes at least one of the following: CPU state information, memory state information, process state information, storage device state information, and input / output (IO) state information.

[0151] According to the state information of the system level of the application container, determine a health check result of the system level of the application container.

[0152] In a possible implementation, the sending module 803 is further configured to:

[0153] If the health check result of the system level of the application container is abnormal, return second exception information to the PaaS control device.

[0154] In a possible implementation, the receiving module 801 is further configured to:

[0155] Receive a second restart instruction sent by the PaaS control device; the second restart instruction is used to instruct to restart the application container.

[0156] The processing module 802 is further configured to:

[0157] According to the second restart instruction, the application container is restarted.

[0158] In a possible implementation, the processing module 802 is specifically configured to:

[0159] According to the priority of the application program, the application program to be checked is determined;

[0160] The Agent is used to perform health check on the application program to be checked.

[0161] The abnormality detection apparatus for the PaaS application provided in the embodiments of the present application can execute the technical solutions in the method embodiments, and has similar implementation principles and beneficial effects, which will not be repeated here.

[0162] Figure 9 The structure of the abnormality detection apparatus for the PaaS application provided in the embodiments of the present application is shown in Figure 2 As shown in Figure 9 The abnormality detection apparatus for the PaaS application is applied to a PaaS control device, and the abnormality detection apparatus for the PaaS application comprises:

[0163] The sending module 901 is configured to send a health detection instruction to a PaaS application server; the health detection instruction is used to instruct the PaaS application server to perform system-level health check on the application container according to the health detection instruction by using an Agent; and if the system-level health check result of the application container is normal, the Agent is used to perform health check on an application program.

[0164] The receiving module 902 is configured to receive first abnormality information sent by the PaaS application server; the first abnormality information is sent in a case where a health check result of the application program is abnormal.

[0165] The processing module 903 is configured to perform processing on the abnormal application program according to the first abnormality information.

[0166] In a possible implementation, the processing module 901 is specifically configured to:

[0167] The sending module 901 is configured to send a first restart instruction to the PaaS application server; the first restart instruction is used to instruct to restart the abnormal application program.

[0168] In a possible implementation, the receiving module 902 is further configured to:

[0169] receive second exception information sent by the PaaS application server; the second exception information is sent in a case where it is determined that the system level health check result of the application container is abnormal, and the system level health check result of the application container is determined based on system level state information of the application container;

[0170] The sending module 901 is further configured to send, to the PaaS application server, a second restart instruction according to the second exception information; the second restart instruction is used to instruct to restart the application container.

[0171] The PaaS application exception detection apparatus provided in the embodiments of the present application can execute the technical solutions in the method embodiments, and the implementation principles and beneficial effects are similar, which will not be repeated here.

[0172] Figure 10 A structural diagram of a server provided in the present application is shown in FIG. 1. As shown in FIG. 1, the server provided in the embodiments of the present application includes at least one processor 1001 and a memory 1002. Optionally, the server further includes a communication component 1003. The processor 1001, the memory 1002 and the communication component 1003 are connected through a bus. Figure 10

[0173] In the specific implementation process, the at least one processor 1001 executes the computer execution instructions stored in the memory 1002, so that the at least one processor 1001 executes the method described above.

[0174] The specific implementation process of the processor 1001 can refer to the method embodiments of the PaaS application server side described above, and the implementation principles and technical effects are similar, which will not be repeated here in the embodiments of the present application.

[0175] Figure 11 A structural diagram of a control device provided in the present application is shown in FIG. 2. As shown in FIG. 2, the control device provided in the embodiments of the present application includes at least one processor 1101 and a memory 1102. Optionally, the device further includes a communication component 1103. The processor 1101, the memory 1102 and the communication component 1103 are connected through a bus. Figure 11

[0176] In the specific implementation process, the at least one processor 1101 executes the computer execution instructions stored in the memory 1102, so that the at least one processor 1101 executes the method described above.

[0177] The specific implementation process of the processor 1101 can refer to the method embodiments of the PaaS control device side described above, and the implementation principles and technical effects are similar, which will not be repeated here in the embodiments of the present application.

[0178] ​​In the above embodiments, it should be understood that the processor can be a central processing unit (CPU) and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or can also be any conventional processor. The steps of the method disclosed in combination with the application can be directly embodied as hardware processor execution or combined with hardware and software modules in the processor for execution.

[0179] The memory can include a random access memory (RAM) and can also include a non-volatile memory (NVM), such as at least one disk memory.

[0180] The bus can be an industry standard architecture (ISA) bus, a peripheral component (PCI) bus, an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus.

[0181] The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the above method.

[0182] The present application also provides a computer readable storage medium having computer execution instructions stored therein, wherein when a processor executes the computer execution instructions, the above method is implemented.

[0183] The above readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0184] An example readable storage medium is coupled to the processor such that the processor can read information from the readable storage medium and can write information to the readable storage medium. Of course, the readable storage medium can also be a part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in the device.

[0185] The division of units is only a logical functional division, and in actual implementation, there can be another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0186] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0187] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.

[0188] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the part of the present application that essentially contributes to the prior art or the part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.

[0189] Those skilled in the art can understand that all or part of the steps of the foregoing method embodiments can be completed by a program instruction related hardware. The foregoing program can be stored in a computer readable storage medium. The program executes to perform the steps of the foregoing method embodiments; and the foregoing storage medium includes various storage media that can store program codes, such as ROM, RAM, magnetic disk, or optical disk.

[0190] In the foregoing embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments. Each technical feature of the foregoing embodiments can be combined arbitrarily, and in order to make the description brief, each technical feature of the foregoing embodiments is not described in all possible combinations, however, as long as the combination of these technical features does not exist contradictory, it should be considered as the scope disclosed in the specification.

[0191] Other embodiments of this application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses or adaptations of this application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice in the art to which this application pertains or can relate to other fields of endeavor. The specification and examples are exemplary only, with the true scope and spirit of the application being indicated by the following claims.

[0192] It should be understood that the application is not limited to the precise construction that has been described and illustrated and that changes can be made in various parts of the specification and in the drawings without departing from the scope of the application. The scope of the application is limited only by the claims that follow.

Claims

1. A method of anomaly detection of a PaaS application, characterized by, The method is applied to a PaaS application server, the PaaS application is deployed in an application container, and the method comprises the following steps: receiving a health detection instruction sent by a PaaS control device; performing system-level health check on the application container by an agent according to the health detection instruction; if the system-level health check result of the application container is normal, performing health check on the application program by the agent; if the health check result of the application program is abnormal, returning first abnormal information to the PaaS control device, and the first abnormal information is used for processing the abnormal application program by the PaaS control device.

2. The method of claim 1, wherein, The health check on the application program by the agent comprises the following steps: calling a detection program script or a detection link to perform health check on the application program by the agent.

3. The method according to claim 1 or 2, characterized in that, After the first abnormal information is returned to the PaaS control device, the method further comprises the following steps: receiving a first restart instruction sent by the PaaS control device, and the first restart instruction is used for instructing to restart the abnormal application program; restarting the application program according to the first restart instruction.

4. The method according to claim 1 or 2, characterized in that, The system-level health check on the application container by the agent according to the health detection instruction comprises the following steps: collecting system-level state information of the application container by the agent, and the state information comprises at least one of the following: CPU state information, memory state information, process state information, storage device state information and input / output (IO) state information; determining the system-level health check result of the application container according to the system-level state information of the application container. After the system-level health check on the application container by the agent according to the health detection instruction, the method further comprises the following steps: if the system-level health check result of the application container is abnormal, returning second abnormal information to the PaaS control device; receiving a second restart instruction sent by the PaaS control device, and the second restart instruction is used for instructing to restart the application container; restarting the application container according to the second restart instruction.

5. The method according to claim 1 or 2, characterized in that, The health check on the application program by the agent comprises the following steps: determining an application program to be checked according to the priority of the application program; performing health check on the application program to be checked by the agent.

6. A method of anomaly detection of a PaaS application, characterized by, The method is applied to a PaaS control device, the PaaS application is deployed in an application container, and the method comprises the following steps: sending a health detection instruction to a PaaS application server, and the health detection instruction is used for instructing the PaaS application server to perform system-level health check on the application container by an agent according to the health detection instruction, and if the system-level health check result of the application container is normal, performing health check on the application program by the agent; receiving first abnormal information sent by the PaaS application server, and the first abnormal information is sent in the case that the health check result of the application program is abnormal; According to the first exception information, the abnormal application is processed.

7. The method of claim 6, wherein, The processing of the abnormal application according to the first exception information comprises: sending a first restart instruction to the PaaS application server; the first restart instruction is used to instruct to restart the abnormal application.

8. The method according to claim 6 or 7, characterized in that, The method further comprises: receiving second exception information sent by the PaaS application server; the second exception information is sent in a case where the system-level health check result of the application container is determined to be abnormal, and the system-level health check result of the application container is determined based on system-level state information of the application container; According to the second exception information, a second restart instruction is sent to the PaaS application server; the second restart instruction is used to instruct to restart the application container. 9.An apparatus for detecting an anomaly of a PaaS application, characterized by comprising: Applied to a PaaS application server, the device comprises: a receiving module configured to receive a health detection instruction sent by a PaaS control device; a processing module configured to perform system-level health check on an application container by an agent according to the health detection instruction; if the system-level health check result of the application container is normal, performing health check on an application by the agent; a sending module configured to return first exception information to the PaaS control device if the health check result of the application is abnormal, the first exception information being used by the PaaS control device to process the abnormal application.

10. A PaaS application anomaly detection device, characterized in that: Applied to a PaaS control device, the device comprises: a sending module configured to send a health detection instruction to a PaaS application server; the health detection instruction is used to instruct the PaaS application server to perform system-level health check on an application container by an agent according to the health detection instruction; if the system-level health check result of the application container is normal, performing health check on an application by the agent; a receiving module configured to receive first exception information sent by the PaaS application server, the first exception information being sent in a case where the health check result of the application is abnormal; a processing module configured to process the abnormal application according to the first exception information.

11. A PaaS application server, characterized by comprise: a processor, and a memory connected to the processor in communication; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 5.

12. A PaaS control device, characterized by, comprise: a processor, and a memory connected to the processor in communication; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 6 to 8.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by the processor to implement the method according to any one of claims 1 to 5, or implement the method according to any one of claims 6 to 8.

14. A computer program product, characterised in that, A computer program comprising computer program elements which, when executed by a processor, implement the method of any one of claims 1 to 5, or implement the method of any one of claims 6 to 8.

Citation Information

Patent Citations

  • Secure computer platform based on cloud computing

    CN113157499A

  • K8s container cluster health examination system and examination method

    CN116541129A