Monitoring system and method, log acquisition method and related equipment

By building a full-link tree structure and monitoring data, unified monitoring across applications is achieved, and the problem of multi-application monitoring of enterprises is solved, troubleshooting efficiency and operation and maintenance efficiency are improved, and operation and maintenance costs are reduced.

CN118916227APending Publication Date: 2024-11-08INFORMATION & COMMUNICATION BRANCH STATE GRID JIBEI ELECTRIC POWER CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310502816.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-06
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Enterprises have problems with unified monitoring in multi-application monitoring. The monitoring level of existing monitoring tools is not comprehensive enough, and third-party tools are difficult to customize and maintain, resulting in long troubleshooting time and high error rate.

Method used

Design a monitoring system to pull business log information from the distributed publishing and subscription message system through multiple servers, build a full-link tree structure and monitoring data, and realize unified monitoring across applications, including application performance and JVM monitoring indicators. Display and store, and use Map Reduce to parallel analysis and feature indexing to provide information retrieval services.

Benefits of technology

It realizes the display of monitoring indicators from the overall and local dimensions simultaneously, shortens the troubleshooting time, improves the operation and maintenance personnel's ability to measure application performance and fault source positioning capabilities, and reduces operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916227A_ABST
    Figure CN118916227A_ABST
Patent Text Reader

Abstract

The invention discloses a monitoring system and method, a log collection method and related equipment, and relates to the technical field of computers. The monitoring system comprises a plurality of first servers and a second server, wherein the second server is used for pulling service log information of at least one application in the plurality of first servers from the distributed publishing and subscribing message system; the service log information is processed according to a preset format, a full-link tree structure and monitoring data are obtained, the full-link tree structure is used for indicating the calling relation between at least one application, and the monitoring data comprise application performance indexes and JVM monitoring indexes; and storing the full-link tree structure and the monitoring data to a distributed storage system, and displaying the full-link tree structure and the monitoring data. All cross-application call chain performance information is displayed in a centralized manner by constructing a full-link tree structure, so that operation and maintenance personnel can conveniently measure the overall and local performance of the application program server, and can conveniently find a fault generation source of the application program server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a monitoring system, method, log collection method and related equipment. Background Art

[0002] At present, enterprises have many applications, including applications (Application, App), World Wide Web (web), Java, Structured Query Language (SQL), etc. At the same time, some enterprises have very high requirements for the availability of applications. If enterprises do not monitor the numerous and complex applications, the first person to discover the problem of the application is likely to be the user. However, if a large number of users perceive the failure of the application, the user experience is very poor. For fault handling, without monitoring, it is impossible to quickly locate the problem point and solve the problem quickly. For active prevention, monitoring is also indispensable. If you rely on manual inspection to discover problems in advance, not only will the human resources requirements be very high, but manual inspection will also have a relatively high error rate. Therefore, application monitoring is indispensable for enterprises.

[0003] Enterprises may use different monitoring tools for monitoring different levels of applications. If only one monitoring tool is used, the monitoring level is not comprehensive enough. However, if a large number of monitoring tools are used, operation and maintenance personnel need to find and log in to multiple Uniform Resource Locators (URLs) when troubleshooting problems, which increases the operation and maintenance time. Currently, most enterprises use monitoring tools purchased from third parties, and there are also open source monitoring tools. It is difficult to customize and develop monitoring tools from third parties, and the monitoring is not comprehensive. Open source monitoring tools usually have maintenance difficulties.

[0004] Therefore, how to achieve unified monitoring of multiple applications is an urgent problem that needs to be solved. Summary of the invention

[0005] In view of the above problems, the present application provides a monitoring system, method, log collection method and related equipment to solve the problem of how to achieve unified monitoring of multiple applications.

[0006] In order to solve the above technical problems, this application proposes the following solutions:

[0007] In the first aspect, the present application provides a monitoring system, which includes: multiple first servers and second servers, the second server is used to: pull business log information of at least one application among the multiple first servers from a distributed publish-subscribe message system; process the business log information according to a preset format to obtain a full-link tree structure and monitoring data, the full-link tree structure is used to indicate the calling relationship between at least one application, and the monitoring data includes application performance indicators and JVM monitoring indicators; store the full-link tree structure and monitoring data in a distributed storage system, and display the full-link tree structure and monitoring data.

[0008] By obtaining the full-link tree structure and monitoring data, it is possible to display various monitoring indicators from both the overall and local dimensions. By building a full-link tree structure, all call chain performance information across applications is centrally displayed, making it easier for operation and maintenance personnel to measure the overall and local performance of application servers, and to find the source of application server failures, which can greatly shorten troubleshooting time in production.

[0009] In combination with the first aspect, in a possible implementation method, the business log information includes a call chain context, the call chain context includes a tracking identifier and a span identifier, the tracking identifier is used to indicate the call link where the application is located, and the span identifier is used to indicate the identifier of the application. The second server is specifically used to: build a full-link tree structure of at least one application based on the tracking identifier and the span identifier.

[0010] By building a full-link tree structure based on tracking identifiers and span identifiers, unified monitoring of multiple application systems can be achieved.

[0011] In combination with the first aspect, in another possible implementation method, application performance indicators include throughput, query rate per second, response time and error records, and JVM monitoring indicators include heap memory indicators, non-heap memory indicators, direct buffer indicators, memory mapped buffer indicators and number of JVM threads.

[0012] Application performance indicators can indicate the performance of the server when processing requests. JVM indicators can indicate the usage of memory, CPU, threads, etc.

[0013] In combination with the first aspect, in another possible implementation, the second server is further used to: analyze the characteristics of the monitoring data in parallel through Map Reduce to obtain a characteristic database, and store the characteristic database in a distributed storage system.

[0014] The feature database stored in the distributed storage system can be prepared for subsequent feature comparison.

[0015] In combination with the first aspect, in another possible implementation manner, the second server is further used to: create indexes for the features, and calculate correlations between the features.

[0016] Establishing feature indexes and calculating the correlation between features can provide information retrieval services to business systems.

[0017] In combination with the first aspect, in another possible implementation, multiple first servers are used to: collect business log information of at least one application in the multiple first servers by means of tracking points; and send the business log information to a distributed publish-subscribe message system.

[0018] The business log information is obtained through the set Agent, and the business log information is actively sent to the distributed publish-subscribe message system. This effectively ensures the accuracy and reliability of the business log information acquisition, and stores the business log information in the distributed publish-subscribe message system, effectively ensuring the stability of the log information storage, and facilitating the call and calculation of the log information, and also facilitating the reuse of the business log information.

[0019] In the second aspect, the present application provides a monitoring method, which is applied to a second server, the second server is used to monitor multiple first servers, and the first server is used to run at least one application. The method includes: pulling business log information of at least one application among multiple first servers from a distributed publish-subscribe message system; processing the business log information according to a preset format to obtain a full-link tree structure and monitoring data, the full-link tree structure is used to indicate the calling relationship between at least one application, and the monitoring data includes application performance indicators and JVM monitoring indicators; storing the full-link tree structure and monitoring data in a distributed storage system, and displaying the full-link tree structure and monitoring data.

[0020] By obtaining the full-link tree structure and monitoring data, it is possible to display various monitoring indicators from both the overall and local dimensions. By building a full-link tree structure, all call chain performance information across applications is centrally displayed, making it easier for operation and maintenance personnel to measure the overall and local performance of application servers, and to find the source of application server failures, which can greatly shorten troubleshooting time in production.

[0021] In combination with the second aspect, in a possible implementation method, the business log information includes a call chain context, the call chain context includes a tracing identifier and a span identifier, the tracing identifier is used to indicate the call chain where the application is located, and the span identifier is used to indicate the identifier of the application, and a full-link tree structure of at least one application is constructed based on the tracing identifier and the span identifier.

[0022] By building a full-link tree structure based on tracking identifiers and span identifiers, unified monitoring of multiple application systems can be achieved.

[0023] In combination with the second aspect, in another possible implementation method, application performance indicators include throughput, query rate per second, response time and error records, and JVM monitoring indicators include heap memory indicators, non-heap memory indicators, direct buffer indicators, memory mapped buffer indicators and number of JVM threads.

[0024] Application performance indicators can indicate the performance of the server when processing requests. JVM indicators can indicate the usage of memory, CPU, threads, etc.

[0025] In combination with the second aspect, in another possible implementation, features of monitoring data are analyzed in parallel through Map Reduce to obtain a feature database, which is then stored in a distributed storage system.

[0026] The feature database stored in the distributed storage system can be prepared for subsequent feature comparison.

[0027] In combination with the second aspect, in another possible implementation, indexes are created for features, and correlations between features are calculated.

[0028] Establishing feature indexes and calculating the correlation between features can provide information retrieval services to business systems.

[0029] In a third aspect, the present application provides a log collection method, the method comprising: collecting business log information of at least one application in multiple first servers by means of embedding points; and sending the business log information to a distributed publish-subscribe message system.

[0030] The business log information is obtained through the set Agent, and the business log information is actively sent to the distributed publish-subscribe message system. This effectively ensures the accuracy and reliability of the business log information acquisition, and stores the business log information in the distributed publish-subscribe message system, effectively ensuring the stability of the log information storage, and facilitating the call and calculation of the log information, and also facilitating the reuse of the business log information.

[0031] In a fourth aspect, the present application provides a monitoring device, the monitoring device comprising:

[0032] The acquisition module is used to pull business log information of at least one application in multiple first servers from the distributed publish-subscribe message system.

[0033] The processing module is used to process the business log information according to a preset format to obtain a full-link tree structure and monitoring data. The full-link tree structure is used to indicate the calling relationship between at least one application. The monitoring data includes application performance indicators and JVM monitoring indicators.

[0034] The storage and display module is used to store the full-link tree structure and monitoring data in the distributed storage system and display the full-link tree structure and monitoring data.

[0035] Specifically, application performance indicators include throughput, query rate per second, response time, and error records. JVM monitoring indicators include heap memory indicators, non-heap memory indicators, direct buffer indicators, memory mapped buffer indicators, and the number of JVM threads.

[0036] In combination with the fourth aspect, in a possible implementation method, the processing module is specifically used for: the business log information includes a call chain context, the call chain context includes a tracking identifier and a span identifier, the tracking identifier is used to indicate the call chain where the application is located, and the span identifier is used to indicate the identifier of the application, and a full-link tree structure of at least one application is constructed based on the tracking identifier and the span identifier.

[0037] In combination with the fourth aspect, in another possible implementation, the processing module is further used to: analyze the characteristics of the monitoring data in parallel through Map Reduce to obtain a characteristic database, and store the characteristic database in a distributed storage system.

[0038] In combination with the fourth aspect, in another possible implementation manner, the processing module is further used to: create indexes for the features, and calculate correlations between the features.

[0039] In a fifth aspect, the present application provides a log collection device, the log collection device comprising:

[0040] The collection module is used to collect business log information of at least one application in multiple first servers by means of embedding points.

[0041] The storage module is used to send business log information to the distributed publish-subscribe message system.

[0042] In order to achieve the above-mentioned purpose, according to the sixth aspect of the present application, a storage medium is provided, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the monitoring method of the second aspect mentioned above.

[0043] In order to achieve the above-mentioned purpose, according to the seventh aspect of the present application, a storage medium is provided, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the log collection method of the third aspect mentioned above.

[0044] In order to achieve the above-mentioned purpose, according to the eighth aspect of the present application, an electronic device is provided, which includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call the program instructions in the memory to execute the monitoring method of the second aspect mentioned above.

[0045] In order to achieve the above-mentioned purpose, according to the ninth aspect of the present application, an electronic device is provided, which includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call the program instructions in the memory to execute the log collection method of the third aspect mentioned above.

[0046] By means of the above technical solution, the technical solution provided by this application has at least the following advantages:

[0047] The present application provides a monitoring system, method, log collection method and related equipment. By acquiring a full-link tree structure and monitoring data, the present application can display various monitoring indicators from both overall and local dimensions. By constructing a full-link tree structure, all call chain performance information across applications is centrally displayed, which is convenient for operation and maintenance personnel to measure the overall and local performance of application servers, and to find the source of application server failures, which can greatly shorten the troubleshooting time in production.

[0048] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0050] Figure 1 A schematic diagram of the structure of a monitoring system provided in an embodiment of the present application is shown;

[0051] Figure 2 The hardware structure of an electronic device provided by an embodiment of the present application is shown;

[0052] Figure 3 A flow chart of a log collection method provided in an embodiment of the present application is shown;

[0053] Figure 4 A schematic diagram of a first server cluster provided in an embodiment of the present application is shown;

[0054] Figure 5 A flow chart of a monitoring method provided in an embodiment of the present application is shown;

[0055] Figure 6 A schematic diagram of a call chain context provided by an embodiment of the present application is shown;

[0056] Figure 7 A schematic diagram of a full-link tree structure provided in an embodiment of the present application is shown;

[0057] Figure 8 A specific schematic diagram of a monitoring system provided by an embodiment of the present application is shown;

[0058] Fig. 9 A schematic diagram of a monitoring display interface provided in an embodiment of the present application is shown;

[0059] Fig.10 A schematic diagram of the structure of a monitoring device provided in an embodiment of the present application is shown;

[0060] Fig.11 A schematic diagram of the structure of a log collection device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0061] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0062] In the embodiments of the present application, the terms "first" and "second" do not have a logical or temporal dependency, nor do they limit the quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another element.

[0063] In the embodiments of the present application, the term "at least one" means one or more, and the term "plurality" means two or more.

[0064] It should also be understood that the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrase "if it is determined that ..." or "if [a stated condition or event] is detected" may be interpreted as "upon determining that ..." or "in response to determining that ..." or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.

[0065] To facilitate understanding of the solutions of the present application, a brief introduction to the relevant concepts is first given as follows.

[0066] Tracking: Also known as event tracking, it is a commonly used data collection method for website analysis. It refers to attaching data collection program code to the functional program code at the "operation node" where data needs to be collected, and capturing, processing and sending related technologies and their implementation process for user behaviors or events on the operation node.

[0067] Spark Streaming is a streaming computing engine based on Apache Spark and a real-time computing framework built on Spark. Through the API it provides and the high-speed memory-based execution engine, users can combine streaming, batch processing, and exchange methods for query and real-time computing.

[0068] The basic principle of Spark Streaming is to divide the stream data into small time segments (a few seconds to a few minutes) and process these small parts of data in a way similar to batch processing. Spark's abstraction for continuous data streams is called DStream (Discretized Stream). A Dstream is a micro-batch elastic distributed dataset; and an elastic distributed dataset is a distributed dataset that can operate in parallel in two ways, namely, arbitrary functions and sliding window data conversion.

[0069] Kafka is a uniquely designed message queue with very high throughput and strong scalability. Kafka has the characteristics of distribution, high throughput and high scalability. Kafka is a message publishing and subscription system, which is divided into several modules: Producer, Broker, and Consumer. The Producer publishes messages to a Topic, and the data sent to Kafka is stored and forwarded by the Broker. The Consumer subscribes to the messages of a Topic, and once there is a new message about a Topic, the Broker will pass it to all Consumers who subscribe to it. In Kafka, messages are organized by Topic, and each Topic is divided into multiple Partitions, which makes it easier to manage data and perform load balancing. Load balancing is done through Zookeeper.

[0070] The above is an introduction to the technical terms involved in the embodiments of the present application, which will not be repeated below.

[0071] As described in the background technology, enterprises may use different monitoring tools for monitoring different levels of applications. If only one monitoring tool is used, the monitoring level is not comprehensive enough. However, if a large number of monitoring tools are used, operation and maintenance personnel need to search and log in to multiple uniform resource location systems when troubleshooting problems, thereby increasing the operation and maintenance time. Currently, most enterprises use monitoring tools purchased from third parties, and there are also open source monitoring tools. It is difficult to customize and develop monitoring tools from third parties, and the monitoring is not comprehensive. Open source monitoring tools usually have maintenance difficulties.

[0072] In view of this, an embodiment of the present application provides a monitoring method, and the specific method includes: multiple first servers and a second server, the second server is used to: pull the business log information of at least one application in the multiple first servers from the distributed publish-subscribe message system; process the business log information according to a preset format to obtain a full-link tree structure and monitoring data, the full-link tree structure is used to indicate the call relationship between at least one application, and the monitoring data includes application performance indicators and JVM monitoring indicators; store the full-link tree structure and monitoring data in a distributed storage system, and display the full-link tree structure and monitoring data. By obtaining the full-link tree structure and monitoring data, it is possible to display various monitoring indicators from both the overall dimension and the local dimension. By constructing a full-link tree structure, all call chain performance information across applications is centrally displayed, which is convenient for operation and maintenance personnel to measure the overall and local performance of the application server, and it is convenient for operation and maintenance personnel to find the source of the failure of the application server, which can greatly shorten the troubleshooting time in production.

[0073] The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0074] Figure 1 The schematic diagram of the structure of a monitoring system provided by an embodiment of the present application is shown. The monitoring system 100 includes a plurality of first servers (110, 120) and a second server 130, and the plurality of first servers (110, 120) and the second server 130 communicate with each other via a network 140.

[0075] The first server is used to collect business log information of at least one application in multiple first servers by means of point-of-use; and send the business log information to a distributed publish-subscribe message system.

[0076] The second server 130 is used to pull the business log information of at least one application from multiple first servers from the distributed publish-subscribe message system; process the business log information according to a preset format to obtain a full-link tree structure and monitoring data, the full-link tree structure is used to indicate the calling relationship between at least one application, and the monitoring data includes application performance indicators and JVM monitoring indicators; store the full-link tree structure and monitoring data in a distributed storage system, and display the full-link tree structure and monitoring data.

[0077] In the embodiment of the present application, the server may be a file server, a database server, an application server, etc. It should be noted that the embodiment of the present application does not limit the specific form of the server, and the above is only an exemplary description. In the following embodiments, only the application server is used as an example for description.

[0078] The system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.

[0079] The embodiment of the present application further provides a monitoring device, which can be used to execute the above monitoring method. Optionally, the monitoring device can be an electronic device with data processing capability, or a functional module in the electronic device, which is not limited.

[0080] For example, the electronic device may be a server, which may be a single server, or a server cluster consisting of multiple servers. For another example, the electronic device may be a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a cellular phone, a personal digital assistant (PDA), an augmented reality (AR), a virtual reality (VR) device and other terminal devices. For another example, the electronic device may also be a recording device, a video surveillance device and other devices. The present application does not impose any special restrictions on the specific form of the electronic device.

[0081] The following example takes the monitoring device as an electronic device. Figure 2 As shown, Figure 2 The present application provides a hardware structure of an electronic device 200.

[0082] like Figure 2 As shown, the electronic device 200 includes a processor 210 , a communication line 220 and a communication interface 230 .

[0083] Optionally, the electronic device 200 may further include a memory 240 . The processor 210 , the memory 240 and the communication interface 230 may be connected via a communication line 220 .

[0084] The processor 210 may be a central processing unit (CPU), a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 101 may also be any other device having a processing function, such as a circuit, a device, or a software module, without limitation.

[0085] In one example, the processor 210 may include one or more CPUs, such as Figure 2 CPU0 and CPU1 in.

[0086] As an optional implementation, the electronic device 200 includes multiple processors, for example, in addition to the processor 210, it may also include a processor 270. The communication line 220 is used to transmit information between the components included in the electronic device 200.

[0087] The communication interface 230 is used to communicate with other devices or other communication networks. The other communication networks may be Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), etc. The communication interface 230 may be a module, a circuit, a transceiver or any device capable of achieving communication.

[0088] The memory 240 is used to store instructions, where the instructions may be computer programs.

[0089] Among them, the memory 240 can be a read-only memory (ROM) or other types of static storage devices that can store static information and / or instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and / or instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage devices, etc., without limitation.

[0090] It should be noted that the memory 240 may exist independently of the processor 210 or may be integrated with the processor 210. The memory 240 may be used to store instructions or program codes or some data, etc. The memory 240 may be located inside the electronic device 200 or outside the electronic device 200, without limitation.

[0091] The processor 210 is used to execute the instructions stored in the memory 240 to implement the communication method provided in the following embodiments of the present application. For example, when the electronic device 200 is a terminal or a chip in a terminal, the processor 210 can execute the instructions stored in the memory 240 to implement the steps performed by the transmitting end in the following embodiments of the present application.

[0092] As an optional implementation, the electronic device 200 further includes an output device 250 and an input device 260. The output device 250 may be a device such as a display screen, a speaker, etc. that can output data of the electronic device 200 to a user. The input device 260 may be a device such as a keyboard, a mouse, a microphone, or a joystick that can input data to the electronic device 200.

[0093] It should be pointed out that Figure 2 The structure shown in the figure does not constitute a limitation on the computing device, except Figure 2 In addition to the components shown, the computing device may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0094] In addition, the embodiment of the present application also provides a log collection device. The log collection device can also be an electronic device module with data processing capabilities, or a functional module in the electronic device, which is not limited to this. Optionally, the hardware structure of the device can also be as follows Figure 2 shown.

[0095] In some embodiments, the monitoring device and the log collection device may be integrated into one device; or, the monitoring device and the log collection device may be two independent devices.

[0096] The monitoring device, log collection device, and application scenario described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of monitoring devices and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0097] Next, a detailed description will be given with reference to the accompanying drawings. Figure 3 A flow chart of a log collection method provided in this application. The method is applied to Figure 2 The log collection device of the hardware structure shown in the figure specifically includes the following steps:

[0098] Step 310: The log collection device collects business log information of at least one application in the plurality of first servers by means of embedding points.

[0099] Tracking refers to the process of capturing, processing and sending specific user behaviors or events. It can also be understood as the process of collecting user behavior data. Tracking can be used to track events for various operations involved in a business process to understand the parameters of each operation process of the business. In an embodiment of the present application, the business log information of the application on the application server (first server) is collected by tracking.

[0100] Furthermore, an Agent is deployed on each application server, and the Agent can read the monitoring data used for monitoring in the collected business log information.

[0101] Figure 4 A schematic diagram of a first server cluster provided in this application. Figure 4As shown, when the application server is a virtual machine platform application, a log collection system (Flume) is used to collect the application's business log information. When the application server is a Kubernetes+Docker cloud platform application, Heapster and / or Fluentd are used to collect the application's business log information.

[0102] Step 320: The log collection device sends the business log information to the distributed publish-subscribe message system.

[0103] The distributed publish-subscribe messaging system is a large message queue buffer and a cluster-mode message buffer that can store a large amount of buffered data. When the traffic is large, the distributed publish-subscribe messaging system will be used as a message buffer to form some original transaction data.

[0104] After the Agent obtains the business log information, the log collection device writes the business log information into the message queue of the distributed publish-subscribe messaging system. In the embodiment of the present application, the distributed publish-subscribe messaging system stores the business log information of the application in the first server, and the business log information is the original transaction data, and the operation and maintenance personnel of the original transaction data cannot directly understand the content indicated therein.

[0105] In summary, the business log information is obtained through the set Agent, and the business log information is actively sent to the distributed publish-subscribe message system. The accuracy and reliability of the business log information acquisition are effectively guaranteed, and the business log information is stored in the distributed publish-subscribe message system, which effectively guarantees the stability of the log information storage, facilitates the call and calculation of the log information, and can also facilitate the reuse of the business log information.

[0106] In one implementation, the first server adopts a mode of actively sending the business log information obtained by the embedding point to the distributed subscription message system, thereby also improving the real-time performance of data collection.

[0107] Figure 5 A flow chart of a monitoring method provided in this application. Figure 8 A specific schematic diagram of a monitoring system provided in this application. The method is applied to Figure 2 The monitoring device of the hardware structure shown specifically includes the following steps:

[0108] Step 510: The monitoring device pulls business log information of at least one application in the plurality of first servers from the distributed publish-subscribe message system.

[0109] The second server actively pulls the business log information of at least one application in the first server from the distributed subscription message system in a pull mode.

[0110] The pull mode is a transaction initiated by the second server. The first server puts its own information at a designated address (in this embodiment of the application, a distributed publish-subscribe messaging system), and the second server sends a request to the designated address (distributed publish-subscribe messaging system) to "pull" back the resources it needs (business log information).

[0111] The pull mode can not only prevent excessive traffic impact, but also accurately obtain the resources you need and promptly feedback the status of the second server to the first server.

[0112] In one implementation, different adapters are configured, and different adapters are used to access different types of data.

[0113] Step 520: The monitoring device processes the business log information according to a preset format to obtain a full-link tree structure and monitoring data.

[0114] In one embodiment, the real-time computing framework Spark Streaming is used to process the business log information. The processing process includes cleaning the business log information and converting the original business log information into a full-link tree structure and monitoring data readable by operation and maintenance personnel.

[0115] Monitoring data includes application performance indicators and JVM monitoring indicators. Application performance indicators include throughput, query rate per second, response time and error records. Throughput refers to the number of requests processed by the system per unit time. Response time includes the response time of the overall call and the response time of each service. Query rate per second QPS = concurrent number / average response time. The number of concurrent users refers to the number of users who can use the system functions normally and can be carried by the system at the same time. Error records refer to the number of abnormalities per unit time based on the service return statistics.

[0116] JVM monitoring mainly monitors the usage of memory, CPU, threads, etc. JVM monitoring indicators include heap memory indicators, non-heap memory indicators, direct buffer indicators, memory mapping buffer indicators and JVM thread number. Heap memory indicators include: initial bytes of heap memory, maximum bytes of heap memory, committed bytes of heap memory, and bytes used by heap memory. Non-heap memory indicators include: initial bytes of non-heap memory, maximum bytes of non-heap memory, committed bytes of non-heap memory, and bytes used by non-heap memory. Direct buffer indicators include: total size of direct buffer (bytes), used size of direct buffer (bytes). Memory mapping buffer indicators include: total size of memory mapping buffer (bytes), used size of memory mapping buffer (bytes), GC (garbage collection) cumulative details: number of garbage collection PS MarkSweeps, number of garbage collection PS Scavenges, garbage collection PS MarkSweep time, garbage collection PS Scavenge time. JVM thread number indicators include the total number of threads.

[0117] The full-link tree structure is used to indicate the call relationship between at least one application. Specifically, the business log information includes the call chain context, which includes the trace ID (TraceID) and the span ID (SpanID). The trace ID is used to indicate the call chain where the application is located, and the span ID is used to indicate the ID of the application. The trace ID is the entire link view of the request in the distributed system, and the span ID represents the view inside different applications in the entire link. The span IDs combined together are the view of the entire trace ID.

[0118] In the entire request call chain, the request will always carry the TraceID to the downstream application. Each application will also generate its own SpanID to generate its own internal call view and pass it to the downstream application together with the TraceID.

[0119] The TraceID remains unchanged throughout the entire call chain of the request, so in the log, you can use the TraceID to query all the logs recorded by the system during the entire request. After the request reaches each application, the application will generate a SpanID for the request, and the SpanID of the upstream application transmitted from the upstream along with the request will be recorded as the Parent-SpanID. When the SpanID generated by the current application is transmitted to the downstream application along with the request, this SpanID will be recorded as the Parent-SpanID by the downstream application.

[0120] For example, Figure 6 A schematic diagram of a call chain context provided for this application. Figure 6It can be seen that the user sends a request to application 1. At this time, application 1's TraceID = X, SpanID = A. Application 1 needs to call application 2. At this time, application 2's TraceID = X, SpanID = B. Application 2 needs to call application 3 and application 4. At this time, application 3's TraceID = X, SpanID = C, and application 4's TraceID = X, SpanID = D. According to Figure 6 The tracking identifier and span identifier of the application can obtain the calling relationship between the applications that respond to the user request this time, and the full-link tree structure can be constructed based on the tracking identifier and span identifier.

[0121] In a distributed application architecture, when a web request flows in from a gateway, it is possible that multiple applications will be called to process the request and get the final result. Figure 7 A schematic diagram of a full-link tree structure provided for this application. Figure 7 It can be seen that the browser sends a request to application A, application A calls application B, application C and the message applicator, application B calls application F and application G, application C calls application G, the message applicator calls application C and application D, application D calls application G, and application F and application G send the browser request to the database.

[0122] Obtaining the full-link tree structure and monitoring data can display various monitoring indicators from both the overall and local dimensions. By building a full-link tree structure, all call chain performance information across applications is centrally displayed, making it easier for operation and maintenance personnel to measure the overall and local performance of application servers.

[0123] In another embodiment, the real-time computing framework Spark Streaming is encapsulated. Encapsulating the real-time computing framework can

[0124] Step 530: The monitoring device stores the full-link tree structure and monitoring data in a distributed storage system, and displays the full-link tree structure and monitoring data.

[0125] The full-link tree structure and monitoring data are stored in a distributed storage system. The distributed storage system can be a distributed file system (HDFS) or a Hadoop database (HBase). The distributed file system is suitable for scenarios where data is written once and read multiple times. Once a file is created, written, and closed, it does not need to be changed. HBase is a column-oriented database that runs on HDFS, solving the problem of HDFS's lack of random read and write operations. HBase is a NoSQL database that is mainly suitable for random real-time queries of massive detailed data (billions or tens of billions), such as log details.

[0126] Furthermore, encapsulating the distributed storage system can avoid the technical differences between storage systems such as HDFS and HBase, shielding them under the interface layer, and thus there is no need to worry about the storage method and location of specific data during monitoring, thereby improving monitoring efficiency.

[0127] Furthermore, the full-link tree structure and monitoring data stored in the distributed storage system will be displayed. Different types of monitoring data can be displayed on different displays. The displays can be electronic devices such as mobile phones, tablets, and PCs. The full-link tree structure and monitoring data can be displayed to operation and maintenance personnel in various terminal forms such as mobile phone APP, Web pages, PC applications, and applets. Fig. 9 A schematic diagram of a monitoring display interface provided by an embodiment of the present application is shown. Operation and maintenance personnel can quickly locate application server failures based on the actual monitoring data and tree structure in the interface, which can greatly shorten troubleshooting time in production.

[0128] In another embodiment, the features of the monitoring data are analyzed in parallel through Map Reduce to obtain a feature database, and the feature database is stored in a distributed storage system.

[0129] For example, for videos and other types of data stored in HDFS, their features can be analyzed in parallel through Map Reduce to obtain a feature library, such as facial features, fingerprint features, object features, behavioral features, etc., and the feature library can be saved in HBase to prepare for subsequent feature comparison.

[0130] In another implementation, it is a daunting challenge to find relevant content in a massive amount of video and security data. Therefore, the Hadoop platform is used to index the features of the feature library stored in HBase, and calculate the correlation between the features, that is, the call relationship between applications, so as to provide information retrieval services to the business system.

[0131] It is understandable that in order to implement the functions in the above embodiments, the computer device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0132] Furthermore, as a response to the above Figure 4The embodiment of the present application provides a monitoring device for the implementation of the method embodiment shown. The embodiment of the device corresponds to the aforementioned method embodiment. For ease of reading, this embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Fig.10 As shown, the monitoring device 1000 includes:

[0133] The acquisition module 1001 is used to pull business log information of at least one application in multiple first servers from the distributed publish-subscribe message system.

[0134] Processing module 1002 is used to process business log information according to a preset format to obtain a full-link tree structure and monitoring data. The full-link tree structure is used to indicate the calling relationship between at least one application, and the monitoring data includes application performance indicators and JVM monitoring indicators.

[0135] The storage and display module 1003 is used to store the full-link tree structure and monitoring data in the distributed storage system, and display the full-link tree structure and monitoring data.

[0136] Specifically, application performance indicators include throughput, query rate per second, response time, and error records. JVM monitoring indicators include heap memory indicators, non-heap memory indicators, direct buffer indicators, memory mapped buffer indicators, and the number of JVM threads.

[0137] Further, such as Fig.10 As shown, the processing module 1002 is specifically used for: the business log information includes a call chain context, the call chain context includes a tracing identifier and a span identifier, the tracing identifier is used to indicate the call chain where the application is located, the span identifier is used to indicate the identifier of the application, and a full-link tree structure of at least one application is constructed based on the tracing identifier and the span identifier.

[0138] Further, such as Fig.10 As shown, the processing module 1002 is also used to: analyze the characteristics of the monitoring data in parallel through Map Reduce to obtain a characteristic database, and store the characteristic database in a distributed storage system.

[0139] Further, such as Fig.10 As shown, the processing module 1002 is further used to: create indexes for the features and calculate the correlation between the features.

[0140] Furthermore, as a response to the above Figure 3The implementation of the method embodiment shown in the embodiment of the present application provides a log collection device. The embodiment of the device corresponds to the aforementioned method embodiment. For ease of reading, this embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents in the aforementioned method embodiment.

[0141] Specific as Fig.11 As shown, the log collection device 1100 includes:

[0142] The collection module 1101 is used to collect business log information of at least one application in multiple first servers by means of embedding points.

[0143] The storage module 1102 is used to send the business log information to the distributed publish-subscribe message system.

[0144] Furthermore, an embodiment of the present application also provides an electronic device, the electronic device includes a processor and a memory, the acquisition module 1001, the processing module 1002, and the storage and display module 1003 are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The processor includes a kernel, and the kernel retrieves the corresponding program unit from the memory.

[0145] Furthermore, an embodiment of the present application also provides an electronic device, the electronic device includes a processor and a memory, the acquisition module 1101 and the storage module 1102 are stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The processor includes a kernel, and the kernel retrieves the corresponding program unit from the memory.

[0146] An embodiment of the present application provides a storage medium on which a program is stored, and when the program is executed by a processor, the monitoring method is implemented.

[0147] An embodiment of the present application provides a storage medium on which a program is stored. When the program is executed by a processor, the log collection method is implemented.

[0148] An embodiment of the present application provides a processor, which is used to run a program, wherein the monitoring method is executed when the program is running.

[0149] An embodiment of the present application provides a processor, which is used to run a program, wherein the log collection method is executed when the program is running.

[0150] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: pulling business log information of at least one application among multiple first servers from a distributed publish-subscribe message system; processing the business log information according to a preset format to obtain a full-link tree structure and monitoring data, the full-link tree structure is used to indicate the calling relationship between at least one application, and the monitoring data includes application performance indicators and JVM monitoring indicators; storing the full-link tree structure and monitoring data in a distributed storage system, and displaying the full-link tree structure and monitoring data.

[0151] Furthermore, the business log information includes a call chain context, which includes a tracing identifier and a span identifier. The tracing identifier is used to indicate the call chain where the application is located, and the span identifier is used to indicate the identifier of the application. A full-link tree structure of at least one application is constructed based on the tracing identifier and the span identifier.

[0152] Furthermore, the application performance indicators include throughput, query rate per second, response time and error log, and the JVM monitoring indicators include heap memory indicators, non-heap memory indicators, direct buffer indicators, memory mapped buffer indicators and number of JVM threads.

[0153] Furthermore, the features of the monitoring data are analyzed in parallel through Map Reduce to obtain a feature database, which is then stored in a distributed storage system.

[0154] Furthermore, the features are indexed and the correlation between the features is calculated.

[0155] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: collecting business log information of at least one application in multiple first servers by means of point embedding; and sending the business log information to a distributed publish-subscribe message system.

[0156] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0157] In a typical configuration, the device includes one or more processors (CPU), memory and bus. The device may also include input / output interface, network interface and the like.

[0158] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.

[0159] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

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

[0161] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0162] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A monitoring system, characterized in that: The monitoring system comprises: a plurality of first servers and a second server, wherein the second server is used to: pull business log information of at least one application in the plurality of first servers from a distributed publish-subscribe message system; Processing the business log information according to a preset format to obtain a full-link tree structure and monitoring data, wherein the full-link tree structure is used to indicate a call relationship between the at least one application, and the monitoring data includes application performance indicators and JVM monitoring indicators; The full-link tree structure and the monitoring data are stored in a distributed storage system, and the full-link tree structure and the monitoring data are displayed.

2. The system according to claim 1, characterized in that The business log information includes a call chain context, the call chain context includes a tracking identifier and a span identifier, the tracking identifier is used to indicate the call chain where the application is located, and the span identifier is used to indicate the identifier of the application, and the second server is specifically used to: The full-link tree structure of the at least one application is constructed according to the tracing identifier and the span identifier.

3. The system according to claim 1, characterized in that The application performance indicators include throughput, query rate per second, response time and error records, and the JVM monitoring indicators include heap memory indicators, non-heap memory indicators, direct buffer indicators, memory mapping buffer indicators and the number of JVM threads.

4. The system according to claim 1, characterized in that The second server is also used for: The features of the monitoring data are analyzed in parallel through Map Reduce to obtain a feature database, and the feature database is stored in the distributed storage system.

5. The system according to claim 4, characterized in that The second server is also used for: The features are indexed and correlations between the features are calculated.

6. The system according to claim 1, characterized in that The multiple first servers are used for: Collecting business log information of at least one application in the multiple first servers by means of tracking points; The business log information is sent to the distributed publish-subscribe message system.

7. A monitoring method, characterized in that: Applied to a second server, the second server is used to monitor a plurality of first servers, the first servers are used to run at least one application, the method comprising: Pulling business log information of at least one application in the plurality of first servers from the distributed publish-subscribe messaging system; Processing the business log information according to a preset format to obtain a full-link tree structure and monitoring data, wherein the full-link tree structure is used to indicate a call relationship between the at least one application, and the monitoring data includes application performance indicators and JVM monitoring indicators; The full-link tree structure and the monitoring data are stored in a distributed storage system, and the full-link tree structure and the monitoring data are displayed.

8. A log collection method, characterized in that: The method comprises: Collecting business log information of at least one application in the plurality of first servers by means of embedding points; The business log information is sent to a distributed publish-subscribe message system.

9. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the method as described in any one of claims 7-8.

10. An electronic device, characterized in that: The device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; and the processor is used to call program instructions in the memory to execute the method as described in any one of claims 7-8.

Citation Information

Cited By

  • Distributed log storage and analysis method and system based on traceId

    CN121530836A