CN113849363A - Service monitoring method and related device - Google Patents

Service monitoring method and related device Download PDF

Info

Publication number
CN113849363A
CN113849363A CN202010609511.9A CN202010609511A CN113849363A CN 113849363 A CN113849363 A CN 113849363A CN 202010609511 A CN202010609511 A CN 202010609511A CN 113849363 A CN113849363 A CN 113849363A
Authority
CN
China
Prior art keywords
monitoring
data
service
statistical
rule
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010609511.9A
Other languages
Chinese (zh)
Inventor
杨奕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010609511.9A priority Critical patent/CN113849363A/en
Publication of CN113849363A publication Critical patent/CN113849363A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3072Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting

Abstract

The embodiment of the application provides a service monitoring method and a related device, wherein the method comprises the following steps: receiving a statistical rule aiming at a first service and sent by monitoring configuration equipment; generating a monitoring program aiming at the first service according to the statistical rule, wherein the monitoring program is a computer program generated based on a non-invasive technology; calling the monitoring program to monitor data generated when the target application runs when the target application is executed; wherein the target application is an application for processing the first service; counting the data monitored by the monitoring program according to the statistical rule to obtain statistical data; and sending the statistical data to a computing node, wherein the statistical data is used for aggregating on the computing node to obtain the monitoring data of the first service. By adopting the embodiment of the application, the monitoring efficiency of the service monitoring system can be improved, and decoupling of operation and maintenance personnel and development personnel is further realized.

Description

Service monitoring method and related device
Technical Field
The present invention relates to the field of information technologies, and in particular, to a service monitoring method and a related device.
Background
With the improvement of software maturity of various industries and the development of network technology in China, daily operation activities of enterprises cannot leave a computer system, and particularly for enterprises operating e-commerce services, the computer system is even a main production tool of the enterprises. Generally speaking, a developer of a computer system is responsible for developing business functions, and an operation and maintenance person of an enterprise is responsible for business monitoring work of the computer system. Specifically, on one hand, operation and maintenance personnel can collect daily data of the information-based system during operation, so that the performance problem and the operation problem of the computer system can be found, and the stability of the system can be improved. On the other hand, operation and maintenance personnel can collect service data generated during system operation, and service insights and service operation capacity can be improved.
In the service monitoring process, a log analysis mode is generally adopted to monitor the service problem. Firstly, adding a log record code in a service code, acquiring a log file in real time or at regular time through the log record code, and monitoring the service according to the analysis of the log file. The monitoring mode depends on development of developers according to requirements, and the monitoring efficiency of the service is low.
Therefore, how to improve the efficiency of traffic monitoring is a hot issue being studied by those skilled in the art.
Disclosure of Invention
The embodiment of the application discloses a service monitoring method and a related device, which can improve the monitoring efficiency of a service monitoring system and further realize the decoupling of operation and maintenance personnel and developers.
In a first aspect, an embodiment of the present application discloses a method for monitoring a service, including:
receiving a statistical rule aiming at a first service and sent by monitoring configuration equipment;
generating a monitoring program aiming at the first service according to the statistical rule, wherein the monitoring program is a computer program generated based on a non-invasive technology;
calling the monitoring program to monitor data generated when the target application runs when the target application is executed; wherein the target application is an application for processing the first service;
counting the data monitored by the monitoring program according to the statistical rule to obtain statistical data;
and sending the statistical data to a computing node, wherein the statistical data is used for aggregating on the computing node to obtain the monitoring data of the first service.
By implementing the embodiment of the application, the service end generates the monitoring program according to the statistical rule configured by the configuration center, so that the monitoring program can be generated according to the monitoring requirement of operation and maintenance personnel, developers do not need to develop the corresponding invasive monitoring program according to the requirement, the implementation codes of the service system do not need to be modified, the non-invasive monitoring is realized, and the workload of the developers is reduced.
In addition, the service end firstly preprocesses locally acquired data, and the obtained statistical data are sent to the computing node, so that the processing of a large amount of data in the computing node is avoided, the workload of the computing node for processing a single service end is reduced, and the computing node can gather more data uploaded by the service end.
In a possible implementation manner of the first aspect, the statistical rule includes a filtering feature and a statistical index, and the statistical data obtained by performing statistics on the data monitored by the monitoring program through the statistical rule includes:
filtering the data monitored by the monitoring program according to the filtering characteristics to obtain target data;
and counting the target data according to the statistical indexes to obtain statistical data.
The specific method in the data statistics process is described above, and the data to be counted is filtered according to the filtering characteristics, and then the data is counted according to the manner indicated in the statistical index, so as to obtain the statistical data. For example, the monitoring program may monitor that order data of a plurality of commodities passes through, so that the commodity ID "a 001" may be added to the filtering feature, and order data with the commodity ID "a 0001" may be filtered from the order data of the commodities, so as to perform statistics on the order data of the commodities to obtain statistical data.
In yet another possible implementation manner of the first aspect, the data monitored by the monitoring program includes data corresponding to a plurality of uniform resource locators, and the filtering feature includes indication information of a target URL; filtering the data monitored by the monitoring program according to the filtering characteristics to obtain target data; the method comprises the following steps:
and filtering the data corresponding to the target URL from the data corresponding to the plurality of Uniform Resource Locators (URLs) according to the indication information of the target URL.
The foregoing describes a specific method for filtering data according to a URL, for example, a monitoring program may monitor URLs and data corresponding to the URLs, so that a URL "post/order" may be added to a filtering feature, so that data corresponding to the URL "post/order" may be filtered from data corresponding to a plurality of URLs, and the data corresponding to the URL may be counted to obtain statistical data.
In yet another possible implementation of the first aspect, the method further comprises:
sending the identity information of the service server to the computing node; the identity information of the service server is used for the computing node to aggregate the statistical data to obtain monitoring data of the first service; the monitoring data of the first service is used for describing the condition that the service server processes the first service.
In yet another possible implementation of the first aspect, the target application is a JAVA development based application; the calling the monitoring program to monitor the data generated when the target application runs when the target application is executed comprises the following steps:
inserting the monitoring program into the Class of the target application through a Java byte code manipulation framework (ASM) based on the Java agent;
and calling the monitoring program to monitor data generated during the running of the target application when the Class of the target application is executed.
In yet another possible implementation of the first aspect, the target application is an application developed based on a hypertext preprocessor PHP; the calling the monitoring program to monitor the data generated when the target application runs when the target application is executed comprises the following steps:
inserting the monitoring program into the bottom layer code of the target application based on the PHP extension plug-in;
and when the underlying code of the target application is executed, calling the monitoring program to monitor the data generated when the target application runs.
In yet another possible implementation of the first aspect, the method further comprises:
receiving a statistical rule in the updated monitoring strategy of the first service from the monitoring configuration equipment;
and adjusting the target program according to the updated statistical rule in the monitoring strategy of the first service.
Therefore, the business end can obtain the updating of the monitoring strategy in time, and can adjust the local monitoring program as soon as possible after the statistical rule is updated, thereby realizing dynamic business monitoring and improving the flexibility of the business monitoring.
In a second aspect, an embodiment of the present application discloses a service monitoring method, including:
generating a monitoring strategy of a first service, wherein the monitoring strategy of the first service comprises a statistical rule and an aggregation rule; the statistical rule is used for generating a monitoring program for the first service, and the monitoring program is used for monitoring data generated when a target application runs, wherein the target application is an application for processing the first service; the statistical rule is also used for carrying out statistics on the data monitored by the monitoring program to obtain statistical data; the aggregation rule is used for indicating a mode of aggregating the data counted by the statistical rule;
sending the aggregation rule to a computing node;
and sending the statistical rule to a service server.
In a possible implementation manner of the second aspect, the statistical rule includes a filtering feature and a statistical index, wherein the filtering feature is used for filtering target data from data monitored by the monitoring program; and the statistical indexes are used for carrying out statistics on the target data to obtain statistical data.
In yet another possible implementation of the second aspect, the filtering feature includes indication information of a target URL; and the indication information of the target URL is used for filtering the data corresponding to the target URL from the data corresponding to the plurality of Uniform Resource Locators (URLs).
In yet another possible embodiment of the second aspect, the method further comprises:
monitoring whether the monitoring strategy of the first service is updated or not;
and if the first service is updated, sending the updated statistical rule in the monitoring strategy of the first service to the service server, and sending the updated aggregation rule in the monitoring strategy of the first service to the computing node.
In another possible implementation manner of the second aspect, the monitoring whether the monitoring policy for monitoring the first service is updated includes:
and monitoring whether the monitoring strategy of the first service is updated or not by a reliable coordination system ZooKeeper based on a distributed system.
In a third aspect, an embodiment of the present application discloses a service monitoring method, including:
receiving an aggregation rule aiming at statistical data of a first service, which is sent by monitoring configuration equipment; the aggregation rule is used for indicating a mode of aggregating the data counted by the statistical rule;
receiving statistical data of the first service sent by a service server; the statistical data is data which is counted based on a statistical rule sent by the monitoring configuration equipment;
and aggregating the statistical data based on the aggregation rule to obtain the monitoring data of the first service.
In yet another possible implementation of the third aspect, the method further includes:
receiving the identity information of the service server sent by the service server;
the aggregating the statistical data based on the aggregation rule to obtain the monitoring data of the first service includes:
aggregating the statistical data with the identity information of the service server based on the aggregation rule to obtain monitoring data of the first service; the monitoring data of the first service is used for describing the condition that the service server processes the first service.
In yet another possible implementation of the third aspect, the method further includes:
receiving an aggregation rule in the updated monitoring strategy of the first service, which is sent by the monitoring configuration equipment;
and aggregating the statistical data from the service server according to the aggregation rule in the updated monitoring strategy of the first service to obtain updated monitoring data of the first service.
In a fourth aspect, an embodiment of the present application discloses a service monitoring method, including:
the method comprises the steps that monitoring configuration equipment generates a monitoring strategy of a first service, wherein the monitoring strategy of the first service comprises a statistical rule and an aggregation rule; the aggregation rule is used for indicating a mode of aggregating the data counted by the statistical rule;
the monitoring configuration equipment sends the aggregation rule to a computing node;
the computing node receives an aggregation rule of statistical data aiming at a first service, which is sent by monitoring configuration equipment;
the monitoring configuration equipment sends the statistical rule to a service server;
the service server receives a statistical rule aiming at a first service and sent by monitoring configuration equipment;
the business server generates a monitoring program aiming at the first business according to the statistical rule, wherein the monitoring program is a computer program generated based on a non-invasive technology;
the service server calls the monitoring program to monitor data generated when the target application runs when executing the target application; wherein the target application is an application for processing the first service;
the business server carries out statistics on the data monitored by the monitoring program through the statistical rule to obtain statistical data;
the service server sends the statistical data to the computing node;
the computing node receives the statistical data from the service server;
and the computing node aggregates the statistical data based on the aggregation rule to obtain the monitoring data of the first service.
In a possible implementation manner of the fourth aspect, the statistical rule includes a filtering feature and a statistical index, and the obtaining, by the service server, statistical data monitored by the monitoring program through the statistical rule includes:
the service server filters the data monitored by the monitoring program according to the filtering characteristics to obtain target data;
and the service server counts the target data according to the statistical indexes to obtain statistical data.
In yet another possible implementation manner of the fourth aspect, the data monitored by the monitoring program includes data corresponding to a plurality of uniform resource locators, and the filtering feature includes indication information of a target URL; the service server filters the data monitored by the monitoring program according to the filtering characteristics to obtain target data; the method comprises the following steps:
and the service server filters the data corresponding to the target URL from the data corresponding to the Uniform Resource Locators (URLs) according to the indication information of the target URL.
In yet another possible implementation of the fourth aspect, the method further comprises:
the service server sends the identity information of the service server to the computing node;
the computing node receives the identity information of the service server;
the aggregating, by the computing node, the statistical data based on the aggregation rule to obtain monitoring data of the first service includes:
the computing node aggregates the statistical data with the identity information of the service server based on the aggregation rule to obtain monitoring data of the first service; the monitoring data of the first service is used for describing the condition that the service server processes the first service.
In yet another possible embodiment of the fourth aspect, the target application is a JAVA development based application; the business server is deployed with a Java proxy Java agent, and when executing a target application, the business server calls the monitoring program to monitor data generated when the target application runs, and the method comprises the following steps:
the business server inserts the monitoring program into the Class of the target application through a Java byte code manipulation framework (ASM) based on the Java agent;
and when executing the Class of the target application, the service server calls the monitoring program to monitor data generated when the target application runs.
In yet another possible implementation of the fourth aspect, the target application is an application developed based on a hypertext preprocessor PHP; the service server deploys an extension plug-in of the PHP, and the service server calls the monitoring program to monitor data generated when the target application runs when executing the target application, and the method comprises the following steps:
the business server inserts the monitoring program into the bottom layer code of the target application based on the PHP extension plug-in;
and when the underlying code of the target application is executed, calling the monitoring program to monitor the data generated when the target application runs.
In yet another possible implementation of the fourth aspect, the method further comprises:
the monitoring configuration equipment monitors whether the monitoring strategy of the first service is updated or not;
if the first service is updated, the monitoring configuration equipment sends the updated statistical rule in the monitoring strategy of the first service to the service server and the computing node, and sends the updated aggregation rule in the monitoring strategy of the first service to the computing node.
In another possible implementation manner of the fourth aspect, the monitoring configuration device monitoring whether the monitoring policy of the first service is updated includes:
and the monitoring configuration equipment monitors whether the monitoring strategy of the first service is updated or not based on a reliable coordination system ZooKeeper of a distributed system.
In a fifth aspect, an embodiment of the present application discloses a service processing apparatus, including:
the receiving unit is used for receiving a statistical rule aiming at a first service and sent by the monitoring configuration equipment;
the processing unit is used for generating a monitoring program aiming at the first service according to the statistical rule, and the monitoring program is a computer program generated based on a non-invasive technology;
the processing unit is further used for calling the monitoring program to monitor data generated when the target application runs when the target application is executed; wherein the target application is an application for processing the first service;
the processing unit is further configured to count the data monitored by the monitoring program according to the statistical rule to obtain statistical data;
and the sending unit is used for sending the statistical data to a computing node, and the statistical data is used for aggregating on the computing node to obtain the monitoring data of the first service.
In a possible implementation manner of the fifth aspect, the statistical rule includes a filtering feature and a statistical index, and the processing unit is specifically configured to:
filtering the data monitored by the monitoring program according to the filtering characteristics to obtain target data;
and counting the target data according to the statistical indexes to obtain statistical data.
In yet another possible implementation manner of the fifth aspect, the data monitored by the monitoring program includes data corresponding to a plurality of uniform resource locators, and the filtering feature includes indication information of a target URL; the processing unit is specifically configured to filter data corresponding to the target URL from data corresponding to the multiple URLs according to the indication information of the target URL.
In yet another possible implementation manner of the fifth aspect, the sending unit is further configured to send the identity information of the service server to a computing node; the identity information of the service server is used for the computing node to aggregate the statistical data to obtain monitoring data of the first service; the monitoring data of the first service is used for describing the condition that the service server processes the first service.
In yet another possible embodiment of the fifth aspect, the target application is a JAVA development based application; the processing unit is specifically configured to:
inserting the monitoring program into the Class of the target application through a Java byte code manipulation framework (ASM) based on the Java agent;
and calling the monitoring program to monitor data generated during the running of the target application when the Class of the target application is executed.
In yet another possible implementation of the fifth aspect, the target application is an application developed based on a hypertext preprocessor PHP; the processing unit is specifically configured to:
inserting the monitoring program into the bottom layer code of the target application based on the PHP extension plug-in;
and when the underlying code of the target application is executed, calling the monitoring program to monitor the data generated when the target application runs.
In yet another possible implementation manner of the fifth aspect, the receiving unit is further configured to receive a statistical rule in the updated monitoring policy of the first service from the monitoring configuration device;
the processing unit is further configured to adjust the target program according to the updated statistical rule in the monitoring policy of the first service.
In a sixth aspect, an embodiment of the present application discloses a monitoring configuration apparatus, including:
the system comprises a processing unit, a monitoring unit and a processing unit, wherein the processing unit is used for generating a monitoring strategy of a first service, and the monitoring strategy of the first service comprises a statistical rule and an aggregation rule; the statistical rule is used for generating a monitoring program for the first service, and the monitoring program is used for monitoring data generated when a target application runs, wherein the target application is an application for processing the first service; the statistical rule is also used for carrying out statistics on the data monitored by the monitoring program to obtain statistical data; the aggregation rule is used for indicating a mode of aggregating the data counted by the statistical rule;
a sending unit, configured to send the aggregation rule to a computing node;
the sending unit is further configured to send the statistical rule to a service server.
In a possible implementation manner of the sixth aspect, the statistical rule includes a filtering feature and a statistical index, and the filtering feature is used for filtering target data from data monitored by the monitoring program; and the statistical indexes are used for carrying out statistics on the target data to obtain statistical data.
In yet another possible implementation of the sixth aspect, the filtering feature includes indication information of a target URL; and the indication information of the target URL is used for filtering the data corresponding to the target URL from the data corresponding to the plurality of Uniform Resource Locators (URLs).
In yet another possible implementation manner of the sixth aspect, the apparatus further includes a monitoring unit, configured to monitor whether the monitoring policy of the first service is updated;
the sending unit is further configured to send, if there is an update, the updated statistical rule in the monitoring policy of the first service to the service server, and send, to the computing node, the updated aggregation rule in the monitoring policy of the first service.
In another possible implementation manner of the sixth aspect, the monitoring unit is specifically configured to monitor whether the monitoring policy of the first service is updated based on a ZooKeeper of a reliable coordination system of a distributed system.
In a seventh aspect, an embodiment of the present application discloses a computing device, including:
the receiving unit is used for receiving an aggregation rule of statistical data aiming at a first service, which is sent by monitoring configuration equipment; the aggregation rule is used for indicating a mode of aggregating the data counted by the statistical rule;
the receiving unit is further configured to receive statistical data of the first service sent by a service server; the statistical data is data which is counted based on a statistical rule sent by the monitoring configuration equipment;
and the processing unit is used for aggregating the statistical data based on the aggregation rule to obtain the monitoring data of the first service.
In yet another possible implementation manner of the seventh aspect, the receiving unit is further configured to receive identity information of the service server sent by the service server;
the processing unit is specifically configured to aggregate the statistical data with the identity information of the service server based on the aggregation rule to obtain monitoring data of the first service; the monitoring data of the first service is used for describing the condition that the service server processes the first service.
In yet another possible implementation manner of the seventh aspect, the receiving unit is further configured to receive an aggregation rule in the updated monitoring policy of the first service, where the aggregation rule is sent by the monitoring configuration device;
the processing unit is further configured to aggregate statistical data from the service server according to an aggregation rule in the updated monitoring policy of the first service, so as to obtain updated monitoring data of the first service.
In an eighth aspect, an embodiment of the present application discloses a service monitoring system, including a monitoring configuration device, a service processing device, and a computing device, where:
the service server is the service processing apparatus described in the fifth aspect or any one of the possible embodiments of the fifth aspect;
the monitoring configuration apparatus is the monitoring configuration apparatus described in the sixth aspect or any one of the possible embodiments of the sixth aspect;
the computing node is the computing device described in the seventh aspect or any one of the possible implementations of the seventh aspect.
In a ninth aspect, an embodiment of the present application discloses a service server, where the service server includes a processor and a memory; the processor is configured to execute the memory-stored computer instructions to cause the server to implement the method as described in the first aspect or any one of the possible implementations of the first aspect.
In a tenth aspect, an embodiment of the present application discloses a service monitoring device, where the service monitoring device includes a processor and a memory; the processor is configured to execute the computer instructions stored in the memory, so that the traffic monitoring device implements the method described in the second aspect or any one of the possible embodiments of the second aspect.
In an eleventh aspect, an embodiment of the present application discloses a computing node, which includes a processor and a memory; the computing node is configured to execute the memory-stored computer instructions to cause the computing node to implement the method as described in the third aspect or any one of the possible implementations of the third aspect.
In a twelfth aspect, the present application discloses a computer-readable storage medium, in which computer instructions are stored, the computer instructions being configured to implement the method described in the first aspect or any one of the possible implementations of the first aspect, or to implement the method described in the second aspect or any one of the possible implementations of the second aspect, or to implement the method described in any one of the possible implementations of the third aspect.
It can be understood that, in the technical solutions of the second aspect and the following aspects, there are portions corresponding to the technical solutions of the first aspect, and corresponding beneficial effects may refer to the beneficial effects of the first aspect, which are not described herein again.
Drawings
The drawings used in the embodiments of the present application are described below.
FIG. 1 is a block diagram of a computer system according to an embodiment of the present disclosure;
FIG. 2 is a block diagram of a computer system according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a method of a service monitoring method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a monitoring strategy provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of monitored data provided by an embodiment of the present application;
fig. 6 is a schematic architecture diagram of a service monitoring system according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a service processing apparatus according to an embodiment of the present application;
FIG. 8 is a schematic structural diagram of a monitoring configuration apparatus according to an embodiment of the present disclosure;
FIG. 9 is a schematic structural diagram of a computing device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a service server provided in an embodiment of the present application;
fig. 11 is a schematic structural diagram of a monitoring configuration device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a compute node according to an embodiment of the present application.
Detailed Description
The embodiments of the present application will be described below with reference to the drawings. It is noted that, in the present application, words such as "exemplary" or "for example" are used to mean exemplary, illustrative, or descriptive. Any embodiment or design described herein as "exemplary" or "such as" is not necessarily to be construed as preferred or advantageous over other embodiments or designs, and the use of the word "exemplary" or "such as" is intended to present relevant concepts in a concrete fashion.
The related art and terminology related to this application will be briefly introduced below to facilitate understanding.
First, JAVA Virtual Machine (JVM)
The JVM is a specification for a computing device, usually an imaginary computer, implemented by emulating and simulating various computer functions on an actual computer. The Java virtual machine includes a set of bytecode instruction sets, a set of registers, one or more stacks, one or more garbage collection files, and one or more storage method domains. The JVM shields information related to a specific operating system platform, so that Java programs can be run on a variety of platforms without modification by only generating object codes (bytecodes) to be run on the Java virtual machine. The JVM, when executing bytecodes, actually eventually interprets the bytecodes into machine instruction execution on a particular platform.
Two, Java byte code operation frame ASM
ASM can be used to dynamically generate classes or to enhance the functionality of existing classes. The ASM can either directly generate the binary class file or dynamically change the class behavior before the class is loaded into the Java virtual machine. Java class is stored in a strictly format defined class file, which has enough metadata to parse all the elements in the class: class name, method, attribute, and Java bytecode (instruction). After the ASM reads information from the class file, the ASM can change class behaviors, analyze class information and even generate a new class according to user requirements.
The classes file can be correctly executed by a Java virtual machine. The Java probe uses Java bytecode enhancement technology to construct a service-independent agent (agent) for monitoring and assisting programs running on the JVM, and even can dynamically replace and modify the definition of some classes. Thereby realizing code-level service performance monitoring and fault location.
Third, Uniform Resource Locator (URL)
A URL is a compact representation of the location and access method to a resource available from the internet, and is the address of a standard resource on the internet. Each file on the internet has a unique URL that contains information indicating the location of the file and how the browser should handle it.
Four, non-invasive technique
The non-invasive technique refers to a technique for achieving a certain service target (such as monitoring, diagnosis and the like) of a software program without modifying an original service code, and is also called a non-invasive technique. For example, JAVA bytecode enhancement technology, wherein section enhancement means that JAVA bytecode is modified after being generated to enhance the function thereof in a manner equivalent to modifying the binary file of the application. The application scene of Java bytecode enhancement is mainly to reduce redundant codes and shield the implementation details of the bottom layer for developers.
Five, Servlet
Servlet (server applet), a short name for Java Servlet, is called Servlet or service connector, is a server-side program written in Java, has platform and protocol independent characteristics, and has the main functions of interactively browsing and generating data to generate dynamic Web content. The Servlet may intercept data received and transmitted by an Application Programming Interface (API), and record access to the URL by other devices. Specifically, the Servlet may dynamically modify the bytecode of the Servlet implementation class and insert the monitoring code when the Web application runs. The monitoring code can automatically complete triggering when the Web application is accessed, and the access of each URL is recorded. For example, the Servlet may intercept at a hypertext transfer protocol (HTTP) request entry.
The system architecture and service scenario of the embodiment of the present application are described below. It should be noted that the system architecture and the service scenario described in the present application are for more clearly illustrating the technical solution of the present application, and do not constitute a limitation to the technical solution provided in the present application, and as a person having ordinary skill in the art knows, along with the evolution of the system architecture and the appearance of a new service scenario, the technical solution provided in the present application is also applicable to similar technical problems.
Referring to fig. 1, fig. 1 is a schematic architecture diagram of a computer system, which includes a service processor 101, a database 102, and a computing node 103, where the service processor 101 is configured to implement a service application, the database 102 is configured to store part or all of data output by a service center, and the computing node 103 is configured to compute data output by the service center.
In the process of monitoring the service processed by the service processor 101, the service problem is monitored by analyzing the log. Specifically, a log record code is added to a service code of the service processor 101, a log file is obtained in real time or at regular time through the log record code, the log file is stored in the database 102, and then service monitoring is performed according to analysis of the log file, or the log file is calculated by the calculation node 103, and a calculated result is stored in the database 102. In such a monitoring mode, a developer adds a monitoring code when developing a system, and specifies a monitoring position on the code, so that the setting and maintenance cost is high, the development workload is large, and the service monitoring efficiency is low. On the other hand, the logging and analyzing work for the log also consumes a lot of machine resources, such as extra requirements for the database 102 and a lot of business data.
To solve this problem, the embodiment of the present application further proposes an architecture of a computer system as shown in fig. 2.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a computer system provided in the embodiment of the present application, where the computer system includes a monitoring configuration device 201, a service server 202, a computing node 203, and optionally, a database 204.
The monitoring configuration device 201 is an electronic device with data processing capability and data transceiving capability, and may be a physical device such as a host, a server, or the like, or may be a virtual device such as a virtual machine, a container, or the like. The monitoring configuration device 201 is configured to configure a monitoring policy, where the monitoring policy includes a statistical rule and an aggregation rule. The monitoring configuration device 201 may send the monitoring policy to the service server 202 and the computing node 203, specifically, the statistical rule may be used for the service server 202 to generate a non-intrusive monitoring program, the statistical rule may also be used for the service server 202 to perform statistics on data monitored by the monitoring program to obtain statistical data, and the aggregation rule is used for the computing node 203 to aggregate the statistical data to obtain monitoring data of the service. It is to be understood that, in different implementation scenarios, the monitoring configuration device 201 may also be referred to as a monitoring configuration center, a registry, a configuration center, and the like, but for convenience of description, in this embodiment of the present application, the device that generates the monitoring policy is referred to as a monitoring configuration device.
The service server 202 is a device for performing service processing, and can generally implement application for processing a service, and various data may be processed in the implementation process of processing the service, and may also be referred to as a service side or a server side. For example, a certain e-commerce shopping application can implement ordering through the service server 202, a user submits an order through a terminal such as a mobile phone or a computer, the service server 202 processes the order submitted by the user, and an ordering result is returned to the terminal such as the mobile phone or the computer of the user, so that the order processing service is completed. It will be appreciated that a variety of order data exists during order submission, such as the name of the goods, the amount of the order, the shipping address, and so forth. In this embodiment, the service processing apparatus may generate a non-intrusive monitoring program according to a statistical rule sent from the monitoring configuration center, and the statistical rule may also be used by the service server 202 to perform statistics on data monitored by the monitoring program to obtain statistical data. Further, the statistical data may be sent to the compute nodes 203 for aggregation.
The computing node 203 is a device for providing computing services, and may be an entity device such as a host, a server, or the like, or may be a virtual device such as a virtual machine, a container, or the like. In this embodiment, the computing node 203 may aggregate the statistical data according to an aggregation rule generated by the monitoring configuration device 201, so as to obtain the monitoring data of the service.
The database 204 is a data storage device, and may be configured to store monitoring data of the service aggregated by the computing node 203, for subsequent presentation or reporting of service processing performance. Alternatively, the database 204 may be deployed integrally with the computing node 203 or separately from the computing node 203.
It can be understood that, for convenience of description in fig. 2, each apparatus is represented by one device, and in a specific processing procedure, the number of each device may also be one or multiple, for example, the service server 202 may be implemented by one server, or implemented by a server cluster formed by multiple servers. Further, the devices in fig. 2 may also be integrated in the same device, for example, the monitoring configuration device 201 and the computing node 203 may also be integrated in the same server or host. In addition, the connection of each device in fig. 2 may be through a wired connection (for example, but not limited to, a coaxial cable, an optical fiber, a digital subscriber line, and the like), or through a wireless connection (for example, but not limited to, bluetooth, a wireless lan, a mobile device network, and the like).
Referring to fig. 3, fig. 3 is a flowchart illustrating a business monitoring method according to an embodiment of the present application, where the method may be implemented based on the computer system shown in fig. 2, and the method includes, but is not limited to, the following steps:
step S301: the monitoring configuration equipment generates a monitoring strategy of the first service, wherein the monitoring strategy of the first service comprises a statistical rule and an aggregation rule.
Specifically, the monitoring policy refers to monitoring the operation state, processing condition, and the like of a certain service. For example, whether the order downloading service module is operating normally is monitored, and for example, service monitoring such as monitoring the total number of orders committed in a live broadcast sharing manner, monitoring the total amount of orders processed per hour of a certain server, monitoring the total amount of orders traded on the current day, and the like is monitored.
The monitoring policy may further include statistical rules and aggregation rules. The statistical rule may be used to indicate which data needs to be counted, for example, the parameter needs to be counted is the order quantity or the order amount, and for example, the statistical manner is to add 1 every time an order is made, or add up the parameter values, and so on.
Optionally, the statistical rule may further include a filtering feature and a statistical index. The filtering feature is used to select data to be counted from the plurality of items of data, and specifically may be used to filter out an Application Programming Interface (API) call that needs to be counted. For example, the filtering characteristics may include a need Uniform Resource Locator (URL), an in-argument, an out-argument, Metadata (Metadata), and the like. Where the URL is used to indicate a filtered call link, such as an API call where the statistical URL includes "post/order".
The statistical indicator may indicate the manner in which the data that needs to be counted is counted. Further alternatively, the statistical index in the embodiment of the present application may include a statistical target (Metrics), a statistical type, a statistical result name, a statistical dimension, and the like, for example, an order amount (orderAmount) is set as the statistical target (Metrics), the statistical type may include counting an actual amount of money that is ordered each time, the statistical type may include counting (counter), meter (Gauge), Histogram (Histogram), or sum (sum), and the like, the statistical result name may be "total _ order _ amount", and the statistical dimension is used to perform fine-grained differentiation on the index based on the dimension (for example, Internet Protocol (IP) address granularity to indicate which server is counted).
Aggregation rules are used to indicate the way data that is counted by a statistical rule is aggregated. For example, the server is pre-aggregated by IP address, and the counter value of orderamouunt after aggregation is calculated by minute granularity.
Optionally, the monitoring policy of the first service may further include other information, for example, a policy name, a monitoring application, or a storage manner, and the like. For example, referring to fig. 4, fig. 4 is a schematic diagram of a possible monitoring policy provided in an embodiment of the present application, where the monitoring policy is used to monitor an "order" application, and as can be seen from information in an area 401, a filtering feature of the monitoring policy of the service includes a URL "post/order", and may also include a name of the product; the statistical index of the monitoring strategy of the service can indicate that the statistical target is order amount (orderAmount), the statistical type is sum of order amounts (summery), the total result is total amount, and the statistical dimension is that statistics is carried out according to IP. As can be seen from the information in the area 402, the aggregation rule of the service is aggregation based on the granularity of the server IP, and optionally, the aggregated data may be stored in the database 1.
Alternatively, the monitoring policy may be a monitoring policy generated by receiving information input by a user. For example, operation and maintenance personnel of an enterprise select a service to be monitored according to requirements, and after an application name, a statistical rule, an aggregation rule and the like are input, monitoring configuration equipment generates a monitoring strategy according to the input information.
Step S302: and the monitoring configuration equipment sends the statistical rule to the service server.
Specifically, the statistical rule is a statistical rule for the first traffic. The monitoring configuration device and the service server can be in communication connection through a data link, so that the monitoring configuration device can send the statistical rule to the service server, and correspondingly, the service server receives the information from the monitoring configuration device, so that the statistical rule is obtained.
Optionally, the data link for the monitoring configuration device to communicate with the service server may include various types of connection media, for example, a limited link such as an optical fiber link, and may also be a long-distance connection technology including a global system for mobile communications (GSM), a General Packet Radio Service (GPRS), a Universal Mobile Telecommunications System (UMTS), and other radio access technologies. Still further examples of short-range connectivity technologies include 802.11b/g, bluetooth (blue tooth), zigbee (zigbee), Radio Frequency Identification (RFID), and Ultra Wideband (UWB) technologies. Further optionally, when the monitoring configuration device and the service server are deployed in the same electronic device, for example, on the same server, the monitoring configuration device and the service server may communicate through a system bus, a storage medium, and the like. Of course, it is not excluded that there are other techniques that may be used to support the monitoring configuration device in communication with the traffic server, such that the traffic server receives the statistical rules from the monitoring configuration device.
Optionally, the monitoring configuration device may send a monitoring policy to the service server, where the monitoring policy includes a statistical rule. And after receiving the monitoring strategy from the monitoring configuration center, the service server analyzes the monitoring strategy to obtain the statistical rule.
Step S303: the monitoring configuration device sends the aggregation rule to the computing node.
Specifically, the aggregation rule is an aggregation rule for the first traffic. The monitoring configuration device and the computing node can be in communication connection through a data link, so that the monitoring configuration device can send the aggregation rule to the computing node, and correspondingly, the computing node receives the information from the monitoring configuration device, so that the aggregation rule is obtained. It is understood that the data link for the monitoring and configuration device to communicate with the computing node may also include various types of connection media, which are not described herein.
Optionally, the monitoring configuration device may send a monitoring policy to the computing node, where the monitoring policy includes an aggregation rule. After receiving the monitoring strategy from the monitoring configuration center, the computing node analyzes the monitoring strategy to obtain the aggregation rule.
Step S304: the service server generates a monitoring program according to the statistical rule; the monitoring program is a computer program generated based on a non-intrusive technique.
Specifically, the computer program generated based on the non-intrusive technology may not modify the code originally implementing the business function, but insert the monitoring program into the executed code through the underlying code (such as JAVA bytecode) before the code of the business function is called, and modify the bytecode at the execution stage, so that the non-intrusive of the original code can be implemented.
For example, if the application for processing the service is an application developed based on JAVA, the service server may generate a monitoring program (in the form of bytecode) based on a JAVA agent according to a statistical rule, where the monitoring program may match class names and/or method names when the code of the application for processing the service is loaded into a JAVA virtual machine, and then insert the monitoring program at a corresponding class or method (for example, modify the class code to add the code into the monitoring program, or embed the class code at a certain place), so as to monitor the service data.
For another example, if the application for processing the service is an application developed based on a hypertext preprocessor (PHP), the service server may generate a monitor (the monitor is in an underlying code form) based on the PHP extension. The monitoring program can implant monitoring logic in the form of a hook function at the entrance of the code of the application for processing the service through a plug-in mechanism of the PHP so as to realize the monitoring of the service data.
Alternatively, the monitoring program may be implemented based on Servlet technology. The Servlet can dynamically modify byte codes of Servlet implementation classes and insert monitoring codes when the Web application runs, so that a monitoring program can be generated based on Servlet technology and according to statistical rules, and the access of other equipment to the URL is recorded by intercepting the data transmitted and received through the API.
Optionally, the service server may be configured or defined with a partial code that can be used to implement the monitoring program in advance, and after obtaining the statistical rule, configure some or all parameters in the statistical rule in the code, thereby obtaining the monitoring program. Further, based on the monitoring rule, the monitoring program may monitor data generated during the operation of the target application according to the indication of the statistical rule after the target application is inserted.
Step S305: and the service server calls a monitoring program to monitor data generated when the target application runs when the target application is executed.
Specifically, the target application is an application for processing the first service, and the service server may process various data in the process of processing the first service by executing the target application. For example, a certain e-commerce shopping application can realize ordering through a service server, a user submits an order through a mobile phone or a computer and other terminals, the service server processes the order submitted by the user and returns an ordering result to the mobile phone or the computer and other terminals of the user, and therefore the order processing service is completed. It will be appreciated that a variety of order data exists during order submission, such as the name of the goods, the amount of the order, the shipping address, and so forth.
The service server can monitor the data generated by the target application in operation by calling the monitoring program. For example, the service server may generate a monitoring program (in the form of bytecode) based on a JAVA agent (JAVA agent) according to statistical rules, where the monitoring program may match class names and/or method names when code of an application that processes the service is loaded into the JAVA virtual machine, modify a corresponding class or method (e.g., modify a class code to join the code of the monitoring program, or bury the class code), and monitor service data.
For another example, if the application for processing the service is an application developed based on PHP, the service server may generate a monitor (the monitor is in the form of an underlying code) based on the PHP extension. The monitoring program can implant monitoring logic in the form of a hook function at the entrance of a code of an application for processing the service through a plug-in mechanism of the PHP, and then call the monitoring logic to realize monitoring of the service data when the service code is executed.
Step S306: and the service server counts the data monitored by the monitoring program through the statistical rule to obtain statistical data.
Specifically, the statistical rule indicates a statistical manner of data to be counted. Further, the statistical indexes in the statistical rule in the embodiment of the present application may include statistical targets, statistical types, statistical result names, statistical dimensions, and the like. The service server can count the statistical target according to the statistical type and the statistical dimension to obtain a statistical result, and the name of the statistical result is set as the name of the statistical result.
Optionally, the statistical rule may include a filtering characteristic and a statistical index, and the service server may filter the data monitored by the monitoring program according to the filtering characteristic to obtain target data, and then perform statistics on the target data according to the statistical index to obtain statistical data. For example, referring to fig. 5, fig. 5 is data obtained by monitoring, where the filtering characteristic is that the URL is "post/order" and the ordering result is successful (i.e., the return status is 200) as an example, as seen in a region 501, the URL of the 1 st monitored data is "post/cart" and thus is not the target data; referring to the area 502, it can be seen that the 2 nd piece of monitoring data has a return status of 400, belongs to an order with failed creation, and is therefore not target data; referring to the information in the area 503, the area 504, and the area 505, it can be known that the 3 rd, the 4 th, and the 5 th monitored data are target data, and therefore statistics is performed according to the statistical rule. For example, taking the statistical target as the total amount of orders (orderAmount), the statistical type as the sum (sum), the statistical granularity as the statistics according to the IP address, and the statistical result as the total amount (total _ order _ amount) as an example, it can be seen that the server address with the IP address of "192.168.1.1" monitors 3 orders, the amounts are 6000, 4000, and 4000, respectively, and thus the total amount of orders is 14000, that is: total _ order _ amount is 14000.
Step S307: and the service server sends the statistical data to the computing node.
Specifically, the service server and the computing node may be in communication connection through a data link, so that the service server may send the statistical data to the computing node, and correspondingly, the computing node receives the information from the service server, thereby obtaining the statistical data. It is understood that the data link through which the service server communicates with the computing node may also include various types of connection media, which are not described in detail herein.
Optionally, the service server may report the data according to a preconfigured or defined period. Specifically, the service server may asynchronously report the statistical data to the computing node, for example, once per minute. Further optionally, the buffer is emptied after the result is reported once every minute, and statistics is carried out again.
For example, the reported data may be: "total _ order _ amount 14000{ ip ═ 192.168.1.1" }1395066363000 ". Wherein, total _ order _ amount is the name of the statistical result, ip address is the statistical dimension of the data, 14000 is the statistical data value, and 1395066363000 is the time stamp.
Step S308: and the computing node generates monitoring data of the first service according to the statistical data based on the aggregation rule.
Specifically, the computing node receives statistical data from the service server, and generates monitoring data of the first service according to the statistical data based on the aggregation rule. For example, the aggregation rule of the computing node is that statistical data values in the statistical data are accumulated, if the statistical data values reported by 3 service servers received by the computing node within 1 minute are 14000, 10000 and 10000 respectively, the node accumulates the data values to obtain 34000, where 34000 is monitoring data of the first service, and represents that the total amount of placing orders within one minute is 34000.
Optionally, after receiving the statistical data, the computing node may compare aggregation rules in the monitoring policy to detect whether there is a configuration of service monitoring for the application. If not, the time sequence data is directly stored in the time sequence data base according to the original calculation format. And if so, performing aggregation according to an aggregation rule.
Optionally, the computing node may implement real-time computing based on the frienk (Flink) technique.
Optionally, the service server may also send identity information of the service server to the computing node, for example, send an IP address, a device identifier, a device number, and the like of the service server. Further, the computing node may aggregate the statistical data with the identity information of the service server based on the aggregation rule to obtain monitoring data of the first service; the monitoring data of the first service is used for describing the condition that the service server processes the first service. For example, after receiving the reported data, the computing node may aggregate the reported data according to the IP addresses as granularity, and count the total amount of the orders processed per minute in the server corresponding to each IP address.
Optionally, the calculation may aggregate the total amount of orders processed in the server corresponding to each IP address according to the statistical data about the total amount of orders, so as to facilitate allocation of calculation power, and adjust part of the orders that have not been processed to the servers with fewer orders processed per minute.
Optionally, the monitoring data may be further stored in a database, and used for the upper layer application to call for display or early warning.
Optionally, data may be visualized in the computing node through a front-end application, for example, a report, a histogram, a line graph, and the like are generated, so that operation and maintenance personnel can conveniently view a monitoring result of a service.
Optionally, a monitoring module may be present in the monitoring configuration device, and configured to monitor whether the policy is updated. Further optionally, when the policy is updated, the monitoring configuration device may send the updated monitoring policy (or specifically, the statistical rule in the monitoring policy) to the service server, and send the updated monitoring policy (or specifically, the aggregation rule in the monitoring policy) to the compute node. For example, after the monitoring configuration device generates the monitoring policy, the monitoring policy may be recorded as a persistent node by a ZooKeeper in a reliable coordination system of the distributed system, and the ZooKeeper may be used to monitor the update of the monitoring policy. Further, the service server and/or the monitoring node may perform the monitoring policy by connecting to the ZooKeeper. If receiving the update of the monitoring policy, the service server and/or the monitoring node may dynamically obtain the updated value to update the local operation.
Optionally, the service server receives a statistical rule in the updated monitoring policy of the first service from the monitoring configuration device; and adjusting the target program according to the updated statistical rule in the monitoring strategy of the first service. Or, the computing node is configured to empty the local cache when the monitoring policy is updated.
Optionally, the computing node may receive an aggregation rule in the updated monitoring policy of the first service from the monitoring configuration device; and aggregating the statistical data from the service server according to the aggregation rule in the updated monitoring strategy of the first service to obtain updated monitoring data of the first service. Or, the computing node is configured to clear the local cache when the monitoring policy is updated, wait for newly reported data, and count the newly reported data based on the aggregation rule in the updated monitoring policy.
In the method described in fig. 3, the service end generates the monitoring program according to the statistical rule configured by the configuration center, so that various codes can be generated according to the monitoring requirements of the operation and maintenance personnel, developers do not need to develop corresponding non-invasive monitoring programs according to the requirements, the implementation codes of the service system do not need to be modified, non-invasive monitoring is achieved, the workload of the developers is reduced, and the situations that the operation of the main program is affected by the time consumption of calling an external monitoring program by the main program and the problems of the monitoring program are avoided.
In addition, the locally acquired data are counted and then sent to the computing node, the data can be preprocessed, a large amount of data are prevented from being processed in the computing node, the workload of the computing node for processing a single service end is reduced, and therefore the computing node can collect data uploaded by more service ends.
Referring to fig. 6, fig. 6 is a schematic diagram of an architecture of a service monitoring system according to an embodiment of the present application, where the service monitoring system may be implemented based on the architecture shown in fig. 2, and the service monitoring system may be used to implement the service monitoring method shown in fig. 3. Wherein the dynamic configuration center 601 may be implemented based on the monitoring configuration device 201, the at least one server 602 may correspond to the server 602, the real-time computation engine 603 may correspond to the computation node, and the timing database 604 may be implemented based on the database 204.
Wherein, the dynamic configuration center 601 can generate a monitoring policy and send the monitoring policy to at least one of the service 602 and the real-time computing engine 603. After the dynamic configuration center 601 generates the monitoring policy, the monitoring policy may be recorded as a persistent node through a ZooKeeper, and the server 602 and the real-time computing engine 603 may monitor the monitoring policy by connecting the ZooKeeper.
At least one server 602 takes the ordering application using the micro-service framework of spring cloud as an example, the application uses "/order" as the application interface for ordering, and the return 200 indicates that the ordering is successful. The at least one server 502 may generate a monitoring program based on a bytecode-enhanced ASM technique and a Servlet technique according to a monitoring policy, and the application may dynamically intercept the following methods:
interception: spring frame, web server, framework servlet,
the interception method comprises the following steps:
1)doGet(HttpServletRequest,HttpServletResponse)
2)doPost(HttpServletRequest,HttpServletResponse)
the method comprises the steps of receiving a request parameter, wherein the request parameter comprises a request parameter, a request parameter and a return parameter, wherein the request parameter comprises a request parameter, and the return parameter comprises a request parameter.
Optionally, the server 602 may detect whether the target application has a corresponding monitoring policy according to an application name in the monitoring policy (if not, the monitoring policy is detected again after sleeping for a period of time), if the monitoring policy corresponding to the target application exists, at least one server 602 intercepts the API through a java agent after receiving the API request (specifically, the API in the return stage may be intercepted only), filters (or matches the features) according to a statistical rule (specifically, the filtering features in the statistical rule may be filtered), and only when data (which may include a URL name, metadata, other parameters, and the like) corresponding to the URL matches the filtering features, takes out the data corresponding to the URL as the target data. Optionally, in this embodiment of the present application, only data whose processing is successful may be intercepted, for example, only data whose return value is 200 (the return value 200 indicates that the processing result is successful) is fetched.
Data are obtained in the http server request, and statistics are performed based on the statistical rules of the configuration center. And if summing (sum) statistics are carried out, summing according to the statistical dimension to obtain statistical data.
The real-time computing engine 603 obtains the monitoring policy sent by the dynamic configuration center 601, or may monitor the monitoring policy of the dynamic configuration center 601 through ZooKeeper. Alternatively, the real-time computation engine 603 may implement real-time computation based on Flink technology. After receiving the statistical data reported by the server 602, the real-time computing engine 603 compares whether there is a monitoring policy corresponding to the application. If there is no corresponding monitoring policy, the statistical data is stored in the time sequence database 604 according to the original format of the reported statistical data. If the corresponding monitoring strategy exists, the aggregation is carried out in the real-time computing engine according to the aggregation rule in the monitoring strategy, and then the time sequence database 604 is stored. The timing database 604 can be used for the upper layer application to call its data for alarm or presentation.
Optionally, data may be visualized in the computing node through a front-end application, for example, a report, a histogram, a line graph, and the like are generated, so that operation and maintenance personnel can conveniently view a monitoring result of a service.
The method of the embodiments of the present application is set forth above in detail and the apparatus of the embodiments of the present application is provided below.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a service processing apparatus 70 according to an embodiment of the present disclosure, where the service processing apparatus may be an electronic device with data processing capability and data transceiving capability, and may also be a device in the electronic device with data transceiving capability, such as a chip or an integrated circuit. The service processing apparatus 70 may include a receiving unit 701, a processing unit 702, and a transmitting unit 703, and the detailed description of each unit is as follows:
a receiving unit 701, configured to receive a statistical rule for a first service sent by a monitoring configuration device;
a processing unit 702, configured to generate a monitoring program for the first service according to the statistical rule, where the monitoring program is a computer program generated based on a non-intrusive technology;
the processing unit 702 is further configured to invoke the monitoring program to monitor data generated when the target application runs when the target application is executed; wherein the target application is an application for processing the first service;
the processing unit 702 is further configured to count, according to the statistical rule, data monitored by the monitoring program to obtain statistical data;
a sending unit 703 is configured to send the statistical data to a computing node, where the statistical data is used to aggregate on the computing node to obtain monitoring data of the first service.
In a possible implementation manner, the statistical rule includes a filtering feature and a statistical indicator, and the processing unit 702 is specifically configured to:
filtering the data monitored by the monitoring program according to the filtering characteristics to obtain target data;
and counting the target data according to the statistical indexes to obtain statistical data.
In yet another possible implementation, the data monitored by the monitoring program includes data corresponding to a plurality of Uniform Resource Locators (URLs), and the filtering feature includes indication information of a target URL; the processing unit 702 is specifically configured to filter, according to the indication information of the target URL, data corresponding to the target URL from the data corresponding to the multiple URLs.
In yet another possible implementation manner, the sending unit 703 is further configured to send, to a computing node, identity information of the service server; the identity information of the service server is used for the computing node to aggregate the statistical data to obtain monitoring data of the first service; the monitoring data of the first service is used for describing the condition that the service server processes the first service.
In yet another possible embodiment, the target application is a JAVA development based application; the processing unit 702 is specifically configured to:
inserting the monitoring program into the Class of the target application through a Java byte code manipulation framework (ASM) based on the Java agent;
and calling the monitoring program to monitor data generated during the running of the target application when the Class of the target application is executed.
In yet another possible embodiment, the target application is an application developed based on a hypertext preprocessor PHP; the processing unit 702 is specifically configured to:
inserting the monitoring program into the bottom layer code of the target application based on the PHP extension plug-in;
and when the underlying code of the target application is executed, calling the monitoring program to monitor the data generated when the target application runs.
In yet another possible implementation, the receiving unit 702 is further configured to receive a statistical rule in the updated monitoring policy of the first service from the monitoring configuration device;
the processing unit 703 is further configured to adjust the target program according to a statistical rule in the updated monitoring policy of the first service.
It should be noted that the implementation of each unit may also correspond to the corresponding description of the embodiment shown in fig. 3. The device 70 may be a service server in the embodiment shown in fig. 3.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a monitoring configuration apparatus 80 according to an embodiment of the present disclosure, where the monitoring configuration apparatus 80 may be an electronic device with data processing capability and data transceiving capability, or may be a device, such as a chip or an integrated circuit, in the electronic device with data transceiving capability. The monitoring and configuration device 80 may include a processing unit 801 and a transmitting unit 802, each of which is described in detail as follows:
a processing unit 801, configured to generate a monitoring policy of a first service, where the monitoring policy of the first service includes a statistical rule and an aggregation rule; the statistical rule is used for generating a monitoring program for the first service, and the monitoring program is used for monitoring data generated when a target application runs, wherein the target application is an application for processing the first service; the statistical rule is also used for carrying out statistics on the data monitored by the monitoring program to obtain statistical data; the aggregation rule is used for indicating a mode of aggregating the data counted by the statistical rule;
a sending unit 802, configured to send the aggregation rule to a computing node;
the sending unit 802 is further configured to send the statistical rule to a service server.
In a possible implementation manner, the statistical rule includes a filtering feature and a statistical index, wherein the filtering feature is used for filtering target data from data monitored by the monitoring program; and the statistical indexes are used for carrying out statistics on the target data to obtain statistical data.
In yet another possible implementation, the filtering feature includes indication information of a target URL; and the indication information of the target URL is used for filtering the data corresponding to the target URL from the data corresponding to the plurality of Uniform Resource Locators (URLs).
In yet another possible implementation, the apparatus further includes a monitoring unit 803, where the monitoring unit 803 is configured to monitor whether the monitoring policy of the first service is updated;
the sending unit 802 is further configured to send, if there is an update, the updated statistical rule in the monitoring policy of the first service to the service server, and send, to the computing node, the updated aggregation rule in the monitoring policy of the first service.
In another possible implementation manner, the monitoring unit 803 is specifically configured to monitor whether the monitoring policy of the first service is updated based on a ZooKeeper of a reliable coordination system of a distributed system.
It should be noted that the implementation of each unit may also correspond to the corresponding description of the embodiment shown in fig. 3. The apparatus 80 may be a monitoring arrangement in the embodiment shown in fig. 3.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a computing device 90 according to an embodiment of the present disclosure, where the computing device 90 may be an electronic device with data processing capability and data transceiving capability, and may also be a device in the electronic device with data transceiving capability, such as a chip or an integrated circuit. The computing device 90 may include a receiving unit 901 and a processing unit 902, each of which is described in detail as follows:
a receiving unit 901, configured to receive an aggregation rule of statistical data for a first service sent by a monitoring configuration device; the aggregation rule is used for indicating a mode of aggregating the data counted by the statistical rule;
the receiving unit 901 is further configured to receive statistical data of the first service sent by a service server; the statistical data is data which is counted based on a statistical rule sent by the monitoring configuration equipment;
a processing unit 902, configured to aggregate the statistical data based on the aggregation rule, so as to obtain monitoring data of the first service.
In yet another possible implementation manner, the receiving unit 901 is further configured to receive the identity information of the service server sent by the service server;
the processing unit 902 is specifically configured to aggregate the statistical data with the identity information of the service server based on the aggregation rule, so as to obtain monitoring data of the first service; the monitoring data of the first service is used for describing the condition that the service server processes the first service.
In yet another possible implementation manner, the receiving unit 901 is further configured to receive an aggregation rule in the updated monitoring policy of the first service, where the aggregation rule is sent by the monitoring configuration device;
the processing unit 901 is further configured to aggregate statistical data from the service server according to an aggregation rule in the updated monitoring policy of the first service, so as to obtain updated monitoring data of the first service.
It should be noted that the implementation of each unit may also correspond to the corresponding description of the embodiment shown in fig. 3. The computing device 90 may be a computing node in the embodiment shown in fig. 3.
Referring to fig. 10, fig. 10 is a schematic structural diagram of a service server 100 according to an embodiment of the present application. The service server 100 may include at least one memory 1001 and at least one processor 1002. Optionally, the service server 100 may further include a bus 1003, and the at least one memory and the at least one processor may be connected through the bus 1003. Further, a communication interface 1004 may be included, wherein the memory 1001, the processor 1002, and the communication interface 1004 are connected via a bus 1003.
The memory 1001 is used to provide a storage space, and data such as an operating system and a computer program may be stored in the storage space. The memory 1001 includes, but is not limited to, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a portable read-only memory (CD-ROM).
The processor 1002 is a module for performing arithmetic operations and/or logical operations, and may specifically be one or a combination of multiple processing modules such as a Central Processing Unit (CPU), a picture processing unit (GPU), a Microprocessor (MPU), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), a Complex Programmable Logic Device (CPLD), and the like.
The communication interface 1004 is used for receiving and/or transmitting data from/to the outside, and may be a wired link interface such as an ethernet cable, or a wireless link (Wi-Fi, bluetooth, etc.) interface. Optionally, the communication interface 1004 may also include a transmitter (e.g., a radio frequency transmitter, an antenna, etc.), or a receiver, etc. coupled to the interface.
The processor 1002 in the service server 100 is configured to read the computer instructions stored in the memory 1001, and is configured to execute the aforementioned service monitoring method, such as the service monitoring method described in the embodiment shown in fig. 3.
For example, the processor 1002 in the service server 100 is configured to read the computer instructions stored in the memory 1001, and is configured to perform the following operations:
receiving a statistical rule for a first service sent by a monitoring configuration device through a communication interface 1004;
generating a monitoring program aiming at the first service according to the statistical rule, wherein the monitoring program is a computer program generated based on a non-invasive technology;
calling the monitoring program to monitor data generated when the target application runs when the target application is executed; wherein the target application is an application for processing the first service;
counting the data monitored by the monitoring program according to the statistical rule to obtain statistical data;
sending the statistical data to a computing node through a communication interface 1004, where the statistical data is used for aggregating on the computing node to obtain monitoring data of the first service.
By implementing the embodiment of the application, the service end generates the monitoring program according to the statistical rule configured by the configuration center, so that the monitoring program can be generated according to the monitoring requirement of operation and maintenance personnel, developers do not need to develop the corresponding invasive monitoring program according to the requirement, the implementation codes of the service system do not need to be modified, the non-invasive monitoring is realized, and the workload of the developers is reduced.
In addition, the service end firstly preprocesses locally acquired data, and the obtained statistical data are sent to the computing node, so that the processing of a large amount of data in the computing node is avoided, the workload of the computing node for processing a single service end is reduced, and the computing node can gather more data uploaded by the service end.
In a possible implementation manner, the statistical rule includes a filtering feature and a statistical index, and the processor 1002 is specifically configured to:
filtering the data monitored by the monitoring program according to the filtering characteristics to obtain target data;
and counting the target data according to the statistical indexes to obtain statistical data.
The specific method in the data statistics process is described above, and the data to be counted is filtered according to the filtering characteristics, and then the data is counted according to the manner indicated in the statistical index, so as to obtain the statistical data. For example, the monitoring program may monitor that order data of a plurality of commodities passes through, so that the commodity ID "a 001" may be added to the filtering feature, and order data with the commodity ID "a 0001" may be filtered from the order data of the commodities, so as to perform statistics on the order data of the commodities to obtain statistical data.
In yet another possible implementation, the data monitored by the monitoring program includes data corresponding to a plurality of Uniform Resource Locators (URLs), and the filtering feature includes indication information of a target URL; the processor 1002 is specifically configured to:
and filtering the data corresponding to the target URL from the data corresponding to the plurality of Uniform Resource Locators (URLs) according to the indication information of the target URL.
The foregoing describes a specific method for filtering data according to a URL, for example, a monitoring program may monitor URLs and data corresponding to the URLs, so that a URL "post/order" may be added to a filtering feature, so that data corresponding to the URL "post/order" may be filtered from data corresponding to a plurality of URLs, and the data corresponding to the URL may be counted to obtain statistical data.
In yet another possible implementation, the processor 1002 is further configured to:
sending the identity information of the service server to the computing node through a communication interface 1004; the identity information of the service server is used for the computing node to aggregate the statistical data to obtain monitoring data of the first service; the monitoring data of the first service is used for describing the condition that the service server processes the first service.
In yet another possible embodiment, the target application is a JAVA development based application; the processor 1002 is specifically configured to:
inserting the monitoring program into the Class of the target application through a Java byte code manipulation framework (ASM) based on the Java agent;
and calling the monitoring program to monitor data generated during the running of the target application when the Class of the target application is executed.
In yet another possible embodiment, the target application is an application developed based on a hypertext preprocessor PHP; the processor 1002 is specifically configured to:
inserting the monitoring program into the bottom layer code of the target application based on the PHP extension plug-in;
and when the underlying code of the target application is executed, calling the monitoring program to monitor the data generated when the target application runs.
In yet another possible implementation, the processor is further configured to:
receiving a statistical rule in the updated monitoring policy of the first service from the monitoring configuration device through a communication interface 1004;
and adjusting the target program according to the updated statistical rule in the monitoring strategy of the first service.
Therefore, the business end can obtain the updating of the monitoring strategy in time, and can adjust the local monitoring program as soon as possible after the statistical rule is updated, thereby realizing dynamic business monitoring and improving the flexibility of the business monitoring.
It should be noted that the implementation of each unit may also correspond to the corresponding description of the embodiment shown in fig. 3. The device 70 may be a service server in the embodiment shown in fig. 3.
Referring to fig. 11, fig. 11 is a schematic structural diagram of a monitoring configuration device 110 according to an embodiment of the present disclosure. The monitoring configuration device 110 may include at least one memory 1101 and at least one processor 1102. Optionally, the service server 110 may further include a bus 1103, and the at least one memory and the at least one processor may be connected by the bus 1103. Further, a communication interface 1104 may be included, wherein the memory 1101, processor 1102 and communication interface 1104 are coupled via bus 1103.
The memory 1101 is used to provide a storage space, and data such as an operating system and a computer program may be stored in the storage space. Memory 1101 includes, but is not limited to, RAM, ROM, EPROM, or CD-ROM.
The processor 1102 is a module for performing arithmetic operation and/or logical operation, and may specifically be one or a combination of multiple processing modules such as a central processing unit CPU, GPU, MPU, ASIC, FPGA, and CPLD. The virtual processing device may be a virtual machine, a container, or the like.
The communication interface 1104 is used for receiving and/or transmitting data from/to the outside, and may be a wired link interface such as an ethernet cable, or a wireless link (Wi-Fi, bluetooth, etc.) interface. Optionally, communication interface 1104 may also include a transmitter (e.g., a radio frequency transmitter, antenna, etc.) or a receiver, etc. coupled to the interface.
The processor 1102 in the monitoring configuration device 110 is configured to read the computer instructions stored in the memory 1101 for executing the aforementioned traffic monitoring method, such as the traffic monitoring method described in the embodiment shown in fig. 3.
For example, the processor 1102 in the monitoring configuration device 110 is configured to read the computer instructions stored in the memory 1101, and is configured to perform the following operations:
generating a monitoring strategy of a first service, wherein the monitoring strategy of the first service comprises a statistical rule and an aggregation rule; the statistical rule is used for generating a monitoring program for the first service, and the monitoring program is used for monitoring data generated when a target application runs, wherein the target application is an application for processing the first service; the statistical rule is also used for carrying out statistics on the data monitored by the monitoring program to obtain statistical data; the aggregation rule is used for indicating a mode of aggregating the data counted by the statistical rule;
sending the aggregation rule to a compute node through a communication interface 1104;
the statistical rules are sent to the traffic server via the communication interface 1104.
In a possible implementation manner, the statistical rule includes a filtering feature and a statistical index, wherein the filtering feature is used for filtering target data from data monitored by the monitoring program; and the statistical indexes are used for carrying out statistics on the target data to obtain statistical data.
In yet another possible implementation, the filtering feature includes indication information of a target URL; and the indication information of the target URL is used for filtering the data corresponding to the target URL from the data corresponding to the plurality of Uniform Resource Locators (URLs).
In yet another possible implementation, the processor 1102 is further configured to:
monitoring whether the monitoring strategy of the first service is updated or not;
if the first service is updated, sending the updated statistical rule in the monitoring policy of the first service to the service server through the communication interface 1104, and sending the updated aggregation rule in the monitoring policy of the first service to the computing node through the communication interface 1104.
In yet another possible implementation, the processor is specifically configured to:
and monitoring whether the monitoring strategy of the first service is updated or not by a reliable coordination system ZooKeeper based on a distributed system.
It should be noted that the implementation of each unit may also correspond to the corresponding description of the embodiment shown in fig. 3. The apparatus 80 may be a monitoring arrangement in the embodiment shown in fig. 3.
Referring to fig. 12, fig. 12 is a schematic structural diagram of a computing node 120 according to an embodiment of the present disclosure. The computing node 120 may include at least one memory 1201 and at least one processor 1202. Optionally, the computing node 120 may further include a bus 1203, and the at least one memory and the at least one processor may be connected by the bus 1203. Further, a communication interface 1204 may be included, wherein the memory 1201, the processor 1202 and the communication interface 1204 are connected via the bus 1203.
The memory 1201 is used to provide a storage space in which data such as an operating system and a computer program may be stored. Memory 1201 includes, but is not limited to, RAM, ROM, EPROM, or CD-ROM.
The processor 1202 is a module for performing arithmetic operation and/or logical operation, and may specifically be one or a combination of multiple processing modules such as a central processing unit CPU, GPU, MPU, ASIC, FPGA, and CPLD. The virtual processing device may be a virtual machine, a container, or the like.
The communication interface 1204 is used for receiving and/or transmitting data from/to the outside, and may be a wired link interface such as an ethernet cable, or a wireless link (Wi-Fi, bluetooth, etc.) interface. Optionally, the communication interface 1203 may also include a transmitter (e.g., a radio frequency transmitter, an antenna, etc.) or a receiver, etc. coupled to the interface.
The processor 1202 in the computing node 120 is configured to read the computer instructions stored in the memory 1201, and is configured to execute the foregoing traffic monitoring method, such as the traffic monitoring method described in the embodiment shown in fig. 3.
For example, the processor 1202 in the computing node 120 is configured to read the computer instructions stored in the memory 1201, and is configured to perform the following operations:
receiving an aggregation rule of statistical data for a first service, which is sent by a monitoring configuration device, through a communication interface 1204; the aggregation rule is used for indicating a mode of aggregating the data counted by the statistical rule;
receiving statistical data of the first service sent by a service server through a communication interface 1204; the statistical data is data which is counted based on a statistical rule sent by the monitoring configuration equipment;
and aggregating the statistical data based on the aggregation rule to obtain the monitoring data of the first service.
In yet another possible implementation, the processor 1202 is further configured to:
receiving the identity information of the service server sent by the service server through a communication interface 1204;
the aggregating the statistical data based on the aggregation rule to obtain the monitoring data of the first service includes:
aggregating the statistical data with the identity information of the service server based on the aggregation rule to obtain monitoring data of the first service; the monitoring data of the first service is used for describing the condition that the service server processes the first service.
In yet another possible implementation manner of the third aspect, the processor 1202 is further configured to:
receiving an aggregation rule in the updated monitoring policy of the first service, which is sent by the monitoring configuration device, through a communication interface 1204;
and aggregating the statistical data from the service server according to the aggregation rule in the updated monitoring strategy of the first service to obtain updated monitoring data of the first service.
It should be noted that the implementation of each unit may also correspond to the corresponding description of the embodiment shown in fig. 3. The computing device 90 may be a computing node in the embodiment shown in fig. 3.
An embodiment of the present application further provides a computer-readable storage medium, where a computer instruction is stored in the computer-readable storage medium, where the computer instruction is used to implement the service monitoring method, such as the service monitoring method in the embodiment shown in fig. 3.
An embodiment of the present application further provides a computer program product, where the computer program product may correspond to a computer instruction, where the computer instruction is used to implement the service monitoring method described above, such as the service monitoring method in the embodiment shown in fig. 3.
The embodiment of the present application further provides a chip system, where the chip system includes at least one processor, a memory, and an interface circuit, where the interface circuit is configured to provide information input/output for the at least one processor, and the at least one memory stores computer instructions, and when the computer instructions run on the one or more processors, the chip system executes the service monitoring method described above, such as the service monitoring method in the embodiment shown in fig. 4.
One of ordinary skill in the art will appreciate that all or part of the processes in the methods of the above embodiments can be implemented by hardware associated with a computer program that can be stored in a computer-readable storage medium, and when executed, can include the processes of the above method embodiments. And the aforementioned storage medium includes: various media that can store computer program code, such as ROM or RAM, magnetic or optical disks, etc.

Claims (30)

1. A service monitoring method is applied to a service server, and the method comprises the following steps:
receiving a statistical rule aiming at a first service and sent by monitoring configuration equipment;
generating a monitoring program aiming at the first service according to the statistical rule, wherein the monitoring program is a computer program generated based on a non-invasive technology;
calling the monitoring program to monitor data generated when the target application runs when the target application is executed; wherein the target application is an application for processing the first service;
counting the data monitored by the monitoring program according to the statistical rule to obtain statistical data;
and sending the statistical data to a computing node, wherein the statistical data is used for aggregating on the computing node to obtain the monitoring data of the first service.
2. The method of claim 1, wherein the statistical rules include filtering characteristics and statistical indicators, and the statistical data obtained by performing statistics on the data monitored by the monitoring program through the statistical rules includes:
filtering the data monitored by the monitoring program according to the filtering characteristics to obtain target data;
and counting the target data according to the statistical indexes to obtain statistical data.
3. The method of claim 2, wherein the data monitored by the monitoring program includes data corresponding to a plurality of Uniform Resource Locators (URLs), and the filtering characteristic includes information indicative of a target URL; filtering the data monitored by the monitoring program according to the filtering characteristics to obtain target data; the method comprises the following steps:
and filtering the data corresponding to the target URL from the data corresponding to the plurality of Uniform Resource Locators (URLs) according to the indication information of the target URL.
4. The method according to any one of claims 1-3, further comprising:
sending the identity information of the service server to the computing node; the identity information of the service server is used for the computing node to aggregate the statistical data to obtain monitoring data of the first service; the monitoring data of the first service is used for describing the condition that the service server processes the first service.
5. The method according to any one of claims 1 to 4, wherein the target application is an application developed based on JAVA; the calling the monitoring program to monitor the data generated when the target application runs when the target application is executed comprises the following steps:
inserting the monitoring program into the Class of the target application through a Java byte code manipulation framework (ASM) based on the Java agent;
and calling the monitoring program to monitor data generated during the running of the target application when the Class of the target application is executed.
6. The method according to any one of claims 1-4, wherein the target application is an application developed based on a hypertext preprocessor PHP; the calling the monitoring program to monitor the data generated when the target application runs when the target application is executed comprises the following steps:
inserting the monitoring program into the bottom layer code of the target application based on the PHP extension plug-in;
and when the underlying code of the target application is executed, calling the monitoring program to monitor the data generated when the target application runs.
7. The method according to any one of claims 1-6, further comprising:
receiving a statistical rule in the updated monitoring strategy of the first service from the monitoring configuration equipment;
and adjusting the target program according to the updated statistical rule in the monitoring strategy of the first service.
8. A method for monitoring a service, comprising:
generating a monitoring strategy of a first service, wherein the monitoring strategy of the first service comprises a statistical rule and an aggregation rule; the statistical rule is used for generating a monitoring program for the first service, and the monitoring program is used for monitoring data generated when a target application runs, wherein the target application is an application for processing the first service; the statistical rule is also used for carrying out statistics on the data monitored by the monitoring program to obtain statistical data; the aggregation rule is used for indicating a mode of aggregating the data counted by the statistical rule;
sending the aggregation rule to a computing node;
and sending the statistical rule to a service server.
9. The method of claim 8, wherein the statistical rules include filtering characteristics and statistical indicators, the filtering characteristics are used for filtering target data from the data monitored by the monitoring program; and the statistical indexes are used for carrying out statistics on the target data to obtain statistical data.
10. The method of claim 9, wherein the filtering feature comprises an indication of a target URL; and the indication information of the target URL is used for filtering the data corresponding to the target URL from the data corresponding to the plurality of Uniform Resource Locators (URLs).
11. The method according to any one of claims 8-10, further comprising:
monitoring whether the monitoring strategy of the first service is updated or not;
and if the first service is updated, sending the updated statistical rule in the monitoring strategy of the first service to the service server, and sending the updated aggregation rule in the monitoring strategy of the first service to the computing node.
12. The method of claim 11, wherein the monitoring policy listening for the first traffic is updated, comprising:
and monitoring whether the monitoring strategy of the first service is updated or not by a reliable coordination system ZooKeeper based on a distributed system.
13. A method for monitoring a service, comprising:
receiving an aggregation rule aiming at statistical data of a first service, which is sent by monitoring configuration equipment; the aggregation rule is used for indicating a mode of aggregating the data counted by the statistical rule;
receiving statistical data of the first service sent by a service server; the statistical data is data which is counted based on a statistical rule sent by the monitoring configuration equipment;
and aggregating the statistical data based on the aggregation rule to obtain the monitoring data of the first service.
14. The method of claim 13, further comprising:
receiving the identity information of the service server sent by the service server;
the aggregating the statistical data based on the aggregation rule to obtain the monitoring data of the first service includes:
aggregating the statistical data with the identity information of the service server based on the aggregation rule to obtain monitoring data of the first service; the monitoring data of the first service is used for describing the condition that the service server processes the first service.
15. The method of claim 13 or 14, further comprising:
receiving an aggregation rule in the updated monitoring strategy of the first service, which is sent by the monitoring configuration equipment;
and aggregating the statistical data from the service server according to the aggregation rule in the updated monitoring strategy of the first service to obtain updated monitoring data of the first service.
16. A method for monitoring a service, comprising:
the method comprises the steps that monitoring configuration equipment generates a monitoring strategy of a first service, wherein the monitoring strategy of the first service comprises a statistical rule and an aggregation rule; the aggregation rule is used for indicating a mode of aggregating the data counted by the statistical rule;
the monitoring configuration equipment sends the aggregation rule to a computing node;
the computing node receives an aggregation rule of statistical data aiming at a first service, which is sent by monitoring configuration equipment;
the monitoring configuration equipment sends the statistical rule to a service server;
the service server receives a statistical rule aiming at a first service and sent by monitoring configuration equipment;
the business server generates a monitoring program aiming at the first business according to the statistical rule, wherein the monitoring program is a computer program generated based on a non-invasive technology;
the service server calls the monitoring program to monitor data generated when the target application runs when executing the target application; wherein the target application is an application for processing the first service;
the business server carries out statistics on the data monitored by the monitoring program through the statistical rule to obtain statistical data;
the service server sends the statistical data to the computing node;
the computing node receives the statistical data from the service server;
and the computing node aggregates the statistical data based on the aggregation rule to obtain the monitoring data of the first service.
17. A traffic processing apparatus, comprising:
the receiving unit is used for receiving a statistical rule aiming at a first service and sent by the monitoring configuration equipment;
the processing unit is used for generating a monitoring program aiming at the first service according to the statistical rule, and the monitoring program is a computer program generated based on a non-invasive technology;
the processing unit is further used for calling the monitoring program to monitor data generated when the target application runs when the target application is executed; wherein the target application is an application for processing the first service;
the processing unit is further configured to count the data monitored by the monitoring program according to the statistical rule to obtain statistical data;
and the sending unit is used for sending the statistical data to a computing node, and the statistical data is used for aggregating on the computing node to obtain the monitoring data of the first service.
18. The apparatus according to claim 17, wherein the statistical rules include filtering characteristics and statistical indicators, and the processing unit is specifically configured to:
filtering the data monitored by the monitoring program according to the filtering characteristics to obtain target data;
and counting the target data according to the statistical indexes to obtain statistical data.
19. The apparatus of claim 18, wherein the data monitored by the monitoring program includes data corresponding to a plurality of Uniform Resource Locators (URLs), and the filtering feature includes information indicative of a target URL; the processing unit is specifically configured to filter data corresponding to the target URL from data corresponding to the multiple URLs according to the indication information of the target URL.
20. The apparatus according to any of claims 17-19, wherein the sending unit is further configured to send identity information of the service server to the computing node; the identity information of the service server is used for the computing node to aggregate the statistical data to obtain monitoring data of the first service; the monitoring data of the first service is used for describing the condition that the service server processes the first service.
21. The apparatus according to any one of claims 17-20, wherein the target application is a JAVA development based application; the processing unit is specifically configured to:
inserting the monitoring program into the Class of the target application through a Java byte code manipulation framework (ASM) based on the Java agent;
and calling the monitoring program to monitor data generated during the running of the target application when the Class of the target application is executed.
22. The apparatus according to any of claims 17-20, wherein the target application is an application developed based on a hypertext preprocessor PHP; the processing unit is specifically configured to:
inserting the monitoring program into the bottom layer code of the target application based on the PHP extension plug-in;
and when the underlying code of the target application is executed, calling the monitoring program to monitor the data generated when the target application runs.
23. A monitoring arrangement, comprising:
the system comprises a processing unit, a monitoring unit and a processing unit, wherein the processing unit is used for generating a monitoring strategy of a first service, and the monitoring strategy of the first service comprises a statistical rule and an aggregation rule; the statistical rule is used for generating a monitoring program for the first service, and the monitoring program is used for monitoring data generated when a target application runs, wherein the target application is an application for processing the first service; the statistical rule is also used for carrying out statistics on the data monitored by the monitoring program to obtain statistical data; the aggregation rule is used for indicating a mode of aggregating the data counted by the statistical rule;
a sending unit, configured to send the aggregation rule to a computing node;
the sending unit is further configured to send the statistical rule to a service server.
24. The apparatus of claim 23, wherein the statistical rules comprise filtering characteristics and statistical indicators, the filtering characteristics are used for filtering target data from the data monitored by the monitoring program; and the statistical indexes are used for carrying out statistics on the target data to obtain statistical data.
25. A computing device, comprising:
the receiving unit is used for receiving an aggregation rule of statistical data aiming at a first service, which is sent by monitoring configuration equipment; the aggregation rule is used for indicating a mode of aggregating the data counted by the statistical rule;
the receiving unit is further configured to receive statistical data of the first service sent by a service server; the statistical data is data which is counted based on a statistical rule sent by the monitoring configuration equipment;
and the processing unit is used for aggregating the statistical data based on the aggregation rule to obtain the monitoring data of the first service.
26. A business monitoring system is characterized by comprising a monitoring configuration device, a business processing device and a computing device, wherein the monitoring configuration device is used for monitoring the business processing device;
the service processing apparatus is the service processing apparatus of any one of claims 17-22;
the monitoring and configuration device is the monitoring and configuration device in claim 23 or 24;
the computing device is the computing device recited in claim 25.
27. A service server, comprising a processor and a memory; the processor is configured to execute the memory-stored computer instructions to cause the service server to implement the method of any of claims 1-7.
28. A traffic monitoring device, comprising a processor and a memory; the processor is configured to execute the memory-stored computer instructions to cause the traffic monitoring device to implement the method of any of claims 8-12.
29. A computing node, wherein the computing node comprises a processor and a memory; the computing node is to execute memory-stored computer instructions that cause the computing node to implement the method of any of claims 13-15.
30. A computer-readable storage medium, characterized in that computer instructions are stored therein for implementing the method of any one of claims 1-7, or for implementing the method of any one of claims 8-12, or for implementing the method of any one of claims 13-15.
CN202010609511.9A 2020-06-28 2020-06-28 Service monitoring method and related device Pending CN113849363A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010609511.9A CN113849363A (en) 2020-06-28 2020-06-28 Service monitoring method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010609511.9A CN113849363A (en) 2020-06-28 2020-06-28 Service monitoring method and related device

Publications (1)

Publication Number Publication Date
CN113849363A true CN113849363A (en) 2021-12-28

Family

ID=78972709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010609511.9A Pending CN113849363A (en) 2020-06-28 2020-06-28 Service monitoring method and related device

Country Status (1)

Country Link
CN (1) CN113849363A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114489838A (en) * 2022-01-11 2022-05-13 江苏京玉信息技术有限公司 Method, device and storage medium for intercepting HTTP server data
CN114706734A (en) * 2022-06-02 2022-07-05 支付宝(杭州)信息技术有限公司 Monitoring method and monitoring system for business application
CN114826976A (en) * 2022-04-13 2022-07-29 京东科技信息技术有限公司 Statistical method and device for uplink flow data based on edge computing service

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114489838A (en) * 2022-01-11 2022-05-13 江苏京玉信息技术有限公司 Method, device and storage medium for intercepting HTTP server data
CN114826976A (en) * 2022-04-13 2022-07-29 京东科技信息技术有限公司 Statistical method and device for uplink flow data based on edge computing service
CN114826976B (en) * 2022-04-13 2023-12-05 京东科技信息技术有限公司 Statistical method and device for uplink flow data based on edge computing service
CN114706734A (en) * 2022-06-02 2022-07-05 支付宝(杭州)信息技术有限公司 Monitoring method and monitoring system for business application
CN114706734B (en) * 2022-06-02 2022-09-20 支付宝(杭州)信息技术有限公司 Monitoring method and monitoring system for business application

Similar Documents

Publication Publication Date Title
CN113849363A (en) Service monitoring method and related device
EP3243136B1 (en) Dynamic telemetry message profiling and adjustment
US7461369B2 (en) Java application response time analyzer
US7966398B2 (en) Synthetic transaction monitor with replay capability
US7401141B2 (en) Method and system for monitoring performance of distributed applications
CN112714047B (en) Industrial control protocol flow based test method, device, equipment and storage medium
CN106649055A (en) Domestic CPU (central processing unit) and operating system based software and hardware fault alarming system and method
CN112256542A (en) eBPF-based micro-service system performance detection method, device and system
CN116467189B (en) Method and system for interface call completion performance pressure measurement and full link data monitoring
CN112559285A (en) Distributed service architecture-based micro-service monitoring method and related device
CN115426284A (en) Network quality detection method, device, terminal equipment and storage medium
CN117176802B (en) Full-link monitoring method and device for service request, electronic equipment and medium
Hellerstein et al. ETE: A customizable approach to measuring end-to-end response times and their components in distributed systems
CN110908910B (en) Block chain-based test monitoring method and device and readable storage medium
CN112383513A (en) Crawler behavior detection method and device based on proxy IP address pool and storage medium
CN109214189B (en) Method, device, storage medium and electronic equipment for identifying program bugs
CN110445753A (en) The partition method and device of terminal device abnormal access
CN114185681A (en) Automatic current-limiting processing method and device
CN112306848A (en) Architecture view generation method and device of micro-service system
Szydlo et al. Resource-aware log monitoring data transmission for Smart and IoT devices
US20230370318A1 (en) Data Processing Method, Apparatus, and System, and Storage Medium
CN110196862B (en) Data scene construction method, device, server and system
CN117667374A (en) Data processing method, device and system
CN117914755A (en) Link pressure measurement method, system, equipment and storage medium based on micro-service architecture
CN117557211A (en) Intelligent financial business processing method, platform and medium based on flow automation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220208

Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Applicant after: Huawei Cloud Computing Technology Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Applicant before: HUAWEI TECHNOLOGIES Co.,Ltd.

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination