CN114416508A - Application performance monitoring method and device, storage medium and electronic equipment - Google Patents

Application performance monitoring method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114416508A
CN114416508A CN202210027178.XA CN202210027178A CN114416508A CN 114416508 A CN114416508 A CN 114416508A CN 202210027178 A CN202210027178 A CN 202210027178A CN 114416508 A CN114416508 A CN 114416508A
Authority
CN
China
Prior art keywords
index
monitoring
query
server
port
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
CN202210027178.XA
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202210027178.XA priority Critical patent/CN114416508A/en
Publication of CN114416508A publication Critical patent/CN114416508A/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/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an application performance monitoring method and device, a storage medium and electronic equipment. Wherein, the method comprises the following steps: registering a monitoring plug-in the target application, wherein the monitoring plug-in is internally provided with an inquiry server which is used for monitoring and inquiring each performance index of the target application; monitoring an inquiry port under the condition that an inquiry server is started, wherein the inquiry port is a communication port used for inquiring the performance index in a plurality of communication ports of the inquiry server; determining an index type corresponding to a query request under the condition that the query port receives the query request sent by the monitoring server; and returning the target index information corresponding to the index type to the monitoring server through the query port. The invention solves the technical problem of incomplete application performance monitoring caused by poor flexibility of application performance monitoring.

Description

Application performance monitoring method and device, storage medium and electronic equipment
Technical Field
The invention relates to the field of application monitoring, in particular to an application performance monitoring method and device, a storage medium and electronic equipment.
Background
The Spring framework based Java application is not perfect in performance monitoring solution of the Java application adapting to the Spring framework because the Spring framework technology is old. The open source monitoring solutions supporting the Java application include Prometheus, zabbix and the like, but all support only basic application index monitoring at the JVM level, and lack the function implementation of adapting to various performance index monitoring.
However, in the existing application performance monitoring methods, fixed plug-ins are used to obtain specified indexes, and other application index information cannot be obtained, for example, load performance index information of an application about a database cannot be monitored. Thereby causing a greater risk of the application running. That is, the existing application performance monitoring has poor flexibility, which results in that the application performance monitoring is not comprehensive enough, and thus there is a great risk in running the application.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides an application performance monitoring method and device, a storage medium and electronic equipment, and aims to at least solve the technical problem of incomplete application performance monitoring caused by poor flexibility of application performance monitoring.
According to an aspect of an embodiment of the present invention, there is provided an application performance monitoring method, including: registering a monitoring plug-in a target application, wherein the monitoring plug-in is internally provided with an inquiry server, and the inquiry server is used for monitoring and inquiring each performance index of the target application; monitoring an inquiry port under the condition that the inquiry server is started, wherein the inquiry port is a communication port which is used for inquiring the performance index in a plurality of communication ports of the inquiry server; determining an index type corresponding to a query request under the condition that the query port receives the query request sent by a monitoring server; and returning the target index information corresponding to the index type to the monitoring server through the query port.
According to another aspect of the embodiments of the present invention, there is also provided an application performance monitoring apparatus, including: the system comprises a registration unit, a monitoring unit and a monitoring unit, wherein the registration unit is used for registering a monitoring plug-in a target application, an inquiry server is arranged in the monitoring plug-in, and the inquiry server is used for monitoring and inquiring each performance index of the target application; a monitoring unit, configured to monitor an inquiry port when the inquiry server is started, where the inquiry port is a communication port used for inquiring the performance index among a plurality of communication ports of the inquiry server; a determining unit, configured to determine an index type corresponding to an inquiry request when the inquiry port receives the inquiry request sent by a monitoring server; and the returning unit is used for returning the target index information corresponding to the index type to the monitoring server through the query port.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the above application performance monitoring method when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the application performance monitoring method through the computer program.
In the embodiment of the invention, a monitoring plug-in which an inquiry server is registered and configured in a target application is adopted, an inquiry port for the performance index of the target application is monitored through the starting of the inquiry server, when the inquiry port receives an inquiry request sent by the monitoring server, the monitoring plug-in acquires the corresponding performance index information of the target application by determining the index type corresponding to the inquiry request, so that the performance index information is fed back to the monitoring server through the inquiry port, the inquiry server in the monitoring plug-in receives the inquiry request of actively pulling the performance index of the target application by the monitoring server, the inquiry port provided by the inquiry server corresponds to the performance index, the acquisition of a plurality of performance indexes of the target application is realized, and the aim of actively monitoring and acquiring the plurality of performance indexes of the target application by the monitoring server is fulfilled, therefore, the technical effect that the monitoring server flexibly and comprehensively monitors the performance index of the target application is achieved, and the technical problem that the monitoring of the application performance is incomplete due to poor flexibility of the monitoring of the application performance is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of an application environment of an alternative application performance monitoring method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating an alternative application performance monitoring method according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating an alternative application performance monitoring method according to an embodiment of the present invention;
FIG. 4 is a flow chart illustrating an alternative application performance monitoring method according to an embodiment of the present invention;
FIG. 5 is a flow chart illustrating an alternative application performance monitoring method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an interaction timing sequence of an alternative application performance monitoring method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of an interaction timing sequence of an alternative application performance monitoring method according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of an alternative application performance monitoring apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiments of the present invention, an application performance monitoring method is provided, optionally, the application performance monitoring method may be applied, but not limited to, in an environment as shown in fig. 1. The terminal device 102 interacts with the monitoring server 112 via the network 110 for application performance monitoring of the target application 104 installed in the terminal device 102. The application performance monitoring of the target application 104 is not limited to being realized by sequentially executing S102 to S108.
And registering the monitoring plug-in. A monitoring plug-in is registered in the target application 104, and an inquiry server is built in the monitoring plug-in and is used for monitoring and inquiring each performance index of the target application. And monitoring the query port. And monitoring an inquiry port under the condition that the inquiry server is started, wherein the inquiry port is a communication port used for inquiring the performance index in a plurality of communication ports of the inquiry server. And determining the index type. When the query port receives a query request sent by the monitoring server 112, an index type corresponding to the query request is determined. And returning target index information. And returning the target index information corresponding to the index type to the monitoring server 112 through the query port.
In the case where the monitoring server 112 receives the metric information, the metric information is not limited to being stored in the database 114, and is processed by the processing engine 116 to implement performance monitoring of the target application through the metric information.
Optionally, in this embodiment, the terminal device may be a terminal device configured with a client of the target application, and may include but is not limited to at least one of the following: mobile phones (such as Android phones, IOS phones, etc.), notebook computers, tablet computers, palm computers, MID (Mobile Internet Devices), PAD, desktop computers, smart televisions, etc. The target application is not limited to being a software application, a hardware application, a software application is not limited to being a video application, an instant messaging application, a browser application, an educational application, and the like. Such networks may include, but are not limited to: a wired network, a wireless network, wherein the wired network comprises: a local area network, a metropolitan area network, and a wide area network, the wireless network comprising: bluetooth, WIFI, and other networks that enable wireless communication. The monitoring server may be a single server, a server cluster composed of a plurality of servers, or a cloud server. The above is merely an example, and this is not limited in this embodiment.
As an alternative implementation, as shown in fig. 2, the application performance monitoring method includes:
s202, registering a monitoring plug-in the target application, wherein the monitoring plug-in is internally provided with an inquiry server, and the inquiry server is used for monitoring and inquiring each performance index of the target application.
In the above S202, the monitoring plug-in is not limited to the monitoring plug-in corresponding to the monitoring server that monitors the target application. And registering the monitoring plug-in the target application, thereby realizing the performance monitoring of the target application by the monitoring server through the monitoring plug-in.
Optionally, the query server in the monitoring plug-in is not limited to the query port for providing the monitoring server to monitor the performance indicator of the target application. Different performance indexes are not limited to correspond to different query ports, and the monitoring server acquires the performance index information of the target application through the query ports.
S204, monitoring the query port under the condition that the query server is started, wherein the query port is a communication port used for querying the performance index in the plurality of communication ports of the query server.
In the above S204, the query server is not limited to be started by the monitoring plug-in at the same time as the target application is started. In the case of registering the monitoring plug-in to the target application, the monitoring plug-in is started simultaneously with the start of the target application.
Under the condition of starting the monitoring plug-in, the communication connection between the monitoring server and the query server is not limited to be started, so that the query and monitoring of the monitoring server on the performance index of the target application are realized through the query server.
Under the condition that the query server provides a plurality of query ports which can be used for performance index query and each query port corresponds to different performance indexes, the monitoring server is not limited to obtain the performance index information of the target application through the query ports provided by the query server.
S206, determining the index type corresponding to the query request under the condition that the query port receives the query request sent by the monitoring server.
Under the condition that the target application is started, the interface information of the query interface is not limited to be sent to the monitoring server, so that the monitoring server sends the query request through the query interface, and the index type and the performance index corresponding to the query request are determined through the query request received by the query interface.
And S208, returning the target index information corresponding to the index type to the monitoring server through the query port.
Under the condition that the index information corresponding to the query request initiated by the monitoring server is determined, the monitoring plug-in acquires the corresponding index information and returns the index information to the monitoring server through the query port, so that the monitoring server acquires the performance index information of the target application.
The performance indicators of the target application are not limited to the state performance data and data performance data generated by the target application while running, e.g., the state performance data of the target application runtime database.
In the embodiment of the application, a monitoring plug-in configured with an inquiry server is adopted to register in a target application, an inquiry port used for monitoring the performance index of the target application is monitored through the starting of the inquiry server, when the inquiry port receives an inquiry request sent by the monitoring server, the monitoring plug-in acquires the corresponding performance index information of the target application by determining the index type corresponding to the inquiry request, so that the performance index information is fed back to the monitoring server through the inquiry port, the inquiry server in the monitoring plug-in receives the inquiry request of actively pulling the performance index of the target application by the monitoring server, the inquiry port provided by the inquiry server corresponds to the performance index, the acquisition of a plurality of performance indexes of the target application is realized, and the purpose of actively monitoring and acquiring the plurality of performance indexes of the target application by the monitoring server is achieved, therefore, the technical effect that the monitoring server flexibly and comprehensively monitors the performance index of the target application is achieved, and the technical problem that the monitoring of the application performance is incomplete due to poor flexibility of the monitoring of the application performance is solved.
As an alternative embodiment, as shown in fig. 3, the registering the monitoring plug-in the target application includes:
s302, determining a container configuration file of the monitoring plug-in according to the type of the database corresponding to the target application;
s304, in the process of starting the container of the monitoring plug-in, loading a container configuration file to initialize an index register of the monitoring plug-in, wherein the index register is used for acquiring index information;
s306, register the pointer collection component in the pointer register.
Optionally, registering the monitoring plug-in the target application includes loading a configuration file and registering a metric collection component in a metric register. And the loading of the configuration file comprises the step of determining a corresponding container configuration file according to the type of the database of the target application, so that the monitoring plug-in obtains the performance index related to the database of the target application.
Optionally, in a case that the loading of the container configuration file is completed, an index register in the monitoring plug-in is initialized, and the index register is used for acquiring and storing index information of the target application. The index register is not limited to having multiple sets of index collection components registered therein, and each set of index collection components is not limited to being used to acquire and store corresponding index information.
Alternatively, the query server is not limited to being initialized until the metric collection component is registered in the metric register. Initialization of the query server is not limited to include initialization of the requesting processor components, initialization of the query ports, and initialization of settings for thread pool processing.
In the case of query server initialization, registering the metric collection component in the metric register is not limited to by performing the following steps in sequence:
and S1, configuring the query port corresponding to the index collection component. Determining a query port associated with the current index collection component from communication ports of the query server;
and S2, configuring the query instruction corresponding to the query port. And (4) determining corresponding index information through the query instruction.
As an alternative embodiment, as shown in fig. 4, the registering of the metric collection component in the metric register includes:
s402, registering a first index collection component, wherein the first index collection component is used for acquiring attribute index information of a target application;
s404, determining a second index collection component corresponding to the target application according to the type of the database, wherein the second index collection component is used for acquiring database index information associated with the target application;
s406, registering a second index collection component.
Alternatively, the attribute index information of the target application is not limited to the JVM class index indicating the Java application. The database index information of the target application is not limited to the database connection pool index data indicating the Java application. Meanwhile, other application index information is not limited to being acquired by registering other index collection components in the index register.
The obtaining of database index information is not limited to configuring the second index collection component according to the application database type.
Taking the target application as a Java application and the query server selects an HTTP server as an example, the flow of registering the monitoring plug-in the target application is not limited to that shown in fig. 5. When the Java application is started, the HTTP server is triggered to be started, and the process of monitoring the plug-in registration starts to be executed.
S502, initializing an index register;
s504, registering JVM related index collector components to an index register;
s506, judging the type of the JDBC database connection pool component used. To determine the index collector component corresponding to the application database type, the database connection pool component type is not limited to include: tomcat JDBC, DBCP2, Druid, HikariCP, etc.;
s508, loading the configuration of the database connection pool index collector component;
s510, registering a JDBC database to connect the pool index collector component to the index register;
s512, initializing the HTTP server and setting the monitored port number. Determining a port for monitoring Java application performance indexes from an HTTP server;
s514, initializing an HTTP request processor component;
s516, setting HTTP server context binding information, and binding health check interface and index query interface contexts. The context binding information corresponds to the query instruction, and the corresponding query instruction is determined according to the requested context. The query instruction collection comprises health check and index query, wherein the health check is used for querying the application running state, and the index query is used for acquiring the performance index;
s518, setting a thread pool processor;
s520, the HTTP server is started in a daemon process mode, monitors the designated port and receives the HTTP protocol request. The designated port is a port corresponding to the index collection component, and the HTTP request is an inquiry request sent by the monitoring server.
As an optional implementation manner, before listening to the query port, the method further includes: and determining a state instruction and a data instruction corresponding to the query port, wherein the state instruction is used for indicating state index information of the query target application, the data instruction is used for indicating data index information of the query target application, and the data index information comprises attribute index information and database index information.
Alternatively, the status instruction is not limited to being a bound request context, and the context configured for the query port is used to determine whether the query request queries the application running status or the performance indicator data by matching the context in the query request in the case of receiving the query request. For example, "/-/health" is configured for the status instruction to determine that an application running status is to be returned in the event that "/-/health" is matched in the query request context. The data instructions are configured with "/metrics" to determine that performance index data is to be returned if "/metrics" is matched in the query request context.
As an optional implementation manner, the determining the type of the instruction corresponding to the query request includes: determining an instruction type corresponding to the query request according to a query instruction carried in the query request, wherein the query instruction comprises a state instruction and a data instruction;
the method for returning the target index information corresponding to the index type to the monitoring server through the query port comprises the following steps: under the condition that the index type is a state type corresponding to the state instruction, returning state information indicating the running state of the target application through the query port; and under the condition that the index type is the data type corresponding to the data instruction, calling the first index collection component and the second index collection component through the index register, and returning the acquired attribute index information and database index information to the monitoring server.
Optionally, in a case where it is determined that performance index data corresponding to the data instruction is returned, performance index data corresponding to the index collection component is obtained by sequentially calling each index collection component without being limited to obtaining all registered index collection components in the index register. When the performance index data is multiple, the data is not limited to be packaged after the multiple acquired performance index data are subjected to data aggregation, and the packaged performance index data is returned to the monitoring server. The process of encapsulating the performance index data is not limited herein, and in the case where the query server is an HTTP server, the processing is not limited to encapsulation in a text format by the query server.
Taking the example of the monitoring server being a Prometheus server, the application performance indicator monitoring interaction is not limited to the one shown in fig. 6. The Prometheus server is used as a request end of the application performance monitoring server, and the monitoring plug-in registered in the application end comprises an HTTP request processor, an index register, a JVM index collector and a database connection pool index collector which are registered in the index register. A1, Prometheus server initiates HTTP request. The HTTP request is used to request monitoring of application performance. And the HTTP request processor is used for matching the corresponding query interface through the HTTP request context under the condition of receiving the HTTP request.
In the case of a match to "/-/health", A2, the HTTP request processor determines the health check interface and returns an indicator-exposed service state normal information. And feeding back the current running state of the application to be normal through the returned index information. In case of matching "/metrics", a3, the HTTP request handler determines the query metrics data interface.
In the case where it is determined that the application index data needs to be returned, a4, index data is acquired to the index register. And traversing the registered index collector by the index register under the condition of receiving an instruction for acquiring index data. If traversing the JVM index collector first and then traversing the database to connect to the pool index collector, a5, the index register obtains the JVM index data from the JVM index collector. A6, the JVM class pointer collector returns JVM pointer data to the pointer register. A7, the index register obtains the index data of database connection pool from the index collector of database connection pool. A8, the database connection pool index collector returns the database connection pool index data to the index register.
And under the condition that the index register traverses the index collector, the index register performs data aggregation on each index data, executes A9, and returns the aggregated index data to the HTTP request processor. When the HTTP request processor receives the aggregation indicator data, it executes a10, and returns the application indicator data to the promemeus server, thereby completing the acquisition of the application indicator data by the promemeus server.
As an optional implementation manner, after the target index information corresponding to the index type is returned to the monitoring server through the query port, the method further includes:
s1, processing the target index information to form an index chart corresponding to the target index information;
and S2, displaying an index chart.
Optionally, when the monitoring server obtains target index information of the application, that is, performance index data, the performance index data is not limited to be interacted with the monitoring system, so that the monitoring system processes the performance index data and displays the performance index data in the form of an index icon when obtaining the performance index data, so as to implement visual display of monitoring of the application performance index data.
The monitoring system is not limited to being associated with a monitoring server to enable interaction of application performance indicators. For example, the Grafana system is selected to correspond to Prometheus servers. The method is not limited to configuring the data source of the monitoring server in the monitoring system to obtain the application performance index data received by the monitoring server.
As an optional implementation manner, after the target index information corresponding to the index type is returned to the monitoring server through the query port, the method further includes: and displaying alarm information under the condition that the index information included in the target index information exceeds a corresponding index threshold, wherein the alarm information is used for prompting that the target application performance is abnormal.
Optionally, an index threshold is configured in the monitoring system, so that when the obtained application performance index data exceeds the index threshold, alarm information is automatically triggered, and the alarm information is displayed to warn that the application index is abnormal.
The monitoring of application performance indicator data shows interaction is not limited to that shown in fig. 7. The application HTTP server is used to represent the monitoring plug-in registered in the application, promemeus is used to represent that the used monitoring server is the promemeus server, and Grafana is used to represent that the monitoring system is the Grafana system.
A1, Prometheus server requests applications to expose metrics interface addresses at regular intervals. The Prometheus server actively sends a performance index acquisition request to the application HTTP server.
A2, the application HTTP server returns metrics data. And the application HTTP server acquires the metrics data and returns the metrics data to the Prometheus server under the condition of receiving the query request sent by the Prometheus server.
A3, Grafana system sends metrics data of query application to Prometheus server. The Grafana system is provided with a visual monitoring panel and a data source connected with a Prometous server, performance index data of an application, including JVM index, database connection index and other index data, is inquired from the Prometous server, and is not limited to be displayed in a graph form in the monitoring panel when the metrics data is acquired.
A4, Prometheus server returns the corresponding metrics data.
A5, the user requests the Grafana system to query the database connection monitoring panel of the application.
A6, the Grafana system returns the corresponding database connection metrics data and shows the data in a chart form.
A7, the user sets alarm rules in the Grafana system to realize automatic alarm when the index reaches a certain threshold value.
A8, the Grafana system sends alarm information under the condition that the index triggers the alarm rule. The transmission of the warning information is not limited to by displaying in the monitoring panel to notify the user of the warning information.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiment of the present invention, an application performance monitoring apparatus for implementing the application performance monitoring method is also provided. As shown in fig. 8, the apparatus includes:
a registering unit 802, configured to register a monitoring plug-in a target application, where the monitoring plug-in is internally provided with an inquiry server, and the inquiry server is used for monitoring and inquiring each performance index of the target application;
a monitoring unit 804, configured to monitor an inquiry port when the inquiry server is started, where the inquiry port is a communication port used for inquiring the performance index in the multiple communication ports of the inquiry server;
a determining unit 806, configured to determine, when the query port receives a query request sent by the monitoring server, an index type corresponding to the query request;
and a returning unit 808, configured to return target index information corresponding to the index type to the monitoring server through the query port.
Optionally, the registration unit 802 includes:
the determining module is used for determining a container configuration file of the monitoring plug-in according to the database type corresponding to the target application;
the system comprises a loading module, a storage module and a control module, wherein the loading module is used for loading a container configuration file to initialize an index register of a monitoring plug-in the container starting process of the monitoring plug-in, and the index register is used for acquiring index information;
and the registration module is used for registering the index collection component in the index register.
Optionally, the registration module includes:
the first registration module is used for registering a first index collection component, wherein the first index collection component is used for acquiring the attribute index information of the target application;
the type module is used for determining a second index collection component corresponding to the target application according to the type of the database, wherein the second index collection component is used for acquiring database index information associated with the target application;
and the second registration module is used for registering the second index collection component.
Optionally, the application performance monitoring apparatus further includes a port unit, configured to determine a status instruction and a data instruction corresponding to the query port before determining the query port, where the status instruction is used to indicate status index information of the query target application, the data instruction is used to indicate data index information of the query target application, and the data index information includes attribute index information and database index information.
Optionally, the application performance monitoring apparatus is further configured to: determining an instruction type corresponding to the query request according to a query instruction carried in the query request, wherein the query instruction comprises a state instruction and a data instruction; under the condition that the index type is a state type corresponding to the state instruction, returning state information indicating the running state of the target application through the query port; and under the condition that the index type is the data type corresponding to the data instruction, calling the first index collection component and the second index collection component through the index register, and returning the acquired attribute index information and database index information to the monitoring server.
Optionally, the application performance monitoring apparatus further includes a display unit, configured to process the target index information to form an index chart corresponding to the target index information after returning the target index information corresponding to the index type to the monitoring server through the query port; and displaying the index chart.
Optionally, the application performance monitoring apparatus further includes an alarm unit, configured to display alarm information when index information included in the target index information exceeds a corresponding index threshold after target index information corresponding to the index type is returned to the monitoring server through the query port, where the alarm information is used to prompt that the target application performance is abnormal.
In the embodiment of the application, a monitoring plug-in configured with an inquiry server is adopted to register in a target application, an inquiry port used for monitoring the performance index of the target application is monitored through the starting of the inquiry server, when the inquiry port receives an inquiry request sent by the monitoring server, the monitoring plug-in acquires the corresponding performance index information of the target application by determining the index type corresponding to the inquiry request, so that the performance index information is fed back to the monitoring server through the inquiry port, the inquiry server in the monitoring plug-in receives the inquiry request of actively pulling the performance index of the target application by the monitoring server, the inquiry port provided by the inquiry server corresponds to the performance index, the acquisition of a plurality of performance indexes of the target application is realized, and the purpose of actively monitoring and acquiring the plurality of performance indexes of the target application by the monitoring server is achieved, therefore, the technical effect that the monitoring server flexibly and comprehensively monitors the performance index of the target application is achieved, and the technical problem that the monitoring of the application performance is incomplete due to poor flexibility of the monitoring of the application performance is solved.
According to another aspect of the embodiment of the present invention, there is also provided an electronic device for implementing the application performance monitoring method, where the electronic device may be the terminal device or the server shown in fig. 1. The present embodiment takes the electronic device as a terminal device as an example for explanation. As shown in fig. 9, the electronic device comprises a memory 902 and a processor 904, the memory 902 having stored therein a computer program, the processor 904 being arranged to perform the steps of any of the above-described method embodiments by means of the computer program.
Optionally, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, registering a monitoring plug-in the target application, wherein the monitoring plug-in is internally provided with an inquiry server which is used for monitoring and inquiring each performance index of the target application;
s2, monitoring a query port under the condition that the query server is started, wherein the query port is a communication port used for querying performance indexes in a plurality of communication ports of the query server;
s3, determining the index type corresponding to the query request under the condition that the query port receives the query request sent by the monitoring server;
and S4, returning the target index information corresponding to the index type to the monitoring server through the query port.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 9 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an IOS phone, etc.), a tablet computer, a palmtop computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 9 does not limit the structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 9, or have a different configuration than shown in FIG. 9.
The memory 902 may be used to store software programs and modules, such as program instructions/modules corresponding to the application performance monitoring method and apparatus in the embodiments of the present invention, and the processor 904 executes various functional applications and data processing by running the software programs and modules stored in the memory 902, that is, implementing the application performance monitoring method described above. The memory 902 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 902 may further include memory located remotely from the processor 904, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 902 may be specifically, but not limited to, used for storing information such as monitoring plug-ins, target index information, and the like. As an example, as shown in fig. 9, the memory 902 may include, but is not limited to, a registration unit 802, a listening unit 804, a determination unit 806, and a return unit 808 in the application performance monitoring apparatus. In addition, the device may further include, but is not limited to, other module units in the application performance monitoring apparatus, which is not described in this example again.
Optionally, the transmitting device 906 is used for receiving or sending data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 906 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 906 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In addition, the electronic device further includes: a display 908 for displaying the target index information; and a connection bus 910 for connecting the respective module components in the above-described electronic apparatus.
In other embodiments, the terminal device or the server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting a plurality of nodes through a network communication. Nodes can form a Peer-To-Peer (P2P, Peer To Peer) network, and any type of computing device, such as a server, a terminal, and other electronic devices, can become a node in the blockchain system by joining the Peer-To-Peer network.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations of the application performance monitoring aspect described above. Wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, registering a monitoring plug-in the target application, wherein the monitoring plug-in is internally provided with an inquiry server which is used for monitoring and inquiring each performance index of the target application;
s2, monitoring a query port under the condition that the query server is started, wherein the query port is a communication port used for querying performance indexes in a plurality of communication ports of the query server;
s3, determining the index type corresponding to the query request under the condition that the query port receives the query request sent by the monitoring server;
and S4, returning the target index information corresponding to the index type to the monitoring server through the query port.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. An application performance monitoring method, comprising:
registering a monitoring plug-in a target application, wherein the monitoring plug-in is internally provided with an inquiry server, and the inquiry server is used for monitoring and inquiring each performance index of the target application;
monitoring an inquiry port under the condition that the inquiry server is started, wherein the inquiry port is a communication port which is used for inquiring the performance index in a plurality of communication ports of the inquiry server;
determining an index type corresponding to a query request under the condition that the query port receives the query request sent by a monitoring server;
and returning target index information corresponding to the index type to the monitoring server through the query port.
2. The method of claim 1, wherein registering a monitoring plug-in a target application comprises:
determining a container configuration file of the monitoring plug-in according to the database type corresponding to the target application;
in the container starting process of the monitoring plug-in, loading the container configuration file to initialize an index register of the monitoring plug-in, wherein the index register is used for acquiring the index information;
registering a metric collection component in the metric register.
3. The method of claim 2, wherein registering a metric collection component in the metric register comprises:
registering a first index collection component, wherein the first index collection component is used for acquiring attribute index information of the target application;
determining a second index collection component corresponding to the target application according to the database type, wherein the second index collection component is used for acquiring database index information associated with the target application;
registering the second index collection component.
4. The method of claim 3, wherein prior to listening for a query port, further comprising:
determining a status instruction and a data instruction corresponding to the query port, wherein the status instruction is used for indicating to query status index information of the target application, the data instruction is used for indicating to query data index information of the target application, and the data index information includes the attribute index information and the database index information.
5. The method of claim 4, wherein:
the determining the instruction type corresponding to the query request includes: determining the instruction type corresponding to the query request according to a query instruction carried in the query request, wherein the query instruction comprises the state instruction and the data instruction;
returning target index information corresponding to the index type to the monitoring server through the query port comprises: returning state information indicating the running state of the target application through the query port under the condition that the index type is a state type corresponding to the state instruction; and under the condition that the index type is a data type corresponding to the data instruction, calling the first index collection component and the second index collection component through the index register, and returning the acquired attribute index information and the acquired database index information to the monitoring server.
6. The method of claim 1, after returning target metric information corresponding to the metric type to the monitoring server through the query port, further comprising:
processing the target index information to form an index graph corresponding to the target index information;
and displaying the index chart.
7. The method of claim 1, after returning target metric information corresponding to the metric type to the monitoring server through the query port, further comprising:
and displaying alarm information under the condition that the index information included in the target index information exceeds a corresponding index threshold, wherein the alarm information is used for prompting that the target application performance is abnormal.
8. An application performance monitoring apparatus, comprising:
the system comprises a registering unit, a monitoring unit and a monitoring unit, wherein the registering unit is used for registering a monitoring plug-in a target application, an inquiry server is arranged in the monitoring plug-in, and the inquiry server is used for monitoring and inquiring each performance index of the target application;
a monitoring unit, configured to monitor an inquiry port when the inquiry server is started, where the inquiry port is a communication port used for inquiring the performance index among a plurality of communication ports of the inquiry server;
the determining unit is used for determining an index type corresponding to the query request under the condition that the query port receives the query request sent by the monitoring server;
and the return unit is used for returning the target index information corresponding to the index type to the monitoring server through the query port.
9. A computer-readable storage medium comprising a stored program, characterized in that the program when executed performs the method of any of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202210027178.XA 2022-01-11 2022-01-11 Application performance monitoring method and device, storage medium and electronic equipment Pending CN114416508A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210027178.XA CN114416508A (en) 2022-01-11 2022-01-11 Application performance monitoring method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210027178.XA CN114416508A (en) 2022-01-11 2022-01-11 Application performance monitoring method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114416508A true CN114416508A (en) 2022-04-29

Family

ID=81272424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210027178.XA Pending CN114416508A (en) 2022-01-11 2022-01-11 Application performance monitoring method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114416508A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115408246A (en) * 2022-08-26 2022-11-29 北京掌趣科技股份有限公司 Resource utilization rate analysis method and device
CN116955093A (en) * 2023-09-21 2023-10-27 紫光恒越技术有限公司 CPU state monitoring method, device, system, equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115408246A (en) * 2022-08-26 2022-11-29 北京掌趣科技股份有限公司 Resource utilization rate analysis method and device
CN116955093A (en) * 2023-09-21 2023-10-27 紫光恒越技术有限公司 CPU state monitoring method, device, system, equipment and storage medium
CN116955093B (en) * 2023-09-21 2024-01-30 紫光恒越技术有限公司 CPU state monitoring method, device, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN105376107B (en) Terminal testing method and proxy server
CN108566290B (en) Service configuration management method, system, storage medium and server
CN109218133B (en) Network speed testing system, method, device and computer readable storage medium
CN109981349B (en) Call chain information query method and device
CN114416508A (en) Application performance monitoring method and device, storage medium and electronic equipment
CN105615832A (en) Medical image data acquisition method and device
CN111045893B (en) Method, device and system for executing monitoring task, storage medium and electronic device
CN107274222B (en) Advertisement putting method and device
CN111198859A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111405217A (en) Image information display method and device, storage medium and electronic device
CN111224829B (en) Method and device for accessing external node to block chain network, and block chain network
CN111859127A (en) Subscription method and device of consumption data and storage medium
CN110881224B (en) Network long connection method, device, equipment and storage medium
CN110198227B (en) Log file processing method and device, storage medium and electronic device
CN114327710A (en) Function management method, management device, terminal equipment and readable storage medium
CN114039961A (en) Message pushing method, device, server and storage medium based on WebSocket
CN112087327B (en) Information state acquisition method and apparatus, storage medium, and electronic apparatus
CN116761144A (en) Method and device for accessing equipment to Internet of things platform
CN116594834A (en) Operation and maintenance data processing method and device for multi-protocol server
CN111274104A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN113553206B (en) Data event execution method and device, electronic equipment and computer readable medium
CN112383617B (en) Method, device, terminal equipment and medium for performing long connection
CN110943975B (en) Service registration method, device, computer equipment and storage medium
CN112788077B (en) Data acquisition method and device, computer equipment and computer-readable storage medium
US9608907B2 (en) Systems and methods for centrally-assisted distributed hash table

Legal Events

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