CN113094238A - Method and device for monitoring abnormity of business system - Google Patents

Method and device for monitoring abnormity of business system Download PDF

Info

Publication number
CN113094238A
CN113094238A CN202110448355.7A CN202110448355A CN113094238A CN 113094238 A CN113094238 A CN 113094238A CN 202110448355 A CN202110448355 A CN 202110448355A CN 113094238 A CN113094238 A CN 113094238A
Authority
CN
China
Prior art keywords
embedded point
package
point program
preset
service
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
CN202110448355.7A
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.)
WeBank Co Ltd
Original Assignee
WeBank 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 WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN202110448355.7A priority Critical patent/CN113094238A/en
Publication of CN113094238A publication Critical patent/CN113094238A/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/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides a method and a device for monitoring the abnormity of a service system, wherein a release script is deployed in the service system, and the method comprises the following steps: determining the running state of each service process in the service system through the release script; aiming at any business process, when the running state of the business process is determined to accord with the set condition through the release script, acquiring an agent embedded point program package of the business system from a distribution server; and loading the agent embedded point program package to the service process through the release script so as to monitor the abnormity of the service system. The method can realize automatic embedding of the Agent, reduce the working period and difficulty of embedding the Agent, improve the accuracy of embedding the Agent, and quickly locate the abnormal root cause.

Description

Method and device for monitoring abnormity of business system
Technical Field
The application relates to the technical field of automation operation and maintenance of financial technology (Fintech), in particular to a method and a device for monitoring business system abnormity.
Background
The apm (application Performance management), that is, application Performance management, belongs to IT operation and maintenance management. Enterprise systems are monitored in real time to achieve a systematic solution to application performance management and fault management. For example, according to the service system operation information obtained by monitoring, monitoring and optimization of IT application performance and user experience for enterprise key services are realized, so as to improve reliability and quality of enterprise IT applications, ensure that users obtain good services, and reduce Total Cost of Ownership (TCO, Total Cost of Ownership).
Existing APM systems, such as skywalk (an observable platform that is open-sourced for collecting, analyzing, aggregating, visualizing data from different services and local base services), PinPoint (a platform of a distributed transaction tracking system), and the like, acquire service system operation information by providing a buried Agent for service system integration. The method can accurately acquire the operation information of the service system so as to realize performance optimization and the like of the service system; however, when the Agent is embedded, since the service system includes a plurality of subsystems and related parameters such as start parameters of Agent scripts are different between the subsystems, a development team corresponding to each subsystem needs to execute the flow of the embedded Agent according to the related parameters of each subsystem, so that the embedded point operation is complex and long in period, errors are easy to occur, and the accuracy of the embedded point operation is reduced. In addition, these methods also cannot quickly locate the abnormal root cause according to the operation information of the service system.
Disclosure of Invention
The embodiment of the invention provides a method and a device for monitoring business system abnormity, which can realize automatic embedding of Agent, reduce the working period and difficulty of embedding, improve the embedding accuracy and quickly locate abnormal root causes.
In a first aspect, an embodiment of the present invention provides a method for monitoring an exception of a service system, where a release script is deployed in the service system, and the method includes:
determining the running state of each service process in the service system through the release script;
aiming at any business process, when the running state of the business process is determined to accord with the set condition through the release script, acquiring an agent embedded point program package of the business system from a distribution server; and loading the agent embedded point program package to the service process through the release script so as to monitor the abnormity of the service system.
In the method, the distribution server deploys the release script in the service system; the issuing script can acquire the running state of each service process of the service system, further determine the proxy embedded point program package corresponding to each service process, and automatically load the proxy embedded point program package from the distribution server to the service process to complete the embedded point Agent. Compared with the prior art, the method has the advantages that the responsible person of each subsystem buries the points in the subsystem, namely, the developer modifies the relevant parameters containing the startup script parameters in the proxy burial point program package according to the relevant parameters of the subsystem, so that the burial point Agent can normally run; according to the method and the device, the proxy embedded point program package corresponding to the service process is automatically obtained according to the running state of the service process through the release script, and the embedding of the point is further directly carried out on the service process, so that the automatic embedding of the point is realized; the working period and difficulty of the buried point are reduced, and the accuracy of the buried point is improved.
Optionally, obtaining the agent burial point program package of the service system from the distribution server includes: determining a library package of the service system subsystem corresponding to the service process through the release script; if the library package comprises a preset sharing class, acquiring a first agent buried program package from the distribution server; calling logic which does not contain the preset common class but contains the preset common class is arranged in the first agent embedded point program package; if the library package does not comprise a preset shared class, acquiring a second agent buried program package from the distribution server; and the second agent embedded point program comprises the preset sharing class and calling logic of the preset sharing class.
In the above method, the service system may include at least one subsystem, each subsystem may include a service process for loading and running the proxy embedded point package, or there may be a service process that does not include a service process for loading and running the proxy embedded point package in the subsystem, and the service process may be set according to needs, and is not limited specifically here. Therefore, whether the subsystem library package corresponding to the service process contains the preset sharing class or not can be obtained, and if yes, the first proxy embedded point program package is obtained from the distribution server; and if not, acquiring the second agency buried point program package from the distribution server. Thus, the release script can determine to obtain a first proxy embedded point program package, a simplified proxy embedded point program package or a second proxy embedded point program package, a complete proxy embedded point program package according to the class contained in the subsystem library package corresponding to the service process; the simplified proxy embedded point program package does not contain the preset sharing class but contains the calling logic of the preset sharing class, and the complete proxy embedded point program package contains the calling logic of the preset sharing class and the calling logic of the preset sharing class. Compared with the prior art that all service processes in the service system load complete proxy embedded point program packages; when the subsystem library package of the service process contains the preset sharing class, the first proxy embedded point program package which does not contain the preset sharing class can be loaded, and the situation that the repeated loading of the preset sharing class occupies a metadata space and affects the performance of a service system is prevented. In addition, in the prior art, if the preset common class in the complete proxy embedded point program package is different from the version with the same type as the preset common class in the subsystem library package, the preset common class in the proxy embedded point program package needs to be converted to prevent the versions from being incompatible; when the subsystem library package of the service process contains the preset sharing class, the first proxy embedded point program package which does not contain the preset sharing class can be loaded, so that the subsystem and the service process directly share the preset sharing class, the problem of version incompatibility is avoided, the preset sharing class does not need to be converted, and the embedded point time is saved.
Optionally, determining, by the release script, that the running state of the business process meets a set condition includes: and determining that the development tool version used by the business process is greater than or equal to a preset development tool version, the residual metadata space of the business process is greater than a preset metadata space, and the residual heap space of the business system is greater than a preset heap space through the release script.
In the method, the release script determines that the development tool version used by the business process is greater than or equal to the preset development tool version, so that the business process can be ensured to have enough capacity to run the agent embedded point program package. And the issuing script determines that the residual metadata space of the business process is larger than the preset metadata space and the residual heap space is larger than the preset heap space, so that the business process can be ensured to have enough space to load and run the agent embedded point program package. The reliability and the accuracy of the automatic loading of the agent embedded point program package are improved, and further, the reliability and the accuracy of the abnormal monitoring of the service system are improved.
Optionally, loading the proxy embedded point program package to the service process through the release script includes: and acquiring the service process through a first preset statement in the proxy embedded point program package, and loading the proxy embedded point program package into the service process through a second preset statement in the proxy embedded point program package.
In the method, after the issuing script obtains the agent embedded point program package from the distribution server, the first preset statement in the agent embedded point program package can automatically obtain the business process, and the agent embedded point program package is loaded into the business process through the second preset statement. Therefore, the agent embedded point program package is loaded in the process dimension, compared with the prior art that the parameters of the agent embedded point program package are required to be modified according to the subsystem parameters when the agent embedded point program package is loaded in the subsystem dimension, and the agent embedded point program package is loaded, the agent embedded point program package can be directly loaded into the service process in the process dimension without manually analyzing and modifying the parameters of the agent embedded point program package, the automatic agent embedded point program package loading is realized, and the embedded point period and the embedded point cost are reduced.
Optionally, after the issuing script loads the proxy embedded point program package to the service process, the method further includes: starting an agent embedded point program corresponding to the agent embedded point program package; and downloading the preset common class to a preset root loader through the proxy embedded point program.
In the method, the preset shared class is downloaded to a root loader, such as a boottrap root loader, so that the proxy embedded point package and the corresponding subsystem share the preset shared class.
Optionally, after the issuing script loads the proxy embedded point program package to the service process, the method further includes: adding the tracking information of the tracked process to the context of the corresponding thread through the proxy embedded point program corresponding to the proxy embedded point program package; the tracking information comprises a tracking identifier; if the tracked process is abnormal, determining an abnormal object corresponding to the abnormal method by the agent embedded point program interception abnormal method, wherein the abnormal object comprises abnormal information and the context of the thread.
In the method, the tracking information of the tracked process is added to the context of the thread through the agent embedded program; and intercepting an abnormal method for generating abnormality in the process, and constructing an abnormal object containing abnormal information and the context of the thread. That is, the proxy buried point program may build an exception object for the exception process. Therefore, if the service system is abnormal, the abnormal related information of the abnormal method can be quickly acquired according to the abnormal object, and the speed and the accuracy of positioning the abnormal root cause are improved. And because the abnormal object comprises the thread context, the tracking information of the thread context comprises the tracking identifier, the tracking identifier in the abnormal object is associated to the tracking log (generated by the agency embedded program) comprising the tracking identifier, the related information in the tracking log is further acquired, and sufficient information is provided for developers to perform abnormality analysis.
Optionally, after the issuing script loads the proxy embedded point program package to the service process, the method further includes: generating a tracking log of the service system through the agent embedded point program; the tracing log comprises a tracing identifier, a subsystem identifier, an IP address and tracing time; generating a log file of the service system through a log component; the log file includes a subsystem identification, an IP address, and a log time.
In the method, the tracing log comprises the tracing identifier, so that the abnormal object and the tracing log have an association relation; because the tracking log and the log file contain the subsystem identification, the IP address and the time information, the tracking log and the log file have an association relation. Finally forming an abnormal object association tracking log, wherein the tracking log is associated with the association relationship of log files; the method is convenient for obtaining the abnormal related data subsequently according to the incidence relation, and improves the convenience of abnormal analysis.
Optionally, the method further includes: determining the tracking identification according to the abnormal object; determining the tracking log according to the tracking identifier;
determining the subsystem identification, the IP address and the tracking time of the abnormal subsystem according to the tracking log;
and determining abnormal logs and context logs which are abnormal from the log file according to the subsystem identification, the IP address and the tracking time.
In the method, the abnormal object and the trace log are enabled to contain the same trace identification, and the log file and the trace log are enabled to contain the same subsystem identification, IP address and trace time. Therefore, the abnormal object, the tracking log and the log file have an association relationship, when a developer determines that the abnormal object exists and needs to further acquire related information to analyze and locate the abnormal root cause, the abnormal object, the tracking log and the log file can be associated and acquired according to the tracking identifier of the abnormal object, and the log file can be further acquired according to the subsystem identifier, the IP address and the tracking time in the tracking log. The workload and the period of operation and maintenance of developers are reduced, and the accuracy of abnormal root cause positioning is improved.
In a second aspect, an embodiment of the present invention provides a device for monitoring an exception of a service system, where a distribution script is deployed in the service system, and the device includes:
the determining module is used for determining the running state of each business process in the business system through the issuing script;
the processing module is used for acquiring an agent embedded point program package of the service system from a distribution server when the running state of the service process is determined to meet the set condition through the release script aiming at any service process; and loading the agent embedded point program package to the service process through the release script so as to monitor the abnormity of the service system.
In a third aspect, an embodiment of the present application further provides a computing device, including: a memory for storing a program; a processor for calling the program stored in said memory and executing the method as described in the various possible designs of the first aspect according to the obtained program.
In a fourth aspect, embodiments of the present application further provide a computer-readable non-transitory storage medium including a computer-readable program which, when read and executed by a computer, causes the computer to perform the method as described in the various possible designs of the first aspect.
These and other implementations of the present application will be more readily understood from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic diagram of an architecture for monitoring an anomaly of a service system according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a service system according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a method for monitoring an anomaly of a service system according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a method for monitoring an anomaly of a service system according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an anomaly monitoring device for a service system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a system architecture for monitoring an exception of a service system according to an embodiment of the present invention, where a distribution server 102 has a release script, a first proxy embedded point package, and a second proxy embedded point package; or may also be a distribution server cluster, such as the distribution server cluster 101 in fig. 1, where the distribution server in the distribution server cluster 101 has a distribution script, a first proxy embedded node program package, and a second proxy embedded node program package deployed therein; the system architecture may be configured as a distribution server cluster or a distribution server according to needs, and is not particularly limited. The service server cluster 103 may include a plurality of service server clusters 104, and each service server cluster 104 may include a plurality of service servers 105, which may be specifically set according to needs, and are not limited herein. For example, the service server cluster 103 includes a plurality of service systems, and the plurality of service systems respectively correspond to the plurality of service server clusters; or, the service server cluster 103 includes service server clusters for different operation stages of the same service system, such as a service server cluster of a development stage service system, a service server cluster of a test stage service system, a service server cluster of a production stage service system, and the like, where the service server clusters may be set according to functions, operation states, and numbers of the service systems, and are not particularly limited. Similarly, the collection server may also be a collection server cluster 106 or a collection server 107; the log server may also be a cluster of log servers 108, or a log server 109; and can be specifically set according to requirements.
Fig. 2 is a schematic structural diagram of a service system according to an embodiment of the present invention, where the service system may include multiple subsystems, each subsystem may correspond to a service process for loading a proxy embedded node package, and there may also be a subsystem without a service process for loading a proxy embedded node package, where the subsystem may be set according to needs, and is not particularly limited.
Based on the architectures in fig. 1 and fig. 2, the distribution server 102, the business server cluster 104, the collection server 107, and the log server 109 are used as main bodies in the system architecture. And the service system includes two subsystems, subsystem 1 and subsystem 2, and the request initiated between subsystem 1 and subsystem 2 is abnormal as an example, which is described in the present application. After receiving the distribution instruction, the distribution server 102 distributes the issue script to the service system of the service server cluster 104. The release script checks information such as development tool versions, residual metadata spaces, residual heap spaces and the like of the service processes of the subsystem 1 and the subsystem 2 in the service system, namely, whether the running state of the service process meets set conditions is determined, and if yes, whether library packages of the subsystem 1 and the subsystem 2 contain preset sharing classes is respectively obtained; determining that the library package of the subsystem 1 contains a preset sharing class and the library package of the subsystem 2 does not contain the preset sharing class; the issuing script respectively acquires a first agency buried point program package and a second agency buried point program package for the subsystem 1 and the subsystem 2 from the distribution server; and correspondingly loading the first agent embedded point program package and the second agent embedded point program package into the subsystem 1 and the subsystem 2 respectively. When the subsystem 1 sends a request to the subsystem 2, the first proxy embedded point program of the subsystem 1 generates a trace for the request and trace information (including a trace identifier) corresponding to the trace, and the subsystem 1 sends the trace identifier to the subsystem 2 through the request. The second agent embedded program of the subsystem 2 generates a trace with the same trace identifier as the trace of the subsystem 1 aiming at the request, tracks the progress of processing the request and generates corresponding trace information; the tracking information is added to the context of the thread, if the process is abnormal, the second agent embedded point program intercepts an abnormal method, an abnormal object is constructed according to the abnormal information of the abnormal method and the context information of the thread, and the abnormal object is reported to the acquisition server 107. The first agent embedded point program and the second agent embedded point program respectively send the generated tracking logs to the acquisition server 107, the subsystem 1 and the subsystem 2 respectively send the log files generated by the log components to the log server 109, and the log server 109 reports the log files to the acquisition server 107. Therefore, the acquisition server 107 comprises an abnormal object, a tracking log and a log file, the abnormal object is associated with the tracking log through the tracking identifier, and the tracking log is associated with the log file through the subsystem identifier, the IP address and the log time, so that developers can quickly acquire abnormal related information according to the abnormal object, and the abnormal root cause positioning is accelerated.
Based on the above system architecture, an embodiment of the present application provides a flow of a method for monitoring an exception of a service system, where a release script is deployed in the service system, as shown in fig. 3, the method includes:
step 301, determining the running state of each service process in the service system through the release script;
here, the business process may be a process for loading and running a proxy buried point program.
Step 302, aiming at any business process, when the running state of the business process is determined to accord with the set condition through the release script, acquiring an agent embedded point program package of the business process from a distribution server; and loading the agent embedded point program package to the service process through the release script so as to monitor the abnormity of the service system.
In the method, the distribution server deploys the release script in the service system; the issuing script can acquire the running state of each service process of the service system, further determine the proxy embedded point program package corresponding to each service process, and automatically load the proxy embedded point program package from the distribution server to the service process to complete the embedded point Agent. Compared with the prior art, the method has the advantages that the responsible person of each subsystem buries the points in the subsystem, namely, the developer modifies the relevant parameters containing the startup script parameters in the proxy burial point program package according to the relevant parameters of the subsystem, so that the burial point Agent can normally run; according to the method and the device, the proxy embedded point program package corresponding to the service process is automatically obtained according to the running state of the service process through the release script, and the embedding of the point is further directly carried out on the service process, so that the automatic embedding of the point is realized; the working period and difficulty of the buried point are reduced, and the accuracy of the buried point is improved.
The embodiment of the application provides a method for acquiring a proxy embedded point program package, which acquires the proxy embedded point program package of a service process from a distribution server, and comprises the following steps: determining a library package of the service system subsystem corresponding to the service process through the release script; if the library package comprises a preset sharing class, acquiring a first agent buried program package from the distribution server; calling logic which does not contain the preset common class but contains the preset common class is arranged in the first agent embedded point program package; if the library package does not comprise a preset shared class, acquiring a second agent buried program package from the distribution server; and the second agent embedded point program comprises the preset sharing class and calling logic of the preset sharing class. That is to say, the release script may record whether each type of proxy embedded point package in the distribution server includes the preset shared class and the type of the preset shared class, so as to obtain the preset shared class information in the subsystem library package corresponding to the service process, and further customize and load the corresponding first proxy embedded point program or second proxy embedded point program for each service process. The method comprises the steps that comprehensive evaluation can be carried out according to the working complexity of a developer developing a proxy embedded point program package, the logic complexity of relevant programs such as a release script and the like, classes (such as network communication package Netty, a serialized deserialization package Jackson and the like) corresponding to service system common packages, the sizes of the classes and the like, and a preset common class is obtained; here, when selecting the preset shared class, the developer may prefer to select a class that occupies a larger or particularly larger memory as the preset shared class. Therefore, the service system is not enabled to repeatedly load larger classes, memory resources are effectively saved, the performance of the service system can be improved, and the working complexity of developers and the logic complexity of relevant programs such as the release script and the like can be reduced.
For example, for example: the distribution server comprises a first agent embedded program package-simplified jar package, and comprises: a-type + A-type calling logic, B-type + B-type calling logic and C-type calling logic. The distribution server comprises a second agent embedded point program package-a full version jar package, and comprises: a-class + A-class calling logic, B-class + B-class calling logic, and C-class + C-class calling logic. That is, class C is a predetermined common class.
The release script is internally provided with preset shared class information of the full-version jar package and the simplified-version jar package, for example, the full-version jar package is provided with a class C, and the simplified-version jar package is not provided with a class C. The release script checks whether a plurality of jar packets in each subsystem of the service system have a C type; the service system can be exposed to the release script for use through an Http interface mode of an MSS-AGENTMG (proxy database), so that the release script checks whether the class comprises a preset sharing class under a Classpath path; if the C-type subsystem exists, loading a simplified jar packet by a service system of the subsystem; and if the subsystem of the C type does not exist, downloading the full version jar package. The release script can obtain the proxy embedded point program package to the local of the service system in a wget (tool for downloading files) mode, and starts the proxy embedded point program in a PreMain mode. In one possible approach, a service process of a subsystem may load a proxy burial point package. In a possible method, when the reduced jar packet runs, C is searched in each jar packet of the corresponding subsystem, and then the C class is called, so that the C class calling path does not need to be recorded.
The embodiment of the present application provides a setting condition, and determining that the running state of the business process meets the setting condition through the release script, including: and determining that the development tool version used by the business process is greater than or equal to a preset development tool version, the residual metadata space of the business process is greater than a preset metadata space, and the residual heap space of the business system is greater than a preset heap space through the release script. That is, in order to ensure that the business process can accurately support the operation of the proxy embedded point program, the qualification for loading the proxy embedded point program package is only possessed when the development tool version used by the business process is limited to be greater than or equal to the preset development tool version. And the remaining metadata space and heap data space of the business process are also ensured to be enough for the normal operation space of the agent embedded point program; and if the development tool version used by the business process is limited to be more than or equal to the preset development tool version, the residual metadata space is more than the preset metadata space, and the heap data space is more than the preset heap space, the agent embedded point program package can be loaded. Therefore, the reliability and the accuracy of loading the agent embedded point program package are ensured, and the operability of the agent embedded point program is ensured.
The embodiment of the application provides a proxy embedded point program package loading method, which loads the proxy embedded point program package to the service process through the release script and comprises the following steps: and acquiring the service process through a first preset statement in the proxy embedded point program package, and loading the proxy embedded point program package into the service process through a second preset statement in the proxy embedded point program package. In one example, after the publishing script obtains the proxy embedded point package from the distribution server, the proxy embedded point program obtains the business process through virtualmachine vm, virtualmachine. That is, compared with the prior art that developers or responsible persons of each subsystem need to modify relevant parameters of the proxy embedded point program package according to relevant parameters of the subsystem to manually load the proxy embedded point program package in the subsystem dimension, the application enables the proxy embedded point program package to include relevant program statements capable of loading the proxy embedded point program package in the process dimension, realizes automatic deployment of the proxy embedded point program package, reduces the embedded point period, and reduces the embedded point workload and cost.
The embodiment of the application provides a method for operating a proxy embedded point program, which, after loading a proxy embedded point program package to a service process through an issuing script, further includes: starting an agent embedded point program corresponding to the agent embedded point program package; and downloading the preset common class to a preset root loader through the proxy embedded point program. That is, in the prior art, the same class of the proxy embedded point program package and the same class of the library package of the service system subsystem need to be downloaded, so that two same classes exist in the service system subsystem at the same time, and further resource waste is caused; especially, when the occupied memory is large, the operation performance of the service system subsystem is affected. Therefore, the same class in the proxy embedded point program package and the library package of the service system subsystem can be set as the preset shared class, and if the release script determines that the service system already contains the preset shared class, the proxy embedded point program package not containing the preset shared class can be downloaded. In order to enable the proxy embedded point program package and the service system subsystem to simultaneously share the preset shared class, the proxy embedded point program in the proxy embedded point program package comprises a scanning program, after the proxy embedded point program package is loaded in the service system subsystem, the scanning program is operated to scan the library package of the service system subsystem, the preset shared class is obtained by scanning, and the preset shared class is loaded to the root loader, so that the proxy embedded point program and the service system subsystem can simultaneously call the preset shared class from the root loader. The method prevents the agent embedded point program from calling the preset shared class due to the fact that the preset shared class is not loaded to the root loader, and further prevents the agent embedded point program from being incapable of running normally. Namely, in order to improve the performance of the service system, when the proxy embedded point program package is loaded to the local by the release script, the internal program of the proxy embedded point program loads the preset sharing class to the boottrap root loader for global sharing of the proxy embedded point program and the service system.
The embodiment of the application provides a method for constructing an abnormal object, wherein after the proxy embedded point program package is loaded to the service process through the release script, the method further comprises the following steps: adding the tracking information of the tracked process to the context of the corresponding thread through the proxy embedded point program corresponding to the proxy embedded point program package; the tracking information comprises a tracking identifier; if the tracked process is abnormal, determining an abnormal object corresponding to the abnormal method by the agent embedded point program interception abnormal method, wherein the abnormal object comprises abnormal information and the context of the thread. That is, when a process is generated in the subsystem, the agent node burying program correspondingly generates a trace for the process and trace information corresponding to the trace; adding the tracking information into the context of the thread, for example, when a request is generated in the subsystem, a process is generated corresponding to the request, the proxy embedded point program tracks the process, and determines the generation time of the tracked process, the subsystem identifier of the tracked process, the tracked process ID and the corresponding thread ID, and the related information of the tracked process, wherein the tracking information can be set as required, and the specific tracking content is not limited. When the process is abnormal, the agent embedded point program intercepts an abnormal method, determines abnormal information such as a method identifier for generating the abnormality, an abnormal type of the abnormal method and the like, and constructs an abnormal object according to the abnormal information and the context of the thread. Therefore, developers can quickly acquire the abnormal information of the abnormal method and the context of the thread, and the root cause positioning of the abnormality is accelerated. In addition, the agent embedded program can also correspondingly generate a tracking log containing tracking information and remote calling information between systems.
The embodiment of the application provides an exception analysis data acquisition method, which includes the following steps that after the proxy embedded point program package is loaded to the service process through the release script: generating a tracking log of the service system through the agent embedded point program; the tracing log comprises a tracing identifier, a subsystem identifier, an IP address and tracing time; generating a log file of the service system through a log component; the log file includes a subsystem identification, an IP address, and a log time. Therefore, the tracing log containing the tracing identifier, the subsystem identifier, the IP address and the tracing time and the log file containing the subsystem identifier, the IP address and the log time have an association relation and are reported to the acquisition server, so that the acquisition server simultaneously contains the abnormal object and the tracing log and the log file corresponding to the abnormal object, and the tracing log and the log file can be searched and used by developers.
The embodiment of the application provides an anomaly analysis data acquisition method, which further comprises the following steps: determining the tracking identification according to the abnormal object; determining the tracking log according to the tracking identifier; determining the subsystem identification, the IP address and the tracking time of the abnormal subsystem according to the tracking log; and determining abnormal logs and context logs which are abnormal from the log file according to the subsystem identification, the IP address and the tracking time. That is to say, the abnormal object and the trace log can be associated through the trace identifier, and the trace log and the log file can be associated through the subsystem identifier, the IP address and the time, which is helpful for developers to quickly obtain the related information of the abnormality and quickly locate the abnormal root cause.
Based on the above system architecture and method flow, an embodiment of the present application provides a method flow for monitoring an exception of a service system, as shown in fig. 4, including:
step 401, the distribution server calls a configuration management database interface in the service system to obtain a total IP address list in the service system. The IP address may include a container IP address and a virtual machine IP address.
And step 402, the distribution server sends the release scripts to the corresponding service servers respectively according to the IP address list.
And step 403, issuing a script to check the service process of the subsystem.
Step 404, issuing a script to determine whether the service process meets the set conditions, and if so, continuing to execute step 405; if not, the flow is stopped.
Step 405, the release script determines whether the library package of the subsystem contains a preset common class.
And step 406, issuing a script to determine that the library package of the subsystem contains a preset sharing class, and acquiring a first proxy embedded point program package for the service process of the subsystem. And after step 408 is performed, step 409 is performed.
Step 407, the issuing script determines that the library package of the subsystem does not contain the preset sharing class, and then a second agent embedded point program package is obtained for the service process of the subsystem. And step 409 need not be performed after step 408 is performed.
And 408, the agent embedded point program runs a first preset statement in the agent embedded point program package to acquire the service process, and runs a second preset statement in the agent embedded point program package to load the agent embedded point program package into the service process.
And step 409, downloading the preset shared class to a Bootstrap root loader by the agency buried point program.
Step 410, when the agent embedded point program detects that a process is generated in the subsystem, tracking and tracing information is correspondingly generated aiming at the process.
In step 411, the agent buries the trace information into the context of the thread.
And step 412, if the agent embedded point program determines that the process is abnormal, intercepting an abnormal method, and constructing an abnormal object according to the abnormal information and the context of the thread. The abnormal object can be constructed into a set standard, so that the acquisition server can correctly analyze the abnormal object. For example, for the opentelemetrology platform, the abnormal object may be constructed as an opentelemetrology standard specification, and reported to the acquisition server, so that the acquisition server may correctly analyze the abnormal object according to the opentelemetrology standard. The standard specification corresponding to the abnormal object is not limited specifically, and may be set according to requirements.
And 413, reporting the abnormal object to an acquisition server by the agent embedded point program.
And step 414, the agent embedded point program reports the tracking log to the acquisition server.
Step 415, the subsystem prints the log to the local, and the log collection agent collects the log printed by the subsystem, generates a file and reports the log file to the collection server for storage.
Step 416, the collection server generates an alarm according to the abnormal object. The alarm can inform the developer through short message or mail.
In step 417, the developer may obtain the abnormal object through the collection server, analyze the abnormal information in the abnormal object and the context of the thread, and if the abnormal information and the context of the thread cannot completely and accurately locate the abnormal root cause, may obtain a trace log associated with the abnormal object, and further may obtain a log file.
It should be noted that, the above flow steps are not exclusive, for example, steps 401 to 411 are flow steps for automatically loading the agent embedded point program; steps 412 and 413 are process steps for reporting the abnormal object by the proxy node burying program, the two process steps do not need to be executed together, and step 414 can be executed separately.
Based on the same concept, fig. 5 exemplarily shows a schematic structural diagram of a service system abnormality monitoring apparatus provided by an embodiment of the present invention, as shown in fig. 5, an issuing script is deployed in the service system, and the issuing script includes:
a determining module 501, configured to determine, through the release script, an operation state of each service process in the service system;
a processing module 502, configured to, for any service process, obtain an agent embedded point package of the service system from a distribution server when it is determined that the running state of the service process meets a set condition through the release script; and loading the agent embedded point program package to the service process through the release script so as to monitor the abnormity of the service system.
Optionally, the processing module 502 is specifically configured to: determining a library package of the service system subsystem corresponding to the service process through the release script; if the library package comprises a preset sharing class, acquiring a first agent buried program package from the distribution server; calling logic which does not contain the preset common class but contains the preset common class is arranged in the first agent embedded point program package; if the library package does not comprise a preset shared class, acquiring a second agent buried program package from the distribution server; and the second agent embedded point program comprises the preset sharing class and calling logic of the preset sharing class.
Optionally, the processing module 502 is specifically configured to: and determining that the development tool version used by the business process is greater than or equal to a preset development tool version, the residual metadata space of the business process is greater than a preset metadata space, and the residual heap space of the business system is greater than a preset heap space through the release script.
Optionally, the processing module 502 is specifically configured to: and acquiring the service process through a first preset statement in the proxy embedded point program package, and loading the proxy embedded point program package into the service process through a second preset statement in the proxy embedded point program package.
Optionally, the processing module 502 is further configured to: starting an agent embedded point program corresponding to the agent embedded point program package;
and downloading the preset common class to a preset root loader through the proxy embedded point program.
Optionally, the processing module 502 is further configured to: adding the tracking information of the tracked process to the context of the corresponding thread through the proxy embedded point program corresponding to the proxy embedded point program package; the tracking information comprises a tracking identifier;
if the tracked process is abnormal, determining an abnormal object corresponding to the abnormal method by the agent embedded point program interception abnormal method, wherein the abnormal object comprises abnormal information and the context of the thread.
Optionally, the processing module 502 is further configured to: generating a tracking log of the service system through the agent embedded point program; the tracing log comprises a tracing identifier, a subsystem identifier, an IP address and tracing time; generating a log file of the service system through a log component; the log file includes a subsystem identification, an IP address, and a log time.
Optionally, the processing module 502 is further configured to: determining the tracking identification according to the abnormal object; determining the tracking log according to the tracking identifier; determining the subsystem identification, the IP address and the tracking time of the abnormal subsystem according to the tracking log; and determining abnormal logs and context logs which are abnormal from the log file according to the subsystem identification, the IP address and the tracking time.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A method for monitoring business system abnormity is characterized in that a release script is deployed in a business system, and the method comprises the following steps:
determining the running state of each service process in the service system through the release script;
aiming at any business process, when the running state of the business process is determined to accord with the set condition through the release script, acquiring an agent embedded point program package of the business process from a distribution server;
and loading the agent embedded point program package to the service process through the release script so as to monitor the abnormity of the service system.
2. The method of claim 1, wherein obtaining the proxy buried point package for the business process from a distribution server comprises:
determining a library package of the service system subsystem corresponding to the service process through the release script;
if the library package comprises a preset sharing class, acquiring a first agent buried program package from the distribution server; calling logic which does not contain the preset common class but contains the preset common class is arranged in the first agent embedded point program package;
if the library package does not comprise a preset shared class, acquiring a second agent buried program package from the distribution server; and the second agent embedded point program comprises the preset sharing class and calling logic of the preset sharing class.
3. The method of claim 1, wherein determining that the running state of the business process meets a set condition through the release script comprises:
and determining that the development tool version used by the business process is greater than or equal to a preset development tool version, the residual metadata space of the business process is greater than a preset metadata space, and the residual heap space of the business system is greater than a preset heap space through the release script.
4. The method of claim 1, wherein loading the proxying buried point package into the business process via the publishing script comprises:
and acquiring the service process through a first preset statement in the proxy embedded point program package, and loading the proxy embedded point program package into the service process through a second preset statement in the proxy embedded point program package.
5. The method of claim 1, wherein loading the proxying buried point package into the business process via the publishing script further comprises:
starting an agent embedded point program corresponding to the agent embedded point program package;
and downloading the preset common class to a preset root loader through the proxy embedded point program.
6. The method of any of claims 1-5, wherein loading the proxying buried point package into the business process via the publishing script further comprises:
adding the tracking information of the tracked process to the context of the corresponding thread through the proxy embedded point program corresponding to the proxy embedded point program package; the tracking information comprises a tracking identifier;
if the tracked process is abnormal, determining an abnormal object corresponding to the abnormal method by the agent embedded point program interception abnormal method, wherein the abnormal object comprises abnormal information and the context of the thread.
7. The method as recited in claim 6, wherein loading the proxying buried point package into the business process via the publishing script further comprises:
generating a tracking log of the service system through the agent embedded point program; the tracing log comprises a tracing identifier, a subsystem identifier, an IP address and tracing time;
generating a log file of the service system through a log component; the log file includes a subsystem identification, an IP address, and a log time.
8. The method as recited in claim 7, further comprising:
determining the tracking identification according to the abnormal object; determining the tracking log according to the tracking identifier;
determining the subsystem identification, the IP address and the tracking time of the abnormal subsystem according to the tracking log;
and determining abnormal logs and context logs which are abnormal from the log file according to the subsystem identification, the IP address and the tracking time.
9. An anomaly monitoring device for a business system, wherein a distribution script is deployed in the business system, the device comprising:
the determining module is used for determining the running state of each business process in the business system through the issuing script;
the processing module is used for acquiring an agent embedded point program package of the service system from a distribution server when the running state of the service process is determined to meet the set condition through the release script aiming at any service process; and loading the agent embedded point program package to the service process through the release script so as to monitor the abnormity of the service system.
10. A computer device, comprising:
a memory for storing a computer program;
a processor for calling a computer program stored in said memory to execute the method of any of claims 1 to 8 in accordance with the obtained program.
CN202110448355.7A 2021-04-25 2021-04-25 Method and device for monitoring abnormity of business system Pending CN113094238A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110448355.7A CN113094238A (en) 2021-04-25 2021-04-25 Method and device for monitoring abnormity of business system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110448355.7A CN113094238A (en) 2021-04-25 2021-04-25 Method and device for monitoring abnormity of business system

Publications (1)

Publication Number Publication Date
CN113094238A true CN113094238A (en) 2021-07-09

Family

ID=76680427

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110448355.7A Pending CN113094238A (en) 2021-04-25 2021-04-25 Method and device for monitoring abnormity of business system

Country Status (1)

Country Link
CN (1) CN113094238A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114185734A (en) * 2021-11-26 2022-03-15 北京百度网讯科技有限公司 Cluster monitoring method and device and electronic equipment
CN114443340A (en) * 2022-01-29 2022-05-06 亿咖通(湖北)技术有限公司 Abnormal process processing method and device and server
CN115499232A (en) * 2022-09-26 2022-12-20 重庆长安汽车股份有限公司 Real-name authentication method, device, server and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114185734A (en) * 2021-11-26 2022-03-15 北京百度网讯科技有限公司 Cluster monitoring method and device and electronic equipment
CN114185734B (en) * 2021-11-26 2023-11-14 北京百度网讯科技有限公司 Method and device for monitoring clusters and electronic equipment
CN114443340A (en) * 2022-01-29 2022-05-06 亿咖通(湖北)技术有限公司 Abnormal process processing method and device and server
CN115499232A (en) * 2022-09-26 2022-12-20 重庆长安汽车股份有限公司 Real-name authentication method, device, server and storage medium

Similar Documents

Publication Publication Date Title
US10503623B2 (en) Monitoring containerized applications
US9672137B1 (en) Shadow test replay service
CN106844136B (en) Method and system for collecting program crash information
US9417865B2 (en) Determining when to update a package manager software
CN107957941B (en) Method and device for processing memory leakage of mobile terminal
US9223681B2 (en) Automated debug trace specification
US9218231B2 (en) Diagnosing a problem of a software product running in a cloud environment
US7954011B2 (en) Enabling tracing operations in clusters of servers
CN110941528B (en) Log buried point setting method, device and system based on fault
US20170123777A1 (en) Deploying applications on application platforms
CN109408232B (en) Transaction flow-based componentized bus calling execution system
CN113094238A (en) Method and device for monitoring abnormity of business system
CN114978940B (en) Link monitoring and alarming method, device, computer equipment and storage medium
CN107704369B (en) Operation log recording method, electronic device, storage medium and system
US11151020B1 (en) Method and system for managing deployment of software application components in a continuous development pipeline
CN116893945A (en) Operation and maintenance cloud platform service early warning method, system and device
US20180011778A1 (en) Static code testing of active code
CN114691445A (en) Cluster fault processing method and device, electronic equipment and readable storage medium
CN111752838A (en) Question checking method and device, server and storage medium
KR20170122874A (en) Apparatus for managing log of application based on data distribution service
CN115617668A (en) Compatibility testing method, device and equipment
CN114791884A (en) Test environment construction method and device, storage medium and electronic equipment
CN111367796B (en) Application program debugging method and device
CN113485894A (en) Data acquisition method, device and equipment and readable storage medium
CN112667491A (en) Function test method and device of virtual machine

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