CN111400127A - Service log monitoring method and device, storage medium and computer equipment - Google Patents

Service log monitoring method and device, storage medium and computer equipment Download PDF

Info

Publication number
CN111400127A
CN111400127A CN202010126798.XA CN202010126798A CN111400127A CN 111400127 A CN111400127 A CN 111400127A CN 202010126798 A CN202010126798 A CN 202010126798A CN 111400127 A CN111400127 A CN 111400127A
Authority
CN
China
Prior art keywords
path identifier
log
virtual machine
monitoring
java virtual
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.)
Granted
Application number
CN202010126798.XA
Other languages
Chinese (zh)
Other versions
CN111400127B (en
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.)
Shenzhen Ping An Medical Health Technology Service Co Ltd
Original Assignee
Ping An Medical and Healthcare Management 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 Ping An Medical and Healthcare Management Co Ltd filed Critical Ping An Medical and Healthcare Management Co Ltd
Priority to CN202010126798.XA priority Critical patent/CN111400127B/en
Publication of CN111400127A publication Critical patent/CN111400127A/en
Application granted granted Critical
Publication of CN111400127B publication Critical patent/CN111400127B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/301Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is a virtual computing platform, e.g. logically partitioned systems
    • 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

Abstract

The invention provides a method and a device for monitoring a service log, a storage medium and computer equipment, wherein the method comprises the following steps: reading running information of a Java virtual machine in a service system during running; generating a path identifier according to the running information, and recording the path identifier into a class file executed by the Java virtual machine; and after the class file is printed into a log file, monitoring the log file and the running information according to the path identifier. The invention solves the technical problem of inaccurate analysis of the service log in the related technology.

Description

Service log monitoring method and device, storage medium and computer equipment
Technical Field
The invention relates to the field of computers, in particular to a method and a device for monitoring a service log, a storage medium and computer equipment.
Background
In the related art, the current commercial APM (Application Performance Management) analysis system is implemented based on the Google Dapper paper (the distributed tracking system Dapper paper published in Google), and the core is that the traceID (path identifier) penetrates through the whole link to achieve the purpose of monitoring. The collection center of the distributed service log is completely different from another system of the APM analysis system, and often, problems are found in the APM analysis system without specific data scenes, so that the problems cannot be reproduced, and meanwhile, all the problems and hidden dangers cannot be completely covered by only depending on the printed log files.
In view of the above problems in the related art, no effective solution has been found at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for monitoring a service log, a storage medium and computer equipment, which are used for at least solving the technical problem of inaccurate analysis of the service log in the related technology.
According to an embodiment of the present invention, a method for monitoring a service log is provided, including: reading running information of a Java virtual machine in a service system during running; generating a path identifier according to the running information, and recording the path identifier into a class file executed by the Java virtual machine; and after the class file is printed into a log file, monitoring the log file and the running information according to the path identifier.
Optionally, generating a path identifier according to the running information, and recording the path identifier into a class file executed by the Java virtual machine includes: generating the path identification for the operation information based on a probe, wherein the path identification corresponds to the operation information one to one; recording the path identification into the class file through the probe.
Optionally, after generating the path identifier for the operation information based on the probe, the method further includes: sending the path identification and the operation information to an aggregator through the probe; and storing the path identification and the operation information to a search engine database through the aggregator.
Optionally, recording the path identifier into the class file through the probe includes: saving the path identifier to the context of a current thread, wherein the current thread represents a current application program of the Java virtual machine calling the class file; passing the path identification through the context.
Optionally, before monitoring the log file and the operation information according to the path identifier, the method further includes: reading the path identifier through a software development kit; printing the class file based on the path identifier to generate a log file, wherein the log file carries the path identifier; and saving the log file to a search engine database.
Optionally, the monitoring the log file and the operation information according to the path identifier includes: displaying the path identifier, the running information and the log file by utilizing a search engine; monitoring the operation information and the log file in the search engine by monitoring the path identifier.
Optionally, reading the running information of the Java virtual machine in the service system during running at least includes: reading the running state information of the Java virtual machine; reading link information of the class file called by the Java virtual machine; and reading the operating parameters of the Java virtual machine.
According to an embodiment of the present invention, there is provided a service log monitoring apparatus, including: the first reading module is used for reading the running information of the Java virtual machine in the service system during running; the recording module is used for generating a path identifier according to the running information and recording the path identifier into a class file executed by the Java virtual machine; and the monitoring module is used for monitoring the log file and the running information according to the path identifier after the class file is printed into the log file.
Optionally, the recording module includes: the generating unit is used for generating the path identification for the operation information based on the probe, wherein the path identification corresponds to the operation information one by one; and the recording unit is used for recording the path identification into the class file through the probe.
Optionally, the apparatus further comprises: a sending module, configured to send the path identifier and the operation information to a aggregator through a probe after the path identifier is generated for the operation information based on the probe; and the first storage module is used for storing the path identifier and the running information to a search engine database through the aggregator.
Optionally, the recording unit includes: the storage subunit is configured to save the path identifier to a context of a current thread, where the current thread represents a current application program for the Java virtual machine to call the class file; a transmission subunit, configured to transmit the path identifier through the context.
Optionally, the apparatus further comprises: the second reading module is used for reading the path identifier through a software development kit before monitoring the log file and the running information according to the path identifier; the generating module is used for printing the class file based on the path identifier to generate the log file, wherein the log file carries the path identifier; and the second storage module is used for storing the log file to a search engine database.
Optionally, the monitoring module includes: the display unit is used for displaying the path identifier, the running information and the log file by utilizing a search engine; and the monitoring unit is used for monitoring the running information and the log file in the search engine by monitoring the path identifier.
Optionally, the first reading module at least includes: the first reading unit is used for reading the running state information of the Java virtual machine; the second reading unit is used for reading the link information of the class file called by the Java virtual machine; and the third reading unit is used for reading the operating parameters of the Java virtual machine.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps in any of the apparatus embodiments described above when executed.
According to yet another embodiment of the present invention, there is also provided a computer device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the steps of any of the above method embodiments.
By the method and the system, the running information of the Java virtual machine in the service system during running is read so as to monitor the running state of the application program in the Java virtual machine; generating a path identifier corresponding to the running information, so that the running state of the application program can be monitored according to the path identifier; the path identifier is recorded in a class file executed by the Java virtual machine, and after the class file is printed into a log file, the log file can be monitored according to the path identifier, so that the printed log file can be monitored, the running state of an application program in the Java virtual machine can be monitored, more comprehensive log data can be monitored and analyzed, and the technical problem that the service log analysis in the related technology is inaccurate is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a computer terminal to which a service log monitoring method according to an embodiment of the present invention is applied;
FIG. 2 is a flow chart of a method for monitoring a service log according to an embodiment of the present invention;
FIG. 3 is a system flow diagram of a service log collection provided according to an embodiment of the invention;
FIG. 4 is a flow diagram of a service log monitoring provided in accordance with an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a skywalking page in an APM analysis system according to an embodiment of the present invention;
fig. 6 is a block diagram of a monitoring apparatus of a traffic log according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a server, a computer terminal, or a similar computing device. Taking an example of the service log running on a computer terminal, fig. 1 is a hardware structure block diagram of a service log monitoring method applied to a computer terminal according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally, a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of an application software, such as a computer program corresponding to the monitoring method of the service log in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a method for monitoring a service log is provided, and fig. 2 is a flowchart of a method for monitoring a service log according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, reading running information of a Java virtual machine in a service system during running;
in an optional scenario of the scheme, log collection is performed by collecting data printed in a log file by an application program, and the data can be considered by a developer in advance, the application program which may need to be recorded or may have problems records a corresponding log, and defects and problems of the application program are ignored, that is, collection and monitoring of the running state of the application program cannot be achieved, so that the technical problem that collected logs cannot be analyzed inaccurately is caused.
Step S204, generating a path identifier according to the running information, and recording the path identifier into a class file executed by the Java virtual machine;
in this embodiment, a path identifier corresponding to the running information is generated in the APM analysis system, and the path identifier is recorded in the class file, so that the Java virtual machine can carry the path identifier when calling the class file, and call link information of the class file is monitored by tracking the path identifier.
Step S206, after the class file is printed into a log file, the log file and the running information are monitored according to the path identifier.
Through the steps, the running information of the Java virtual machine in the service system during running is read so as to monitor the running state of the application program in the Java virtual machine; generating a path identifier corresponding to the running information, so that the running state of the application program can be monitored according to the path identifier; the path identifier is recorded in a class file executed by the Java virtual machine, after the class file is printed into a log file, the log file can be monitored according to the path identifier, the printed log file can be monitored, the running state of an application program in the Java virtual machine can be monitored, more comprehensive log data can be monitored and analyzed, and the technical problem that service log analysis in the related technology is inaccurate is solved.
In an optional embodiment, generating a path identifier according to the running information, and recording the path identifier in a class file executed by the Java virtual machine includes: generating path identifications for the operation information based on the probe, wherein the path identifications correspond to the operation information one to one; and recording the path identification into the class file through the probe.
In this embodiment, an Agent of the APM analysis system reads and Jvm (i.e., the link information and the parameter information of the class call) state information of Jvm based on a probe Java Agent, where because the running information corresponds to the same traceID (i.e., the path identifier), one trace is a call, if there is no traceID in the log file, hundreds of logs are printed when the log file is printed, and the printed logs are messy, so that the log of the call and the log of the previous call are printed alternately, and it is unclear which logs are called at the same time; in the embodiment, the logs from the same call are determined by screening the traceID, so that the beneficial effect of monitoring the log files according to the traceID is realized.
According to the above embodiment, after generating the path identifier for the operation information based on the probe, the method further includes: sending the path identification and the operation information to the aggregator through the probe; and storing the path identification and the operation information to a search engine database through the aggregator.
In this embodiment, based on skywalk (link tracking and analysis) + an adaptive search engine, the APM analysis system collects the traceID and the running information of the application program in the Java virtual machine through a Java agent in the APM analysis system, and sends the traceID and the running information to a collector (i.e., the above mentioned aggregator), so that the traceID and the running information in the floor adaptive search engine can be realized, and finally the floor data can be displayed through a web visualization platform in the APM analysis system, thereby achieving the purpose of monitoring the running information.
In an alternative embodiment, recording the path identification into the class file by the probe comprises: saving the path identifier to the context of a current thread, wherein the current thread represents a current application program of a Java virtual machine calling class file; pass path identification through context.
In the embodiment, after the Agent in the APM system generates the traceID, the traceID is stored in the context of the current thread and is transferred, because the running objects (java instances) of the same traceID are the same link information, and the logtraceID generated by the same link object is the same, when a slf4j frame (which is called a Simple L logging Fa ç ade for Java, namely a Simple logging facade frame) records the log, the log Factor.get L og (Class) (namely, an incoming Class file is used as the log), the object is also taken, and therefore the traceID is obtained by the context.
Optionally, before monitoring the log file and the running information according to the path identifier, the method further includes: reading the path identifier through a software development kit; printing the class file based on the path identifier to generate a log file, wherein the log file carries the path identifier; and saving the log file to a search engine database.
In this embodiment, a skywall + elastic search based APM analysis system implements distributed log link tracking, and a self-developed Software development kit (referred to as Software development kit, abbreviated as SDK) reads a traceID in skywall when an application program runs, prints the traceID in a log file, collects the traceID by a service log collection system, stores the traceID in a search engine database elastic search, and implements that the traceID is recorded in both the service log collection system and the APM analysis system.
Further, when the service log collection system and the APM analysis system both record traceids, the data of the two systems can be retrieved from each other, for example, an important main () method is executed by an application program found in the APM, and developers can be required to record corresponding system logs; and the APM finds that the application program is wrong and can immediately search the service log system to reproduce the scene, so that the technical problem that the problem found in the APM analysis system cannot be reproduced due to the fact that no specific data scene problem exists is solved.
In an optional embodiment, monitoring the log file and the operation information according to the path identifier includes: displaying the path identifier, the running information and the log file by using a search engine; the operation information and log files are monitored in the search engine by monitoring the path identifiers.
In this embodiment, the service log collection system is based on an elastic search + logstack + kibana + filebolt + kafka (kaffard), where logstack is a tool running on a java virtual machine and having a function of collecting, analyzing, and forwarding data streams; kibana is an open source data analysis and visualization platform; filebox is a log data collector of a local file; kafka is a distributed streaming platform. Before a log collection system sends a log file to kafka, when an APM analysis system calls a class file in a service system, a traceID generated by Agent is recorded into the log file, log link information is sent to a skywalking-collector collection center to be stored into an elastic search, and finally the log link information is displayed by a Skywalking-web UI (User Interface, namely User Interface) page, so that the beneficial effect of monitoring the log file according to the traceID in the log collection system is realized.
For example, fig. 3 is a flow chart of a system for collecting service logs according to an embodiment of the present invention, and as shown in fig. 3, the service log collection system is based on the elastic search + logstack + Kibana + filebeat + Kafka, wherein the filebeat monitors the log directory or the designated log file, tracks and reads the log directory or the designated log file, the Kafka processes all the action flow data (i.e. data flows from multiple service systems) in the customer-scale website, and L ogstack is responsible for transmitting the data information from the input end of the pipeline to the output end of the pipeline, the elastic search provides a full-text search engine with distributed multi-user capability, and performs visualization presentation based on restf (design style and development mode of a network application) web interface, wherein Kibana is a user interface of the elastic search.
In an embodiment of the present disclosure, reading the running information of the Java virtual machine in the service system during running at least includes: reading running state information of the Java virtual machine; reading link information of a Java virtual machine calling class file; and reading the operating parameters of the Java virtual machine.
In this embodiment, the operation information at least includes: jvm status information of the Java virtual machine (i.e., the above-mentioned operating status information); the Java virtual machine calls the link information of the class file; and operating parameters of the Java virtual machine. For example, Jvm status information includes: the heap memory occupancy, the number of classes loaded, the OC (garbage collection) times of jvm, etc.; the class call link information (i.e., the above-mentioned link information) includes at least: jvm, the called class files and the sequence form link information; the operating parameters include at least: the parameters are jvm parameters (such as: "-Xmx 1024 m-Xms 1024m-Xmn512m-Xss256 k") set by starting the java process.
Fig. 4 is a schematic flow chart of service log monitoring according to an embodiment of the present invention, and the following describes the technical solution provided by the present invention with reference to fig. 4.
Reading jvm running information by an agent in an apm system, generating a traceID according to the running information, sending the traceID and the running information to a Collector in a apm system, further realizing that the running information falls into an elastic search database, and finally displaying the running information by a sky walking-web UI page, for example, as shown in fig. 5, the traceID is: 2.40.15656916640480001, fig. 5 is a schematic diagram illustrating a skywalk page in an APM analysis system according to an embodiment of the present invention; meanwhile, the generated traceID is recorded in a class file executed in the service system, for example, in an a.class file in the service system, traceids are recorded in other calling a.class files (such as a b.class file and a c.class file shown in fig. 4); these class files are printed to a log file.
Recording the traceID into a log file, then, collecting the log file by an SDK (software development kit), monitoring the log file generated by a system in real time by a filebaet tool in a log collection system, and sending the log file to kafka in time; the kafka receives the log file in the filebaet in real time and outputs the log file by taking logstack as an output end; logstack consumes the data in kafka and sends the log printed by the service system program to the elasticsearch database; finally, a traceID is displayed on a kibana page, for example, a kibana page in a log collection system, wherein the traceID is: 2.40.15656916640480001, service 1(service1), service2, and service3, the logs printed in service3 are as follows:
log printed in service 1:
2019-08-14 16:46:22[http-nio-9091-exec-1]INFO c.z.s.controller.HelloController-TID:2.40.15656916640480001-service1 logger with traceID;
log printed in Service 2:
2019-08-14 16:46:24[http-nio-9092-exec-9]INFO c.z.s.controller.HelloController-TID:2.40.15656916640480001-service2 logger with traceID;
log printed in Service 3:
2019-08-14 16:46:24[http-nio-9093-exec-1]INFO c.z.s.controller.HelloController-TID:2.40.15656916640480001-service3 logger with traceID。
if jvm is embedded in the Java application, if the Java program is written with problems, the data of the run state jvm, the link information of the class call, and the parameter information can be displayed. For example, the resource consumption is relatively high, the occupied memory is also high, and the running state of the application program in the service system can be monitored according to the traceID in the monitoring log file.
Through the steps, jvm state information, class calling link information and parameter information in the JAVA virtual machine are read; generating a corresponding traceID, and recording the traceID into a log file; the method and the device for monitoring the log data in the log file based on the traceID solve the technical problems that distributed service logs in an acquisition system cannot be monitored, data analysis in the log file is inaccurate and the like in the related technology.
Example 2
In this embodiment, a service log monitoring device is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and details of which have been already described are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 6 is a block diagram of a monitoring apparatus for a traffic log according to an embodiment of the present invention, and as shown in fig. 6, the apparatus includes: the first reading module 60 is configured to read operation information of a Java virtual machine in a service system during operation; a recording module 62, connected to the first reading module 60, for generating a path identifier according to the running information, and recording the path identifier in a class file executed by the Java virtual machine; and the monitoring module 64 is connected to the recording module 62 and is used for monitoring the log file and the running information according to the path identifier after the class file is printed into the log file.
Optionally, the recording module 62 includes: the generating unit is used for generating path identifications for the operation information based on the probe, wherein the path identifications correspond to the operation information one by one; and the recording unit is used for recording the path identification into the class file through the probe.
Optionally, the apparatus further comprises: the sending module is used for sending the path identification and the operation information to the aggregator through the probe after the path identification is generated for the operation information based on the probe; and the first storage module is used for storing the path identification and the operation information to a search engine database through the aggregator.
Optionally, the recording unit includes: the storage subunit is used for saving the path identifier to the context of the current thread, wherein the current thread represents a current application program of the Java virtual machine calling class file; a transmission subunit, configured to pass the path identifier through the context.
Optionally, the apparatus further comprises: the second reading module is used for reading the path identifier through the software development kit before monitoring the log file and the running information according to the path identifier; the generating module is used for printing the class file based on the path identifier to generate a log file, wherein the log file carries the path identifier; and the second storage module is used for storing the log file to a search engine database.
Optionally, the monitoring module 64 includes: the display unit is used for displaying the path identifier, the running information and the log file by utilizing a search engine; and the monitoring unit is used for monitoring the running information and the log file in the search engine through the monitoring path identifier.
Optionally, the first reading module 60 at least includes: the first reading unit is used for reading the running state information of the Java virtual machine; the second reading unit is used for reading the link information of the calling class file of the Java virtual machine; and the third reading unit is used for reading the operating parameters of the Java virtual machine.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, reading the running information of the Java virtual machine in the service system during running;
s2, generating a path identifier according to the running information, and recording the path identifier into a class file executed by the Java virtual machine;
and S3, after the class file is printed into a log file, monitoring the log file and the operation information according to the path identifier.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide a computer device comprising a memory having a computer program stored therein and a processor arranged to execute the computer program to perform the steps of any of the above method embodiments.
Optionally, the computer device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, reading the running information of the Java virtual machine in the service system during running;
s2, generating a path identifier according to the running information, and recording the path identifier into a class file executed by the Java virtual machine;
and S3, after the class file is printed into a log file, monitoring the log file and the operation information according to the path identifier.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for monitoring a service log, comprising:
reading running information of a Java virtual machine in a service system during running;
generating a path identifier according to the running information, and recording the path identifier into a class file executed by the Java virtual machine;
and after the class file is printed into a log file, monitoring the log file and the running information according to the path identifier.
2. The method according to claim 1, wherein generating a path identifier according to the running information, and recording the path identifier in a class file executed by the Java virtual machine comprises:
generating the path identification for the operation information based on a probe, wherein the path identification corresponds to the operation information one to one;
recording the path identification into the class file through the probe.
3. The method of claim 2, wherein after generating the path identification for the operational information based on a probe, the method further comprises:
sending the path identification and the operation information to an aggregator through the probe;
and storing the path identification and the operation information to a search engine database through the aggregator.
4. The method of claim 2, wherein recording the path identification into the class file by the probe comprises:
saving the path identifier to the context of a current thread, wherein the current thread represents a current application program of the class file called by the Java virtual machine;
passing the path identification through the context.
5. The method of claim 1, wherein prior to monitoring the log file and the operational information according to the path identification, the method further comprises:
reading the path identifier through a software development kit;
printing the class file based on the path identifier to generate a log file, wherein the log file carries the path identifier;
and saving the log file to a search engine database.
6. The method of claim 1, wherein monitoring the log file and the operational information according to the path identification comprises:
displaying the path identifier, the running information and the log file by utilizing a search engine;
monitoring the operation information and the log file in the search engine by monitoring the path identifier.
7. The method of claim 1, wherein reading the running information of the Java virtual machine in the business system during running at least comprises:
reading the running state information of the Java virtual machine;
reading link information of the class file called by the Java virtual machine;
and reading the operating parameters of the Java virtual machine.
8. An apparatus for monitoring a service log, comprising:
the first reading module is used for reading the running information of the Java virtual machine in the service system during running;
the recording module is used for generating a path identifier according to the running information and recording the path identifier into a class file executed by the Java virtual machine;
and the monitoring module is used for monitoring the log file and the running information according to the path identifier after the class file is printed into the log file.
9. A computer storage medium on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
10. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
CN202010126798.XA 2020-02-28 2020-02-28 Service log monitoring method and device, storage medium and computer equipment Active CN111400127B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010126798.XA CN111400127B (en) 2020-02-28 2020-02-28 Service log monitoring method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010126798.XA CN111400127B (en) 2020-02-28 2020-02-28 Service log monitoring method and device, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN111400127A true CN111400127A (en) 2020-07-10
CN111400127B CN111400127B (en) 2022-09-09

Family

ID=71432131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010126798.XA Active CN111400127B (en) 2020-02-28 2020-02-28 Service log monitoring method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN111400127B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112286757A (en) * 2020-10-12 2021-01-29 浙江深大智能科技有限公司 Data synchronization monitoring method and device, electronic equipment and storage medium
CN112506743A (en) * 2020-12-09 2021-03-16 天津狮拓信息技术有限公司 Log monitoring method and device and server
CN112529528A (en) * 2020-12-16 2021-03-19 中国南方电网有限责任公司 Workflow monitoring and warning method, device and system based on big data flow calculation
CN114189430A (en) * 2021-12-09 2022-03-15 兴业银行股份有限公司 Three-dimensional log full-link monitoring system, method, medium and equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7461080B1 (en) * 2003-05-09 2008-12-02 Sun Microsystems, Inc. System logging within operating system partitions using log device nodes that are access points to a log driver
CN105224445A (en) * 2015-10-28 2016-01-06 北京汇商融通信息技术有限公司 Distributed tracking system
CN109271331A (en) * 2018-08-20 2019-01-25 平安普惠企业管理有限公司 Generation method, device, computer equipment and the storage medium of log
CN109388537A (en) * 2018-08-31 2019-02-26 阿里巴巴集团控股有限公司 Operation information tracking, device and computer readable storage medium
CN110083581A (en) * 2019-03-12 2019-08-02 平安科技(深圳)有限公司 A kind of method, apparatus, storage medium and the computer equipment of log retrospect
CN110222042A (en) * 2019-05-30 2019-09-10 口碑(上海)信息技术有限公司 For determining the method, apparatus, equipment and system architecture of having checked business datum

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7461080B1 (en) * 2003-05-09 2008-12-02 Sun Microsystems, Inc. System logging within operating system partitions using log device nodes that are access points to a log driver
CN105224445A (en) * 2015-10-28 2016-01-06 北京汇商融通信息技术有限公司 Distributed tracking system
CN109271331A (en) * 2018-08-20 2019-01-25 平安普惠企业管理有限公司 Generation method, device, computer equipment and the storage medium of log
CN109388537A (en) * 2018-08-31 2019-02-26 阿里巴巴集团控股有限公司 Operation information tracking, device and computer readable storage medium
CN110083581A (en) * 2019-03-12 2019-08-02 平安科技(深圳)有限公司 A kind of method, apparatus, storage medium and the computer equipment of log retrospect
CN110222042A (en) * 2019-05-30 2019-09-10 口碑(上海)信息技术有限公司 For determining the method, apparatus, equipment and system architecture of having checked business datum

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112286757A (en) * 2020-10-12 2021-01-29 浙江深大智能科技有限公司 Data synchronization monitoring method and device, electronic equipment and storage medium
CN112506743A (en) * 2020-12-09 2021-03-16 天津狮拓信息技术有限公司 Log monitoring method and device and server
CN112529528A (en) * 2020-12-16 2021-03-19 中国南方电网有限责任公司 Workflow monitoring and warning method, device and system based on big data flow calculation
CN112529528B (en) * 2020-12-16 2023-01-31 中国南方电网有限责任公司 Workflow monitoring and warning method, device and system based on big data flow calculation
CN114189430A (en) * 2021-12-09 2022-03-15 兴业银行股份有限公司 Three-dimensional log full-link monitoring system, method, medium and equipment

Also Published As

Publication number Publication date
CN111400127B (en) 2022-09-09

Similar Documents

Publication Publication Date Title
CN111400127B (en) Service log monitoring method and device, storage medium and computer equipment
CN112714047B (en) Industrial control protocol flow based test method, device, equipment and storage medium
CN102916854B (en) Flow statistical method, device and proxy server
CN107704360B (en) Monitoring data processing method, equipment, server and storage medium
CN108363662A (en) A kind of applied program testing method, storage medium and terminal device
CN112256542B (en) eBPF-based micro-service system performance detection method, device and system
CN103023693B (en) A kind of user behaviors log data management system and method
CN110635965B (en) IPv6 network quality monitoring method, equipment and storage medium
CN111367760A (en) Log collection method and device, computer equipment and storage medium
CN113553310A (en) Data acquisition method and device, storage medium and electronic equipment
CN109802842B (en) Application topology generation method and related equipment
CN107203464B (en) Method and device for positioning service problem
CN112333044A (en) Shunting equipment performance test method, device and system, electronic equipment and medium
CN112416557B (en) Method and device for determining call relation, storage medium and electronic device
CN113360413A (en) Code testing method and device
CN116719750B (en) Software testing method and device, server equipment and storage medium
CN111367686A (en) Service interface calling method and device, computer equipment and storage medium
CN115811484A (en) Network detection method, device and storage medium
CN112685370B (en) Log collection method, device, equipment and medium
CN112364267B (en) Front-end data acquisition method and device
CN104253718A (en) Network test method and device
CN108833125B (en) Drawing method, system, computer equipment and storage medium for restoring voice speech path
CN112422349A (en) Network management system, method, equipment and medium for NFV
CN112417015A (en) Data distribution method and device, storage medium and electronic device
CN109684159A (en) Method for monitoring state, device, equipment and the storage medium of distributed information system

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
TA01 Transfer of patent application right

Effective date of registration: 20220525

Address after: 518000 China Aviation Center 2901, No. 1018, Huafu Road, Huahang community, Huaqiang North Street, Futian District, Shenzhen, Guangdong Province

Applicant after: Shenzhen Ping An medical and Health Technology Service Co.,Ltd.

Address before: Room 12G, Area H, 666 Beijing East Road, Huangpu District, Shanghai 200001

Applicant before: PING AN MEDICAL AND HEALTHCARE MANAGEMENT Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant