CN114896116A - Application program monitoring method and device based on microservice and storage medium - Google Patents

Application program monitoring method and device based on microservice and storage medium Download PDF

Info

Publication number
CN114896116A
CN114896116A CN202210197355.9A CN202210197355A CN114896116A CN 114896116 A CN114896116 A CN 114896116A CN 202210197355 A CN202210197355 A CN 202210197355A CN 114896116 A CN114896116 A CN 114896116A
Authority
CN
China
Prior art keywords
sub
application
performance
state
monitoring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210197355.9A
Other languages
Chinese (zh)
Inventor
董燕
万振华
王颉
李华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seczone Technology Co Ltd
Original Assignee
Seczone Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seczone Technology Co Ltd filed Critical Seczone Technology Co Ltd
Priority to CN202210197355.9A priority Critical patent/CN114896116A/en
Publication of CN114896116A publication Critical patent/CN114896116A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3624Software debugging by performing operations on the source code, e.g. via a compiler

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The application provides a method, equipment and a storage medium for monitoring an application program based on micro-service. The application program monitoring method based on the microservice comprises the following steps: acquiring performance data of each sub-application program in real time through a monitoring probe deployed in each sub-application program; the application program comprises a plurality of sub application programs, and each sub application program has a corresponding performance index; adjusting the working state of each monitoring probe according to the performance data and the corresponding performance index of each sub-application program; wherein the working state comprises an enabling state and a disabling state; updating the monitoring page according to the adjustment result; the monitoring page is used for displaying the identification of each monitoring probe, the current working state and the identification of the corresponding sub-application program of all the monitoring probes in the forbidden state in an associated mode. The method and the device can effectively improve the effectiveness of monitoring the application program based on the micro service.

Description

Application program monitoring method and device based on microservice and storage medium
[ technical field ] A method for producing a semiconductor device
The present application relates to the field of computer technologies, and in particular, to a method, a device, and a storage medium for monitoring an application program based on a microservice.
[ background of the invention ]
The micro service (also called micro service architecture) is a cloud native architecture method, which splits a single application program into a plurality of loosely coupled and independently deployable smaller components, and adopts a distributed deployment manner in implementation and deployment, so that the components are coordinated and matched with each other to provide final value for users; wherein a node of a distributed link can be seen as a component. In the microservice-based application, each component runs in a respective independent process, the components communicate with each other usually by adopting a lightweight communication mechanism (such as a HTTP-based RESTful API), and each component is built around a respective specific service and can be independently deployed in a production environment, a class production environment, and the like.
In the related art, monitoring of the microservice-based application is generally implemented by a instrumentation technique, that is, by injecting instrumentation code (also called instrumentation probe), the behavior of the corresponding application at runtime is analyzed. However, the existence of the instrumentation probe inevitably affects performance indexes such as request response time, memory occupancy rate, and CPU (Central Processing Unit) utilization rate of each component, so that the load of some components is too heavy, and the whole application program is crashed, and related services performed by a user are seriously affected, which reflects that the effectiveness of monitoring the application program based on the micro service is low.
Therefore, there is a need for an improved method of monitoring microservice-based applications.
[ summary of the invention ]
The application provides a method, equipment and a storage medium for monitoring an application program based on micro-service, and aims to solve the problem of low effectiveness when the application program based on micro-service is monitored in the related art.
In order to solve the foregoing technical problem, a first aspect of the embodiments of the present application provides a method for monitoring an application program based on a microservice, including:
acquiring performance data of each sub-application program in real time through a monitoring probe deployed in each sub-application program; the application program to be monitored comprises a plurality of sub-application programs, and each sub-application program has a corresponding performance index;
adjusting the working state of each monitoring probe according to the performance data of each sub-application program and the corresponding performance index; wherein the operating state comprises an enabled state and a disabled state;
updating the monitoring page according to the adjustment result; the monitoring page is used for displaying the identifier of each monitoring probe, the current working state and the identifiers of the corresponding sub-applications of all the monitoring probes in the forbidden state in a correlated manner.
A second aspect of embodiments of the present application provides an electronic device, including a storage and at least one processor; the storage device is configured to store at least one program, and when the at least one program is executed by the at least one processor, the at least one processor is enabled to execute the method for monitoring a microservice-based application according to the first aspect of the embodiments of the present application.
A third aspect of the embodiments of the present application provides a computer-readable storage medium, on which executable instructions are stored, and when executed, the method for monitoring an application based on a microservice according to the first aspect of the embodiments of the present application is performed.
As can be seen from the above description, the present application has the following advantages compared with the related art:
firstly, acquiring performance data of each sub-application program in real time through a monitoring probe deployed in each sub-application program; adjusting the working state of each monitoring probe according to the performance data and the corresponding performance index of each sub-application program; finally, updating the monitoring page according to the adjustment result; wherein the operating state includes an enabled state and a disabled state. Based on this, it is possible to determine which sub-applications have poor current performance according to the performance data of each sub-application and the corresponding performance index, for example, according to the difference, ratio, size relationship, etc. between the performance data of each sub-application and the corresponding performance index, i.e., determine which sub-applications are currently overloaded or are about to reach a heavily loaded state, and may be referred to herein, the working state of each monitoring probe is adjusted, so that the monitoring probes corresponding to all or part of the sub-applications with poor performance are forbidden, thereby reducing the impact of all monitoring probes being disabled on the performance of the corresponding sub-application, the whole application program to be monitored is not easy to crash, and related services performed by a user are not influenced, so that the effectiveness of monitoring the application program based on the micro-service is improved.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions in the related art or the embodiments of the present application, the drawings needed to be used in the description of the related art or the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, not all embodiments, and other drawings can be obtained by those skilled in the art without inventive efforts.
FIG. 1 is a flowchart illustrating a microservice-based application monitoring method according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart of step 102 of FIG. 1 according to an embodiment of the present disclosure;
FIG. 3 is a diagram illustrating a performance relationship between all sub-applications provided by an embodiment of the present application;
FIG. 4 is another schematic flow chart diagram of step 102 of FIG. 1 provided in an embodiment of the present application;
FIG. 5 is a flowchart illustrating step 402 of FIG. 4 according to an embodiment of the present application;
FIG. 6 is another schematic flow chart diagram of step 402 in FIG. 4 according to an embodiment of the present application;
FIG. 7 is a schematic flow chart diagram illustrating a process flow after step 102 in FIG. 1 according to an embodiment of the present disclosure;
fig. 8 is a block diagram of an electronic device provided in an embodiment of the present application;
fig. 9 is a block diagram of a computer-readable storage medium according to an embodiment of the present application.
[ detailed description ] embodiments
In order to make the objects, technical solutions and advantages of the present application more apparent and understandable, the present application will be clearly and completely described below in conjunction with the embodiments of the present application and the corresponding drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. It should be understood that the embodiments of the present application described below are only for explaining the present application and are not intended to limit the present application, that is, all other embodiments obtained by a person of ordinary skill in the art without making creative efforts based on the embodiments of the present application belong to the protection scope of the present application. In addition, the technical features involved in the embodiments of the present application described below may be combined with each other as long as they do not conflict with each other.
In the related art, monitoring of the microservice-based application is generally implemented by using a instrumentation technique, that is, by injecting an instrumentation probe, behavior of the corresponding application at runtime is analyzed. However, the existence of the instrumentation probe inevitably affects performance indexes such as request response time, memory occupancy rate, CPU utilization rate, and the like of each component, thereby causing overload of some components, further causing the whole application program to crash, and causing a serious impact on related services performed by a user, which are all reflected by low effectiveness when monitoring the application program based on the micro service. Therefore, the embodiment of the application provides an application program monitoring method based on microservice.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a monitoring method for an application based on microservice according to an embodiment of the present disclosure; as can be seen from fig. 1, the microservice-based application monitoring method provided by the embodiment of the present application includes the following steps 101 to 103.
And 101, acquiring the performance data of each sub-application program in real time through a monitoring probe deployed in each sub-application program.
In the embodiment of the application, the application to be monitored is constructed through micro-service, namely the application to be monitored comprises a plurality of sub-applications; in addition, a distributed deployment mode is adopted in implementation deployment, so that the sub-applications are coordinated and matched with each other, and a final value is provided for a user; wherein a node of a distributed link can be seen as a sub-application.
Further, when monitoring the application program to be monitored, performance data of each sub-application program needs to be acquired respectively; performance data may include, but is not limited to, request response time, memory occupancy, and CPU usage, among others. Specifically, the embodiment of the application monitors the application to be monitored through the instrumentation technology, that is, the monitoring probes are deployed in the sub-applications respectively, and the performance data of each sub-application is acquired through the monitoring probes deployed in the sub-applications. It should be noted that, since the instrumentation technique is a technique for acquiring the control flow and the data flow of the application program in real time during the running process of the application program, the embodiment of the present application can realize near real-time monitoring of the application program to be monitored, that is, the process of acquiring the performance data of each sub-application program in step 101 is performed in real time.
And 102, adjusting the working state of each monitoring probe according to the performance data and the corresponding performance index of each sub-application program.
In the embodiment of the application, each sub-application program has a corresponding performance index; the types of the performance indexes of any two sub-application programs can be the same or different; the values of the performance indicators of any two sub-applications may be the same or different. As an example, the application to be monitored includes three sub-applications (A, B and C, respectively); wherein, the performance indexes of A are request response time 5s, memory occupancy rate 85% and CPU utilization rate 80%; b has performance indexes of 4s of request response time, 80% of memory occupancy rate and 75% of CPU utilization rate; c has performance indexes of 5s of request response time and 85% of memory occupancy rate; it can be seen that the types of performance indicators for a and C are different, but the values of the same type of performance indicator are the same; for A and B, the types of the performance indexes of the A and the B are the same, but the values of the performance indexes of the same type are different; the types of performance indicators of B and C are different from each other, and the values of the same type of performance indicator are also different from each other.
On this basis, after the performance data of each sub-application program is acquired, the working state of each monitoring probe needs to be adjusted according to the acquired performance data of each sub-application program and the corresponding performance index; wherein the working state comprises an enabling state and a disabling state; it will be appreciated that the enabled state is an operational state of the monitoring probe indicating that the monitoring probe is acquiring performance data normally; the disabled state is a non-operational state of the monitoring probe indicating that the monitoring probe cannot acquire performance data; in addition, when the application program to be monitored enters into work, the working states of all the monitoring probes are enabled. As an example, according to the difference, the ratio, the size relationship, and the like between the acquired performance data of each sub-application and the corresponding performance index, it may be determined which sub-applications have poor current performance, that is, it is determined which sub-applications have excessive current load or are about to reach a heavy load state, and based on this, the operating state of each monitoring probe may be adjusted, so that all or part of the sub-applications having poor current performance have their corresponding monitoring probes disabled, thereby avoiding the disabled monitoring probes from continuously affecting the performance of the corresponding sub-applications.
And 103, updating the monitoring page according to the adjustment result.
In the embodiment of the application, after the working state of each monitoring probe is adjusted, the monitoring page needs to be updated according to the adjustment result; the monitoring page is used for displaying the identification of each monitoring probe, the current working state and the identification of the corresponding sub-application program of all the monitoring probes in the forbidden state in an associated mode. Of course, in other embodiments, the monitoring page may also display the performance data obtained by each monitoring probe in association with other than the above content; it will be appreciated that for a monitoring probe in a disabled state, the performance data acquired should be the last performance data acquired before it was disabled. In practical application, a user can check the monitoring page to know the performance data acquired by each monitoring probe, the current working state of each monitoring probe, and all sub-applications with poor current performance (i.e. all sub-applications corresponding to all monitoring probes in the forbidden state) in real time, so as to monitor the application to be monitored.
According to the embodiment of the application, the performance data of each sub-application program is acquired in real time through the monitoring probes deployed on each sub-application program; adjusting the working state of each monitoring probe according to the acquired performance data and corresponding performance indexes of each sub-application program; finally, updating the monitoring page according to the adjustment result; wherein the operating state includes an enabled state and a disabled state. Based on this, it is possible to determine which sub-applications are currently poor in performance according to the obtained performance data of each sub-application and the corresponding performance index, for example, according to the difference, ratio, size relationship, and the like between the obtained performance data of each sub-application and the corresponding performance index, i.e., determining which sub-applications are currently overloaded or are about to reach a heavily loaded state, and may be referred to herein, the working state of each monitoring probe is adjusted, so that the monitoring probes corresponding to all or part of the sub-applications with poor performance are forbidden, thereby reducing the impact of all monitoring probes being disabled on the performance of the corresponding sub-application, the whole application program to be monitored is not easy to crash, and related services carried out by a user cannot be influenced, so that the effectiveness of monitoring the application program based on the micro-service is improved. In addition, the monitoring probe is deployed in each sub-application program forming the application program to be monitored, so that the sub-application program with poor current performance can be timely and accurately positioned through the corresponding relation between the monitoring probe and the sub-application program.
As an embodiment, please further refer to fig. 2, wherein fig. 2 is a schematic flow chart of step 102 in fig. 1 according to an embodiment of the present disclosure; as can be seen from fig. 2, step 102 may specifically include the following steps 201 to 202.
Step 201, comparing the performance data of each sub-application with the corresponding performance index.
In this embodiment, when the operating state of each monitoring probe is adjusted according to the acquired performance data and the corresponding performance index of each sub-application, the acquired performance data of each sub-application needs to be compared with the corresponding performance index to obtain a comparison result.
And step 202, adjusting the working state of each monitoring probe according to the comparison result.
In this embodiment, after comparing the acquired performance data of each sub-application with the corresponding performance index, the operating state of each monitoring probe needs to be adjusted according to the comparison result. Specifically, when the performance data of the target sub-application program is larger than the corresponding performance index, the working state of the corresponding monitoring probe of the target sub-application program is adjusted from an enabled state to a disabled state; and when the performance data of the target sub-application program is less than or equal to the corresponding performance index, keeping the working state of the corresponding monitoring probe of the target sub-application program as an enabled state. It can be understood that, in the embodiment, the size relationship between the acquired performance data of each sub-application and the corresponding performance index is compared, and the monitoring probes corresponding to all the sub-applications whose performance data are greater than the corresponding performance index are disabled, so that the disabled monitoring probes are prevented from continuously affecting the performance of the corresponding sub-applications, and the application to be monitored is prevented from being crashed integrally.
As another embodiment, step 102 may specifically include: adjusting the working state of each monitoring probe according to the performance data and the corresponding performance index of each sub-application program and the performance incidence relation among all the sub-application programs; wherein the performance association relationship indicates a relationship between the root-cause sub-application in which the performance data changes and at least one other sub-application in which the performance data association changes; or, when the performance data of the root sub application changes, which results in the performance data of at least one other sub application changing, the root sub application and the at least one other sub application have the above performance association relationship. It can be understood that, since the application to be monitored is structured by the microservices, and the distributed deployment manner is adopted in implementation and deployment, the sub-applications are coordinated and cooperated with each other, so that a certain sub-application may call related functions of other sub-applications or take outputs of other sub-applications as inputs during the working process, which is why the above-mentioned performance association relationship exists between the sub-applications.
As an example, please further refer to fig. 3, fig. 3 is a schematic diagram illustrating a performance association relationship between all sub applications according to an embodiment of the present application; wherein each capital/lowercase english alphabet represents a sub-application. As can be seen from fig. 3, in the performance association relationship among all the sub-applications, not only a plurality of relationship lines but also independent sub-applications (i.e., sub-applications that do not form a performance association relationship with other sub-applications, such as a, b, c, d, e, and f in fig. 3) exist. As can also be seen from fig. 3, when the performance data of a changes, the performance data of B, F and H will change; when the performance data of B is changed, C, D and E are caused to be changed; when the performance data of F changes, the performance data of G changes; when the performance data of H is changed, the performance data of I and J are changed; at this point, A, B, F, H, C, D, E, G, I and J together form a complete relationship circuit, and A, B, F and H are both root child applications. In addition, other relationship lines and corresponding root cause sub-applications in fig. 3 are the same, and are not described herein again.
Specifically, referring to fig. 4, fig. 4 is another schematic flow chart of step 102 in fig. 1 according to an embodiment of the present disclosure; as shown in fig. 4, adjusting the operating state of each monitoring probe according to the performance data and the corresponding performance index of each sub-application and the performance association relationship between all sub-applications may specifically include the following steps 401 to 402.
Step 401, comparing the performance data of each sub-application with the corresponding performance index.
In this embodiment, when the working state of each monitoring probe is adjusted according to the acquired performance data and corresponding performance index of each sub-application and the performance association relationship between all sub-applications, the acquired performance data of each sub-application needs to be compared with the corresponding performance index to obtain a comparison result.
And step 402, adjusting the working state of each monitoring probe according to the comparison result and the performance association relation among all the sub-applications.
In this embodiment, after the obtained performance data of each sub-application is compared with the corresponding performance index, the working state of each monitoring probe needs to be adjusted according to the comparison result and the performance association relationship between all the sub-applications, so that the monitoring probes corresponding to all or part of the sub-applications with poor current performance are disabled, and the disabled monitoring probes are prevented from continuously affecting the performance of the corresponding sub-applications, thereby ensuring that the application to be monitored does not have an integral collapse phenomenon.
As an implementation of the present embodiment, please further refer to fig. 5, where fig. 5 is a schematic flowchart of step 402 in fig. 4 according to an embodiment of the present disclosure; as can be seen from fig. 5, step 402 may specifically include the following steps 4021 to 4024.
Step 4021, when the performance data of the target sub-application is greater than the corresponding performance index, if the target sub-application and at least one other sub-application form a performance association relationship, adjusting the working states of the target sub-application and the monitoring probes corresponding to all other sub-applications forming the performance association relationship with the target sub-application from an enabled state to a disabled state.
In this specific implementation, in the process of adjusting the operating state of each monitoring probe according to the comparison result and the performance association relationship among all the sub-applications, when the performance data of the target sub-application is greater than the corresponding performance index, if the target sub-application can form the performance association relationship with at least one other sub-application, the operating state of the monitoring probe corresponding to the target sub-application is adjusted from the enabled state to the disabled state, and the operating states of the monitoring probes corresponding to all the other sub-applications forming the performance association relationship with the target sub-application are all adjusted from the enabled state to the disabled state.
It can be understood that if the performance data of the target sub-application is greater than the corresponding performance index, the current performance of the target sub-application is poor, that is, the monitoring probe corresponding to the target sub-application has a large influence on the performance of the target sub-application, and due to the existence of the performance association relationship, some other sub-applications forming the performance association relationship with the target sub-application may cause the performance of the target sub-application to be continuously degraded, and the target sub-application may also cause the performance of other sub-applications forming the performance association relationship with the target sub-application to be degraded; therefore, in order to avoid that after a certain period of time, the performance of all or part of the sub-applications in the relationship line where the target sub-application is located is increasingly poor, thereby causing the whole application to be monitored to crash, the specific implementation adjusts the working states of the target sub-application and the monitoring probes corresponding to all other sub-applications forming the performance association relationship with the target sub-application from the enabled state to the disabled state, so as to avoid that the disabled monitoring probes continuously affect the performance of the corresponding sub-applications.
Step 4022, if the target sub-application program does not form a performance association relationship with other sub-application programs, adjusting the working state of the monitoring probe corresponding to the target sub-application program from an enabled state to a disabled state.
In this specific implementation, if the target sub-application cannot form a performance association relationship with other sub-applications, it is indicated that the target sub-application is independent in the performance association relationship, and at this time, only the working state of the monitoring probe corresponding to the target sub-application is adjusted from the enabled state to the disabled state.
Step 4023, when the performance data of the target sub-application is less than or equal to the corresponding performance index, if the target sub-application and at least one other sub-application form a performance association relationship, and the performance data of all other sub-applications forming the performance association relationship with the target sub-application is less than or equal to the corresponding performance index, keeping the working states of the target sub-application and the monitoring probes corresponding to all other sub-applications forming the performance association relationship with the target sub-application in an enabled state.
In this specific implementation, in the process of adjusting the operating state of each monitoring probe according to the comparison result and the performance association relationship between all the sub-applications, when the performance data of the target sub-application is less than or equal to the corresponding performance index, if the target sub-application is capable of forming the performance association relationship with at least one other sub-application and the performance data of all the other sub-applications forming the performance association relationship with the target sub-application is less than or equal to the corresponding performance index, the operating state of the monitoring probe corresponding to the target sub-application is maintained as the enabled state, and the operating states of the monitoring probes corresponding to all the other sub-applications forming the performance association relationship with the target sub-application are maintained as the enabled state.
It will be appreciated that if the performance data of the target sub-application is less than or equal to the corresponding performance level, then the target sub-application is currently performing better, i.e., the corresponding monitor probe of the target sub-application has less impact on the performance of the target sub-application, then when the target sub-application is able to form a performance association with at least one other sub-application, and the performance data of all other sub-applications that form a performance association with the target sub-application is less than or equal to the corresponding performance index, it is shown that the performance of all sub-applications in the relationship line where the target sub-application is located is better, and therefore, the specific implementation maintains the working states of the target sub-application and all the monitoring probes corresponding to other sub-applications which form a performance association relation with the target sub-application as enabled states. In addition, for the case that the target sub application can form a performance association relationship with at least one other sub application, and the performance data of the at least one other sub application forming the performance association relationship with the target sub application is greater than the corresponding performance index, refer to the relevant description of the specific implementation on step 4021.
Step 4024, if the target sub-application program does not form a performance association relationship with other sub-application programs, keeping the working state of the monitoring probe corresponding to the target sub-application program as an enabled state.
In this specific implementation, if the target sub-application cannot form a performance association relationship with other sub-applications, it is indicated that the target sub-application is independent in the performance association relationship, and at this time, only the working state of the monitoring probe corresponding to the target sub-application is maintained as the enabled state.
As another specific implementation of the present embodiment, please further refer to fig. 6, where fig. 6 is another schematic flow chart of step 402 in fig. 4 according to an embodiment of the present application; as can be seen from fig. 6, step 402 may specifically include the following steps 4021 'to 4026'.
Step 4021', when the performance data of the target sub-application is greater than the corresponding performance index, if the target sub-application and at least one other sub-application form a performance association relationship, selecting at least one root cause sub-application from the target sub-application and all other sub-applications forming the performance association relationship with the target sub-application.
In this specific implementation, in the process of adjusting the operating state of each monitoring probe according to the comparison result and the performance association relationship between all the sub-applications, when the performance data of the target sub-application is greater than the corresponding performance index, if the target sub-application can form the performance association relationship with at least one other sub-application, at least one root sub-application is selected from the target sub-application and all other sub-applications forming the performance association relationship with the target sub-application.
Step 4022', the operating states of the monitoring probes corresponding to all the selected root cause sub-applications are adjusted from the enabled state to the disabled state.
In this specific implementation, after at least one root-cause sub-application is selected from the target sub-application and all other sub-applications that form a performance association with the target sub-application, the operating states of the monitor probes corresponding to all the selected root-cause sub-applications need to be adjusted from an enabled state to a disabled state.
It can be understood that if the performance data of the target sub-application is greater than the corresponding performance index, the current performance of the target sub-application is poor, that is, the corresponding monitoring probe of the target sub-application has a large influence on the performance of the target sub-application, and due to the existence of the performance association relationship, some other sub-applications forming the performance association relationship with the target sub-application may cause the performance of the target sub-application to be continuously poor, especially the root sub-application. In practical application, the performance of the target sub-application program can be improved in a mode of forbidding the monitoring probes corresponding to the target sub-application program; however, in order to ensure the normal use of the target sub-application, when the performance data of the target sub-application is greater than the corresponding performance index, the specific implementation does not disable the monitoring probe corresponding to the target sub-application first, but disables the monitoring probe corresponding to at least one root sub-application in the relationship line where the target sub-application is located first, that is, disables the monitoring probes corresponding to all selected root sub-applications first, so as to try to reduce the influence of the monitoring probes corresponding to the target sub-application on the performance of the target sub-application, so that the performance of the target sub-application is improved.
4023', after the duration is preset, if the performance data of the target sub-application is greater than the corresponding performance index, adjusting the working states of the target sub-application and all other corresponding monitoring probes of all other sub-applications which form a performance association relationship with the target sub-application except all the selected root sub-applications from an enabled state to a disabled state.
In this particular implementation, after disabling the corresponding monitor probes for all selected root cause sub-applications, if the preset time duration passes, the performance data of the target sub-application is still larger than the corresponding performance index, this means that the single disabling of the monitoring probes corresponding to all the selected root cause sub-applications cannot reduce the performance degradation trend of the target sub-application, and at this time, the disabling of the monitoring probes corresponding to the target sub-application is required, and disabling the corresponding monitoring probes of all other sub-applications which form a performance association relationship with the target sub-application except for all the selected root sub-applications, the disabled monitoring probes are prevented from continuously influencing the performance of the corresponding sub-application programs, and therefore the whole crash of the application program to be monitored is avoided.
Step 4024', if the target sub-application program does not form a performance association relationship with other sub-application programs, adjusting the working state of the monitoring probe corresponding to the target sub-application program from an enabled state to a disabled state.
In this specific implementation, if the target sub-application cannot form a performance association relationship with other sub-applications, it is indicated that the target sub-application is independent in the performance association relationship, and at this time, only the working state of the monitoring probe corresponding to the target sub-application is adjusted from the enabled state to the disabled state.
Step 4025', when the performance data of the target sub-application is less than or equal to the corresponding performance index, if the target sub-application and at least one other sub-application form a performance association relationship, and the performance data of all other sub-applications forming the performance association relationship with the target sub-application is less than or equal to the corresponding performance index, keeping the working states of the target sub-application and the monitoring probes corresponding to all other sub-applications forming the performance association relationship with the target sub-application in an enabled state.
In this specific implementation, in the process of adjusting the operating state of each monitoring probe according to the comparison result and the performance association relationship between all the sub-applications, when the performance data of the target sub-application is less than or equal to the corresponding performance index, if the target sub-application is capable of forming the performance association relationship with at least one other sub-application and the performance data of all the other sub-applications forming the performance association relationship with the target sub-application is less than or equal to the corresponding performance index, the operating state of the monitoring probe corresponding to the target sub-application is maintained as the enabled state, and the operating states of the monitoring probes corresponding to all the other sub-applications forming the performance association relationship with the target sub-application are maintained as the enabled state.
It will be appreciated that if the performance data of the target sub-application is less than or equal to the corresponding performance level, then the target sub-application is currently performing better, i.e., the corresponding monitor probe of the target sub-application has less impact on the performance of the target sub-application, then when the target sub-application is able to form a performance association with at least one other sub-application, and the performance data of all other sub-applications that form a performance association with the target sub-application is less than or equal to the corresponding performance index, it is shown that the performance of all sub-applications in the relationship line where the target sub-application is located is better, and therefore, the specific implementation maintains the working states of the target sub-application and all the monitoring probes corresponding to other sub-applications which form a performance association with the target sub-application in an enabled state. In addition, for the case that the target sub-application can form a performance association relationship with at least one other sub-application, and the performance data of the at least one other sub-application forming the performance association relationship with the target sub-application is greater than the corresponding performance index, refer to the relevant description of the specific implementation on steps 4021 'to 4023'.
Step 4026', if the target sub-application program does not form a performance association relationship with other sub-application programs, keeping the working state of the monitoring probe corresponding to the target sub-application program as an enabled state.
In this specific implementation, if the target sub-application cannot form a performance association relationship with other sub-applications, it is indicated that the target sub-application is independent in the performance association relationship, and at this time, only the working state of the monitoring probe corresponding to the target sub-application is maintained as the enabled state.
It should be understood that the foregoing embodiments are merely preferred implementations of the embodiments of the present application, and are not the only limitations on the specific flow of step 102 in the embodiments of the present application; in this regard, a person skilled in the art can flexibly set the setting according to the actual application scenario on the basis of the embodiment of the present application.
In some embodiments, the monitoring probes may be divided into two types, a first probe and a second probe; the first probe is a monitoring probe with a working state being a forbidden state, and the second probe is a monitoring probe with a working state being an enabled state. Accordingly, the sub-applications can also be divided into two types, namely a first sub-application and a second sub-application; the first sub-application is a sub-application with a first probe deployed, and the second sub-application is a sub-application with a second probe deployed.
On this basis, step 102 may further include: and adjusting the working states of all the first probes from the disabled state to the enabled state according to the performance data and the corresponding performance indexes of the first sub-applications. It can be understood that the working state of the first probe corresponding to the first sub-application is the disabled state, which means that the working state of the second probe corresponding to the original second sub-application is adjusted from the enabled state to the disabled state because the performance of the first sub-application is poor, that is, the first probe has a large influence on the performance of the first sub-application, so that the second probe becomes the first probe, and the second sub-applications also become the first sub-applications successively. However, the first probe deployed in the first sub-application cannot always be in the disabled state, and the working state thereof will be changed from the disabled state back to the original enabled state, so that the working state thereof is changed back to the original second probe, and the corresponding first sub-application thereof is also changed back to the original second sub-application. Therefore, after step 102, in this embodiment, the working states of all the first probes need to be adjusted from the disabled state to the original enabled state according to the performance data and the corresponding performance index of each first sub-application, so that the monitoring probes can acquire the performance data of the corresponding sub-applications again, so as to meet the monitoring requirement of the user on the application to be monitored.
As an embodiment, please further refer to fig. 7, wherein fig. 7 is a schematic flowchart of the process after step 102 in fig. 1 according to the embodiment of the present disclosure; as can be seen from fig. 7, the adjusting the operating states of all the first probes from the disabled state to the enabled state according to the performance data and the corresponding performance index of each first sub-application may specifically include the following steps 701 to 703.
Step 701, comparing the performance data of each first sub-application program with the corresponding performance index to obtain the degree of difference between the performance data of each first sub-application program and the corresponding performance index.
In this embodiment, when the operating states of all the first probes are adjusted from the disabled state to the enabled state according to the performance data of each first sub-application and the corresponding performance index, the acquired performance data of each first sub-application needs to be compared with the corresponding performance index to obtain the degree of the difference between the acquired performance data of each first sub-application and the corresponding performance index.
Step 702, determining the forbidden duration of each first probe according to the degree of the difference between the performance data of each first sub-application and the corresponding performance index.
In this embodiment, after obtaining the degree of the phase difference between the acquired performance data of each first sub-application and the corresponding performance index, it is further required to determine the disabling time length of each first probe according to the degree of the phase difference between the acquired performance data of each first sub-application and the corresponding performance index, that is, determine the time length that each first probe is in the disabling state. It can be understood that the greater the degree of difference between the performance data of the first sub-application and the corresponding performance indicator, the greater the corresponding disable duration, i.e., the degree of difference between the performance data of the first sub-application and the corresponding performance indicator positively correlates with the corresponding disable duration.
Step 703, after the first probes have passed the corresponding disable duration, adjusting the operating status of the first probes from the disable status to the enable status.
In this embodiment, after the disable duration of each first probe is determined, if each first probe passes through the corresponding disable duration, the working state of each first probe may be adjusted from the disable state to the original enable state, so that the monitoring probes can acquire the performance data of the corresponding sub-application again, so as to meet the monitoring requirement of the user on the application to be monitored. It can be understood that after the first probe passes through the corresponding disable duration, the performance data of the first sub-application corresponding to the first probe will approach the corresponding performance index, or even be smaller than the corresponding performance index, which means that the first probe has little influence on the performance of the first sub-application, and at this time, the operating state of the first probe can be adjusted from the disable state to the original enable state.
It should be understood that the foregoing embodiments are only preferred implementations of the embodiments of the present application, and are not the only limitations of the embodiments of the present application on the additional processes after step 102; in this regard, a person skilled in the art can flexibly set the setting according to the actual application scenario on the basis of the embodiment of the present application.
Referring to fig. 8, fig. 8 is a block diagram of an electronic device according to an embodiment of the present disclosure.
As shown in fig. 8, an electronic device 801 includes a storage device 8011 and at least one processor 8012; the storage device 8011 is used for storing at least one program, and when the at least one program is executed by the at least one processor 8012, the at least one processor 8012 is enabled to execute the method for monitoring the micro service based application program provided in the embodiment of the present application.
In some embodiments, the electronic device 801 may further include a bus 8013 for communicative coupling between the storage 8011 and the at least one processor 8012.
Referring to fig. 9, fig. 9 is a block diagram of a computer-readable storage medium according to an embodiment of the present disclosure.
As shown in fig. 9, an embodiment of the present application further provides a computer-readable storage medium 901, where the computer-readable storage medium 901 stores executable instructions 9011, and when the executable instructions 9011 are executed, the microservice-based application monitoring method provided in an embodiment of the present application is executed.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions described in accordance with the present application are generated, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk), among others.
It should be noted that, the embodiments in the present disclosure are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the product class embodiment, since it is similar to the method class embodiment, the description is relatively simple, and for the relevant points, refer to the partial description of the method class embodiment.
It is further noted that, within the context of this application, relational terms such as first and second, and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A microservice-based application monitoring method is characterized by comprising the following steps:
acquiring performance data of each sub-application program in real time through a monitoring probe deployed in each sub-application program; the application program to be monitored comprises a plurality of sub application programs, and each sub application program has a corresponding performance index;
adjusting the working state of each monitoring probe according to the performance data of each sub-application program and the corresponding performance index; wherein the operating state comprises an enabled state and a disabled state;
updating the monitoring page according to the adjustment result; the monitoring page is used for displaying the identifier of each monitoring probe, the current working state and the identifiers of the corresponding sub-applications of all the monitoring probes in the forbidden state in a correlated manner.
2. The microservice-based application monitoring method of claim 1, wherein the adjusting the operating state of each monitoring probe according to the performance data of each sub-application and the corresponding performance index comprises:
comparing the performance data of each sub-application with the corresponding performance index;
adjusting the working state of each monitoring probe according to the comparison result; wherein when the performance data of a target sub-application is greater than the corresponding performance index, the operating state of the monitor probe corresponding to the target sub-application is adjusted from the enabled state to the disabled state; when the performance data of the target sub-application program is smaller than or equal to the corresponding performance index, keeping the working state of the monitoring probe corresponding to the target sub-application program as the starting state.
3. The microservice-based application monitoring method of claim 1, wherein the adjusting the operating state of each monitoring probe according to the performance data of each sub-application and the corresponding performance index comprises:
adjusting the working state of each monitoring probe according to the performance data of each sub-application program, the corresponding performance index and the performance incidence relation among all the sub-application programs; wherein the performance association relationship indicates a relationship between a root sub-application in which the performance data changes and at least one other sub-application in which the performance data association changes.
4. The microservice-based application monitoring method of claim 3, wherein the adjusting the operating state of each monitoring probe according to the performance data and the corresponding performance indicators of each sub-application and the performance association between all sub-applications comprises:
comparing the performance data of each sub-application with the corresponding performance index;
and adjusting the working state of each monitoring probe according to the comparison result and the performance association relation among all the sub-application programs.
5. The microservice-based application monitoring method of claim 4, wherein the adjusting the operating state of each monitoring probe based on the comparison and the performance correlations between all the sub-applications comprises:
when the performance data of a target sub-application is greater than the corresponding performance index, if the target sub-application and at least one other sub-application form the performance association relationship, adjusting the working states of the target sub-application and the monitoring probes corresponding to all other sub-applications forming the performance association relationship with the target sub-application from the enabled state to the disabled state;
if the target sub-application program does not form the performance association relation with other sub-application programs, adjusting the working state of the monitoring probe corresponding to the target sub-application program from the enabled state to the disabled state;
when the performance data of the target sub-application is smaller than or equal to the corresponding performance index, if the target sub-application and at least one other sub-application form the performance association relationship, and the performance data of all other sub-applications forming the performance association relationship with the target sub-application is smaller than or equal to the corresponding performance index, the working states of the target sub-application and the corresponding monitoring probes of all other sub-applications forming the performance association relationship with the target sub-application are all kept in the enabled state;
and if the target sub-application program does not form the performance association relation with other sub-application programs, keeping the working state of the monitoring probe corresponding to the target sub-application program as the starting state.
6. The microservice-based application monitoring method of claim 4, wherein the adjusting the operating state of each monitoring probe based on the comparison and the performance correlations between all the sub-applications comprises:
when the performance data of a target sub-application is greater than the corresponding performance index, if the target sub-application and at least one other sub-application form the performance association relationship, selecting at least one root-cause sub-application from the target sub-application and all other sub-applications forming the performance association relationship with the target sub-application;
adjusting the working state of the monitoring probes corresponding to all the selected root cause sub-applications from the enabled state to the disabled state;
after the preset time length, if the performance data of the target sub-application program is greater than the corresponding performance index, adjusting the working states of the target sub-application program and the monitoring probes corresponding to all other sub-application programs which form the performance association relation with the target sub-application program except all the selected root sub-application programs from the enabled state to the disabled state;
if the target sub-application program does not form the performance association relation with other sub-application programs, adjusting the working state of the monitoring probe corresponding to the target sub-application program from the enabled state to the disabled state;
when the performance data of the target sub-application is smaller than or equal to the corresponding performance index, if the target sub-application and at least one other sub-application form the performance association relationship, and the performance data of all other sub-applications forming the performance association relationship with the target sub-application is smaller than or equal to the corresponding performance index, the working states of the target sub-application and the corresponding monitoring probes of all other sub-applications forming the performance association relationship with the target sub-application are all kept in the enabled state;
and if the target sub-application program does not form the performance association relation with other sub-application programs, keeping the working state of the monitoring probe corresponding to the target sub-application program as the starting state.
7. The microservice-based application monitoring method of claim 1, wherein the monitoring probe comprises a first probe and a second probe; wherein the working state of the first probe is the disabled state, and the working state of the second probe is the enabled state;
the sub-applications comprise a first sub-application and a second sub-application; wherein the first sub-application is deployed with the first probe and the second sub-application is deployed with the second probe;
after the operating condition of each monitoring probe is adjusted, the method further comprises the following steps:
and adjusting the working state of all the first probes from the disabled state to the enabled state according to the performance data of each first sub-application and the corresponding performance index.
8. The microservice-based application monitoring method of claim 7, wherein the adjusting the operating state of all of the first probes from the disabled state to the enabled state based on the performance data of each of the first sub-applications and the corresponding performance metrics comprises:
comparing the performance data of each first sub-application program with the corresponding performance index to obtain the degree of difference between the performance data of each first sub-application program and the corresponding performance index;
determining the forbidden duration of each first probe according to the degree of difference between the performance data of each first sub-application program and the corresponding performance index; wherein the degree of the phase difference is positively correlated with the disable duration;
and after the corresponding forbidding duration of each first probe passes, adjusting the working state of each first probe from the forbidding state to the enabling state.
9. An electronic device comprising storage and at least one processor; the storage device is for storing at least one program and when the at least one program is executed by the at least one processor, causes the at least one processor to perform the method of any one of claims 1-8.
10. A computer-readable storage medium having stored thereon executable instructions that, when executed, perform the method of any one of claims 1-8.
CN202210197355.9A 2022-03-01 2022-03-01 Application program monitoring method and device based on microservice and storage medium Pending CN114896116A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210197355.9A CN114896116A (en) 2022-03-01 2022-03-01 Application program monitoring method and device based on microservice and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210197355.9A CN114896116A (en) 2022-03-01 2022-03-01 Application program monitoring method and device based on microservice and storage medium

Publications (1)

Publication Number Publication Date
CN114896116A true CN114896116A (en) 2022-08-12

Family

ID=82716456

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210197355.9A Pending CN114896116A (en) 2022-03-01 2022-03-01 Application program monitoring method and device based on microservice and storage medium

Country Status (1)

Country Link
CN (1) CN114896116A (en)

Similar Documents

Publication Publication Date Title
CN108833202B (en) Method, device and computer readable storage medium for detecting fault link
US9755935B2 (en) Method, system and computer storage medium for bandwidth optimization of network application
CN109885786B (en) Data caching processing method and device, electronic equipment and readable storage medium
CN109309735B (en) Connection processing method, server, system and storage medium
CN113326181A (en) Fuzzy test method, device and storage medium for stateful network protocol
CN111767142A (en) Current limiting threshold setting method of service node and server side equipment
US11190581B1 (en) Job allocation support system and method
CN113282392A (en) Interface service calling method and device, electronic equipment and storage medium
CN110874314B (en) Pressure measurement method, device, equipment and medium
CN111913852B (en) Health management method and device for storage system
CN110825425B (en) Configuration data management method and device, electronic equipment and storage medium
CN114090623A (en) Method and device for creating cache resources, electronic equipment and storage medium
CN111562884A (en) Data storage method and device and electronic equipment
CN106375102A (en) Service registration method, application method and correlation apparatus
CN116932505A (en) Data query method, data writing method, related device and system
CN112235630B (en) Data backup transmission method, LED mesh loop backup system and electronic equipment
CN114896116A (en) Application program monitoring method and device based on microservice and storage medium
JP2007328417A (en) Request limiting device, server device, request limiting method and request limiting program
CN111953569A (en) State information reporting method, device, equipment and medium
CN114338386B (en) Network configuration method and device, electronic equipment and storage medium
US11836528B2 (en) Throttling thread resources of service computing platform
CN116319268A (en) Network packet loss processing method, system and related components
CN107708176B (en) Network connection method, network connection device and mobile terminal
CN112379978B (en) Back-end service calling method, device, equipment and storage medium
CN106686082B (en) Storage resource adjusting method and management node

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination