CN117194165A - Server performance monitoring method, device, computer equipment and storage medium - Google Patents

Server performance monitoring method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117194165A
CN117194165A CN202311200095.7A CN202311200095A CN117194165A CN 117194165 A CN117194165 A CN 117194165A CN 202311200095 A CN202311200095 A CN 202311200095A CN 117194165 A CN117194165 A CN 117194165A
Authority
CN
China
Prior art keywords
server
performance
performance parameters
data
component
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
CN202311200095.7A
Other languages
Chinese (zh)
Inventor
王梓博
黄奕敏
印凌潼
欧阳旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202311200095.7A priority Critical patent/CN117194165A/en
Publication of CN117194165A publication Critical patent/CN117194165A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The present application relates to a server performance monitoring method, apparatus, computer device, storage medium and computer program product. Relates to the technical field of computers. Can be used in the field of financial science and technology or other related fields. The method comprises the following steps: receiving a performance monitoring request sent by a terminal; invoking a data monitoring component to collect performance parameters of a server based on the performance monitoring request; invoking a data acquisition component to acquire a pre-configured acquisition path in the data acquisition component, and acquiring corresponding performance parameters from the data monitoring component according to a preset period based on the acquisition path; and sending the collected performance parameters to the terminal to instruct the terminal to create a dashboard, and displaying the performance parameters in the dashboard in a graphical mode based on a preset graph type. By adopting the method, the performance of the server can be monitored, so that the abnormality of the server can be found in time.

Description

Server performance monitoring method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technology, and in particular, to a method, an apparatus, a computer device, a storage medium, and a computer program product for monitoring server performance.
Background
As user demands increase, more and more tools and components run on the server, and a large number of redundant processes cause server performance to be inadequate. At present, the server performance is often found to be insufficient when the server is blocked or down, and the server abnormality cannot be monitored in time, so how to monitor the performance of the server is a technical problem to be solved urgently.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a server performance monitoring method, apparatus, computer device, computer readable storage medium, and computer program product that enable performance monitoring of a server.
In a first aspect, the present application provides a method for monitoring server performance, including:
receiving a performance monitoring request sent by a terminal;
invoking a data monitoring component to collect performance parameters of a server based on the performance monitoring request;
invoking a data acquisition component to acquire a pre-configured acquisition path in the data acquisition component, and acquiring corresponding performance parameters from the data monitoring component according to a preset period based on the acquisition path;
and sending the collected performance parameters to the terminal to instruct the terminal to create a dashboard, and displaying the performance parameters in the dashboard in a graphical mode based on a preset graph type.
In one embodiment, after the performance parameters are collected from the data monitoring component according to a preset period based on the collection path, the method includes:
storing the performance parameters collected each time in a time sequence database pre-configured by the server;
the sending the collected performance parameters to the terminal comprises the following steps:
extracting identification information and authentication information of the time sequence database from the performance monitoring request;
extracting performance parameters in a preset data transmission period from the time sequence database based on the identification information and the authentication information;
and sending the extracted performance parameters to the terminal.
In one embodiment, the performance monitoring request further includes a time range and a monitoring target, and the extracting, based on the identification information and the authentication information, the performance parameter in the preset data transmission period from the time sequence database includes:
performing authorization authentication of the time sequence database based on the authentication information under the condition that the time sequence database indicated by the identification information is the pre-configured time sequence database;
if the authentication is passed, determining performance parameters matched with the monitoring target in the preset data sending period from the time sequence database; extracting the performance parameters in the time range from the matched performance parameters.
In one embodiment, the data monitoring component and the data acquisition component are both configured in the server;
or at least one of the data monitoring component or the data acquisition component is configured in other servers in the server cluster to which the server belongs.
In one embodiment, the data acquisition component is configured in a server other than the server, and before the invoking the data acquisition component to obtain the preconfigured acquisition path in the data acquisition component includes:
sending a component calling request to the other servers, and receiving component information returned by the other servers when the load of the data acquisition component is detected to be in accordance with a preset condition;
and determining the data acquisition component based on the component information.
A second aspect provides a server performance monitoring method, the method comprising:
sending a performance monitoring request to a server to instruct the server to call a data monitoring component to acquire performance parameters of the server based on the performance monitoring request, call a data acquisition component to acquire a pre-configured acquisition path in the data acquisition component, and acquire corresponding performance parameters from the data monitoring component according to a preset period based on the acquisition path;
Receiving the performance parameters sent by the server;
a dashboard is created and the performance parameters are graphically presented in the dashboard based on a preset chart type.
In one embodiment, the sending the performance monitoring request to the server includes:
and sending performance monitoring requests and configuration updating instructions to a plurality of servers, wherein each performance monitoring request comprises a server identifier so that each server can update the configured data monitoring assembly and data acquisition assembly based on the configuration updating instructions, and calling the updated data monitoring assembly to acquire performance parameters of the servers based on the server identifier, calling the updated data acquisition assembly and acquiring the preconfigured acquisition path in the updated data acquisition assembly, and acquiring the performance parameters from the updated data monitoring assembly according to a preset period based on the acquisition path.
In one embodiment, graphically displaying the performance parameter in the dashboard based on a preset chart type includes:
determining statistical information of the performance parameters, wherein the statistical information comprises an average value, a maximum value, a minimum value, a performance parameter abnormal value and abnormal trend information;
Graphically displaying at least one of the average value, the maximum value, the minimum value, and the abnormal trend information in the instrument panel based on a preset chart type;
and/or graphically displaying the performance parameters in the instrument panel based on a preset chart type, and marking the performance parameter abnormal values in the performance parameters.
In a third aspect, the present application further provides a server performance monitoring apparatus, including:
the first receiving module is used for receiving a performance monitoring request sent by the terminal;
the first acquisition module is used for calling the data monitoring component to acquire the performance parameters of the server based on the performance monitoring request;
the second acquisition module is used for calling the data acquisition assembly to acquire a pre-configured acquisition path in the data acquisition assembly and acquiring corresponding performance parameters from the data monitoring assembly according to a preset period based on the acquisition path;
and the first display module is used for sending the collected performance parameters to the terminal so as to instruct the terminal to create a dashboard, and displaying the performance parameters in the dashboard in a graphical mode based on a preset graph type.
In a fourth aspect, the present application further provides a server performance monitoring apparatus, including:
the second sending module is used for sending a performance monitoring request to the server to instruct the server to collect performance parameters of the server based on the performance monitoring request, and calling the data collection assembly to obtain a pre-configured collection path in the data collection assembly, and collecting corresponding performance parameters from the data collection assembly according to a preset period based on the collection path;
the second receiving module is used for receiving the performance parameters sent by the server;
and the second display module is used for creating a dashboard and displaying the performance parameters in the dashboard in a graphical mode based on preset graph types.
The application also provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of the server performance monitoring method when executing the computer program.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of the server performance monitoring method described above.
In a fifth aspect, the present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the server performance monitoring method described below.
According to the method, the device, the computer equipment, the storage medium and the computer program product for monitoring the performance of the server, after the performance monitoring request sent by the terminal is received, the data monitoring component is called to collect the performance parameters of the server based on the performance monitoring request, the data collecting component is called to obtain the pre-configured collecting path in the data collecting component, the corresponding performance parameters are collected from the data monitoring component according to the preset period based on the collecting path, the performance parameters of the server can be collected through the data monitoring component and the data collecting component, the collected performance parameters are sent to the terminal, so that an instrument board is conveniently created by the terminal, the performance parameters are displayed in a graph mode in the instrument board based on the preset graph type, the display of the performance parameters of the server is realized, and the abnormality of the performance parameters of the server can be found in time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is an application environment diagram of a server performance monitoring method in one embodiment;
FIG. 2 is a flow chart of a method for monitoring server performance in one embodiment;
FIG. 3 is a flowchart of a method for monitoring server performance according to another embodiment;
FIG. 4 is a schematic diagram of a scenario of a server performance monitoring method in one embodiment;
FIG. 5 is a schematic diagram of a server performance monitoring apparatus according to an embodiment;
FIG. 6 is a schematic diagram of a server performance monitoring apparatus according to another embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The server performance monitoring method provided by the embodiment of the application can be applied to an application environment shown in figure 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The server receives a performance monitoring request sent by the terminal; the server calls a data monitoring component to generate a collection path of the performance parameters based on the performance monitoring request; the server calls a data acquisition component to acquire corresponding performance parameters of the acquisition path based on the acquisition path according to a preset period; and the server sends the collected performance parameters to the terminal so as to instruct the terminal to create a dashboard, and the performance parameters are graphically displayed in the dashboard based on a preset chart type. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In an exemplary embodiment, as shown in fig. 2, a method for monitoring server performance is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps 201 to 204.
Wherein:
step 201, a performance monitoring request sent by a terminal is received.
The terminal may issue performance monitoring requests to a plurality of servers in the server cluster in batches, and in this embodiment, one of the servers is used as an execution body to describe the performance monitoring requests.
The performance monitoring request comprises a server identifier, the server receives the performance monitoring request sent by the terminal, and if the server identifier in the performance monitoring request is consistent with the server identifier of the server, performance monitoring of the server is started.
Step 202, calling a data monitoring component to collect performance parameters of a server based on the performance monitoring request.
The data monitoring component can be a node_exporter, the node_exporter can collect performance data of the server, the collected performance is converted into a time sequence data format supported by the prometaus component, and then the prometaus component is waited to actively capture performance parameters collected by the node_exporter;
the node_exporter exposes the performance parameters of the server through the designated port (typically 9100 port of the node_exporter); the performance parameter specifically includes at least one of a central processor utilization, a memory occupancy, or a disk space of the server.
Step 203, calling a data acquisition component to acquire a pre-configured acquisition path in the data acquisition component, and acquiring corresponding performance parameters from a data monitoring component according to a preset period based on the acquisition path;
the data acquisition component comprises a configuration file, wherein an acquisition path for acquiring the performance parameters from the data monitoring component is preconfigured in the configuration file, the acquisition path comprises an internet protocol address (internet protocol address, an IP address) of a server to which the data monitoring component belongs and a port number (typically 9100 port of a node_exporter) of the data monitoring component, the data acquisition component can access the corresponding server based on the IP address, and the performance parameters are acquired from the data monitoring component of the server based on the port number of the data monitoring component.
The data acquisition component can be a promethaus component, and the preset period can be set according to the requirement;
the data monitoring component can collect performance data of the server in real time or periodically, the data collecting component can collect corresponding performance data from the data monitoring component according to a preset period, and the collection period of the performance data collected by the data collecting component can be the same as or different from that of the performance data collected by the data monitoring component.
And 204, sending the collected performance parameters to the terminal to instruct the terminal to create a dashboard, and displaying the performance parameters in the dashboard in a graphical mode based on the preset graph type.
The collected performance parameters are sent to the terminal, namely, the collected performance parameters of the data collection assembly;
the method comprises the steps that performance parameters acquired by a data acquisition component are sent to a terminal through an interface which is interacted with the terminal on a server, the terminal creates a dashboard through a visualization tool, and the performance parameters are displayed in the dashboard in a chart mode based on preset chart types;
the visualization tool may be a grafana tool, and the chart type of the preset value includes at least one of a bar chart, a line chart, a bar chart, or a combined chart.
According to the scheme, after the performance monitoring request sent by the terminal is received, the data monitoring component is called to collect the performance parameters of the server based on the performance monitoring request, the data collecting component is called to obtain the collection path preconfigured in the data collecting component, the corresponding performance parameters are collected from the data monitoring component according to the preset period based on the collection path, the performance parameters of the server can be collected through the data monitoring component and the data collecting component, the collected performance parameters are sent to the terminal, so that the terminal can conveniently establish a dashboard, the performance parameters are displayed in the dashboard in a chart mode based on the preset chart type, the display of the performance parameters of the server is realized, and the abnormality of the performance parameters of the server can be found in time.
In one embodiment, after the performance parameters are collected from the data monitoring component according to a preset period based on the collection path, the method includes:
storing the performance parameters collected each time in a time sequence database pre-configured by the server;
the server collects performance data once in each preset period, and stores the performance parameters in a time sequence database after each time of collection, wherein the time sequence database can store the performance parameters according to the collection time sequence;
the embodiment corresponds to the case that each server in the server cluster is provided with a time sequence database, the time sequence database pre-configured by the server is the time sequence database installed by the server itself, the performance parameters acquired by the server are stored in the time sequence database installed by the server itself, and the stored performance data can be acquired from the time sequence database of the server itself later;
the present application also makes it possible that the time sequence database is installed in other servers in the server cluster where the server is located, i.e. the server may multiplex the time sequence database in other servers for data storage.
Specifically, a time sequence database is deployed on one server, then data of other servers are sent to the time sequence database for storage, and the other servers do not need to independently deploy the time sequence database. The time-series database storage of the collected performance parameters to other servers may be accomplished by configuring the "remote_write" function of the data collection component.
When the time series database of the other server is multiplexed, whether the time series data stream storage space is enough or not needs to be considered, and when the time series database in the other server is stored in enough free space, the time series database can be multiplexed to store the performance data.
Sending the collected performance parameters to the terminal, including: extracting identification information and authentication information of a time sequence database from the performance monitoring request; extracting performance parameters in a preset data transmission period from a time sequence database based on the identification information and the authentication information; and sending the extracted performance parameters to the terminal.
The server extracts identification information of the time sequence database from the performance monitoring request, wherein the identification information is used for uniquely identifying one time sequence database, and the authentication information is used for carrying out authorization authentication on an access object by the time sequence database;
the preset data transmission period is generally greater than the preset period for collecting performance data, for example, performance data may be collected every 5S and stored in the time sequence database, and performance parameters may be extracted from the time sequence database every 5 min.
In this embodiment, the performance data stored in the time sequence database may be extracted and sent to the terminal after the preset data sending period arrives, instead of the performance parameters collected in each preset period being sent to the terminal, so that frequent sending of the performance data to the terminal may be avoided.
In one embodiment, the performance monitoring request further includes a time range and a monitoring target, and extracting performance parameters in a preset data transmission period from the time sequence database based on the identification information and the authentication information includes: performing authorization authentication of the time sequence database based on the authentication information under the condition that the time sequence database indicated by the identification information is a pre-configured time sequence database; if the authentication is passed, determining performance parameters matched with the monitoring target in a preset data transmission period from a time sequence database; extracting performance parameters in a time range from the matched performance parameters.
The server determines whether the time sequence database indicated by the identification information is consistent with a time sequence database pre-configured in the server, if so, further, based on the authentication information, authorization authentication of the time sequence database is carried out, if the authentication is passed, performance parameters in a preset data transmission period are determined from the time sequence database, then performance parameters matched with a monitoring target are determined from the performance parameters in the data transmission period, the monitoring target refers to the purpose of performance monitoring of the server, for example, the monitoring target is central processor performance monitoring of the server, the performance parameters matched with the monitoring target are central processor utilization, for example, the monitoring target is disk performance monitoring of the server, the performance parameters matched with the monitoring target are disk utilization, for example, the monitoring target is the katon monitoring of the server, and the performance parameters matched with the monitoring target are central processor utilization, disk utilization and exchange (swap) space utilization.
The server extracts performance parameters in a time range from the performance parameters matched with the monitoring target, wherein the time range is smaller than or equal to a preset data transmission period, for example, the preset data transmission period is 10min, and the performance parameters from 1min to 5min can be extracted from the performance parameters in 10min, or when the abnormal value of the performance parameter exists in a certain performance parameter, the abnormal value of the performance parameter, the performance parameter values in the time period before the abnormal value of the performance parameter and the time period after the abnormal value of the performance parameter are extracted through setting the time range.
In an embodiment of the present application, one possible case is: each server in the server cluster can be respectively provided with a data monitoring component and a data acquisition component, namely the data monitoring component and the data acquisition component are both configured in the server;
under the condition that the data monitoring component and the data acquisition component are configured on the server, calling the data monitoring component to acquire the performance parameters of the server based on the performance monitoring request means that the server calls the configured data monitoring component in the server to acquire the performance parameters of the server based on the performance monitoring request; invoking the data acquisition component refers to invoking the configured data acquisition component in the server by the server;
Alternatively, another possible scenario is; at least one of the data monitoring component or the data acquisition component is configured in other servers in a server cluster to which the server belongs. Each server in the server cluster may multiplex a data monitoring component and a data acquisition component, specifically comprising:
case 1: the server A is provided with a data acquisition component but not a data monitoring component, other servers in the server cluster are provided with data monitoring components, and the server A multiplexes the data monitoring components in the other servers;
the application is embodied as follows: the A server sends a call request for the data monitoring component to other servers, the other servers judge whether the load of the data monitoring component configured by the other servers accords with corresponding preset conditions, the load accords with the preset conditions to indicate that the load is smaller than a preset load threshold, the data monitoring component has residual load capacity, or the load accords with the preset conditions to indicate that the load is close to 0, namely, the data monitoring component is in an idle state, the other servers return component information of the data monitoring component to the A server (the component information indicates that the data monitoring component is called by accessing a target interface of the data monitoring component), the A server calls the data monitoring component in the B server to acquire performance parameters of the A server based on the component information, the A server calls the data acquisition component configured by the A server, acquires the performance parameters from the data monitoring component of the B server according to a preset period, and monitors the performance of the A server based on the performance parameters.
In this embodiment, since the performance parameters of the a server are collected by the data monitoring component of the B server, the a server may remind the data collecting component that the IP address of the B server and the port number of the data monitoring component in the B server need to be extracted from the configuration file at this time, so that performance data is collected from the data monitoring component of the B server based on the IP address and the port number.
Case 2: the server A is provided with a data monitoring component but not a data acquisition component, other servers in the server cluster are provided with data acquisition components, and the server A multiplexes the data acquisition components in the other servers;
the data acquisition component is configured in a server different from the server, and before the data acquisition component is called to acquire the acquisition path preconfigured in the data acquisition component, the method comprises the following steps: sending a component calling request to the other servers, and receiving component information returned by the other servers when the load of the data acquisition component is detected to be in accordance with a preset condition; and determining the data acquisition component based on the component information.
The specific implementation is as follows: the method comprises the steps that an A server calls a data monitoring component of the A server to collect performance parameters of the A server, the A server sends a call request for the data collecting component to other servers, the other servers judge whether loads of the data collecting component configured by the A server meet corresponding preset conditions or not, the loads meet the preset conditions to be smaller than a preset load threshold, the data collecting component is indicated to have residual load capacity to collect data, or the loads of the data collecting component meet the preset conditions to be close to 0, namely the data collecting component is indicated to be in an idle state, the other servers return component information of the data collecting component to the A server (the component information indicates that a target interface of the data collecting component is accessed to call the data collecting component), the A server calls the data collecting component in the B server based on the component information, the collected performance parameters are collected from the data monitoring component of the A server according to a preset period, and the collected performance parameters are sent to the A server, and the A server monitors the performance of the A server based on the performance parameters.
In this embodiment, since the performance parameter is collected from the data monitoring component of the a server by the data collecting component of the B server, the a server may remind the data collecting component that the IP address of the a server and the port number of the data monitoring component of the a server need to be extracted from the configuration file at this time, so that the performance data is collected from the data monitoring component of the a server based on the IP address and the port number.
In the embodiment of the application, the data monitoring component, the data acquisition component and the time sequence database can be shared among the servers of the server cluster, so that the complexity of configuration and maintenance is reduced. And meanwhile, the load conditions of the data monitoring component, the data acquisition component and the time-ordered database are considered, so that single-point faults are avoided.
In one embodiment, a service management tool of the server may be used to ensure that the data monitoring component and the data acquisition component are automatically started upon startup of the server, specifically:
based on the system type of the system where the server is located, a service management tool matched with the system type is determined, and a data monitoring component and a data acquisition component are started through the service management tool. For example:
if the system where the server is located is a Linux system, the node_exporter and promethaus are automatically started by the system md: creating a 'node_exporter' file and a 'precursor' file, and configuring starting parameters and paths; the services are enabled using the "systemctl enable node _exporter" and "systemctl enable prometheus" commands so that node_exporter and promethaus start up automatically upon server start up.
If the system where the server is located is a Windows system, a service management tool matched with the Windows system can be used to configure the node_exporter and the promethaus as services, and the node_exporter and the promethaus are set to be started automatically when the server is started.
With these configurations, it is ensured that the data monitoring component and the data acquisition component can be automatically started upon startup of the server. This association ensures that the collection and storage of performance data is automated, effectively enabling server performance monitoring.
One possible scenario of the embodiment of the application is: the promethaus will obtain performance parameters from the node_exporter exposed interface via the hypertext transfer protocol (hyperText transfer protocol, HTTP) protocol. The method specifically comprises the following steps:
configuration of node_exporter: the node_exporter is configured on the server so that it can expose the performance parameters of the server. The node_exporter listens to a designated port, such as the default 9100 port.
Configuration of promethaus: in the profile of prometaus, a job (job) configuration and a target (target) configuration need to be added, the job configuration instructs prometaus to collect data from the node_exporter, and the target configuration specifies the IP addresses of all servers where the node_exporter is deployed and the port numbers of the node_exporter to specify from which servers index data is collected. The implementation code is as follows:
“scrape_configs:
-job_name:'node_exporter'
static_configs:
-targets:['node_exporter_ip:9100','other_node_exporter_ip:9100']”
In this way, promethaus knows from which servers to collect data.
promethaus automatically acquires data: the promethaus will periodically obtain performance parameters from each node_exporter according to the time interval set in the configuration and store the data into the timing database of the promethaus.
With the above configuration, prometaus acquires index data from the server where node_exporter is deployed, and then stores the data in its own database. This configuration allows you to monitor, store and analyze the server performance metrics in real time.
In an exemplary embodiment, as shown in fig. 3, a method for monitoring server performance is provided, and an example of application of the method to the server in fig. 1 is described, which includes the following steps 301 to 303.
Wherein:
step 301, sending a performance monitoring request to a server to instruct the server to collect performance parameters of the server based on the performance monitoring request, calling a data collection assembly to obtain a pre-configured collection path in the data collection assembly, and collecting corresponding performance parameters from the data collection assembly according to a preset period based on the collection path;
step 302, receiving performance parameters sent by a server;
Step 303, creating a dashboard, and graphically displaying performance parameters in the dashboard based on preset graph types.
The steps of this embodiment are the same as those of the embodiment shown in fig. 2, and the specific implementation manner thereof is not described herein.
In one embodiment, sending a performance monitoring request to a server includes:
and sending performance monitoring requests and configuration updating instructions to a plurality of servers, wherein each performance monitoring request comprises a server identifier so that each server can update the configured data monitoring component and the data acquisition component based on the configuration updating instructions, and based on the server identifier, invoking the updated data monitoring component to acquire the performance parameters of the server, invoking the updated data acquisition component to acquire a preconfigured acquisition path in the updated data acquisition component, and acquiring the corresponding performance parameters from the updated data monitoring component according to a preset period based on the acquisition path.
The terminal can respectively issue a performance monitoring request and a configuration updating instruction to each server in the server cluster through an open source operation and maintenance automation tool, wherein the open source operation and maintenance automation tool can be an active component, and the configuration updating instruction comprises an instruction for indicating at least one of a server updating data monitoring component, a data acquisition component or time sequence data, so that the server carries out corresponding configuration updating based on the configuration updating instruction;
The performance monitoring request issued by the terminal to each server comprises a server identifier, each server monitors the server when determining that the received server identifier is consistent with the identifier of the server, and the server can collect and monitor the performance data of the acquisition server based on the updated data acquisition and call the updated data acquisition component at the same time, wherein the updated data acquisition component is provided with an acquisition path, and the data acquisition component acquires corresponding performance parameters from the updated data monitoring component according to a preset period based on the acquisition path.
In this embodiment, the monitoring scheme is combined with server configuration management, so as to implement more comprehensive server management and maintenance.
In this embodiment, the performance parameters of the server extracted from the time sequence database by the visualization tool may be analyzed and visually displayed, which specifically includes:
1. configuration data source:
in the visualization tool, it is first necessary to configure a time series database as a data source. Identification information (the identification information includes a database address, or a database name), authentication information of the time series database needs to be provided.
And the terminal acquires the performance parameters of the server from the time sequence database by calling the visualization tool.
2. Data analysis:
the terminal may process the performance parameters using techniques such as aggregation, filtering, etc. to reduce the amount of data.
And determining statistical information of the performance parameters, wherein the statistical information comprises an average value, a maximum value, a minimum value and an abnormal value of the performance parameters.
3. Visual display:
a. creating a dashboard:
in the visualization tool, a dashboard is created.
b. Adding charts and panels:
in the dashboard, chart types and panels may be added for performance parameter visualization. In the instrument panel, a plurality of panels may be added, and different performance parameters may be displayed on different panels.
An appropriate chart type may be selected, and the performance parameters are presented in the panel based on the selected chart type.
c. Writing a query statement:
query statements need to be written to retrieve data from the time series database. The query statement includes a time range and monitoring targets, and as mentioned above, performance parameters in different time ranges may be screened, and performance parameters matched with different monitoring targets may also be screened.
d. Visual data:
the visual content comprises: a real-time performance index trend graph, such as CPU utilization rate, memory use condition, and the condition that the value of network flow changes along with time; a historical performance index chart, which can select performance indexes within a specific time period; alarming and abnormality monitoring, wherein when a certain performance index exceeds a threshold value, the system can automatically generate an alarm and mark an abnormal point on the chart; and the server topological graph shows the layout and connection condition of the servers.
Graphically displaying the performance parameters in the dashboard based on a preset chart type, including: determining statistical information of the performance parameters, wherein the statistical information comprises an average value, a maximum value, a minimum value, a performance parameter abnormal value and abnormal trend information; graphically displaying at least one of the average value, the maximum value, the minimum value, and the abnormal trend information in the instrument panel based on a preset chart type; and/or graphically displaying the performance parameters in the instrument panel based on a preset chart type, and marking the performance parameter abnormal values in the performance parameters.
The visualization tool graphically displays performance parameters according to the query result, and specifically includes:
one possible scenario is: the performance parameters can be divided into a plurality of time periods, the average value, the maximum value, the minimum value and the like of the performance parameters in each time period are calculated, and the average value, the maximum value and the minimum value of each time period are graphically displayed in a panel of the instrument board based on a preset graph type;
another possible case is: graphically displaying performance parameters of each time period in a panel of the instrument board based on a preset chart type, and marking abnormal values of the performance parameters;
Another possible case is: based on the preset chart type, the abnormal trend information is graphically displayed in the instrument panel.
The chart may be further customized, including labeling, axes, and titles, etc., to make the performance parameters more apparent.
The analysis and visual display of the performance parameters aims to:
and (3) real-time monitoring: the performance parameters of the server, the state changes of the performance parameters and the like can be monitored in real time through the real-time chart and the instrument panel.
Trend analysis: through historical performance parameters, the trend of performance indexes can be analyzed, and the performance and the change of the server in different time periods can be known.
Performance optimization: analyzing the data can identify performance bottlenecks, finding out performance parameters that need to be optimized, thereby improving the performance of the server.
Prediction problem: by analyzing the trend of the performance parameters, the performance parameters can be predicted within a period of time in the future, so that the possible problems can be predicted, preventive measures can be taken in advance, and server faults can be avoided.
Capacity planning: the service condition of the server resource is known, so that capacity planning is performed, and sufficient resources are ensured.
In summary, the overall scheme of the application is as follows:
The terminal issues performance monitoring requests to each server in a server cluster through an active component, each server in the server cluster is pre-configured with a node exporter, prometheus component and a time sequence database, for any server, the server calls the configured node exporter to collect the performance parameters of the server, the node exporter exposes the performance parameters of the server through a 9100 port, the server calls the configured precursor component, the configuration information of the precursor component comprises a job configuration and a target configuration, the job configuration indicates the precursor to collect data from the node exporter, the target configuration specifies the IP address of the server and the port number of the node exporter, the precursor component collects the performance parameters of the server once every 5S from the node exporter based on the configuration information, then the performance parameters are stored in the time sequence database installed on the server, the performance parameters are repeatedly collected and stored every 5S each cycle, after the terminal reaches a 5S period, the terminal is sent to a column form, and the performance trend is created for the terminal in the form of the terminal.
Referring to fig. 4, a request initiator (master) in the terminal map reaches a node_exporter through a performance monitoring request issued by an active component, the node_exporter collects performance parameters of a server, and a promethaus component obtains the performance parameters from the node_exporter and stores the performance parameters in a time sequence database, and a remote dictionary (remote dictionary server, redis) can be configured for each master to store data.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a server performance monitoring device for realizing the above-mentioned related server performance monitoring method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation of one or more embodiments of the server performance monitoring device provided below may refer to the limitation of the server performance monitoring method hereinabove, and will not be repeated herein.
In one exemplary embodiment, as shown in fig. 5, there is provided a server performance monitoring apparatus 500 comprising:
a first receiving module 501, configured to receive a performance monitoring request sent by a terminal;
the first collection module 502 is configured to invoke a data monitoring component to collect performance parameters of a server based on the performance monitoring request;
a second acquisition module 503, configured to invoke a data acquisition component to acquire a preconfigured acquisition path in the data acquisition component, and acquire corresponding performance parameters from the data monitoring component according to a preset period based on the acquisition path;
and the first display module 504 is configured to send the collected performance parameters to the terminal, so as to instruct the terminal to create a dashboard, and graphically display the performance parameters in the dashboard based on a preset chart type.
Optionally, after the second acquisition module 503 acquires the performance parameters from the data monitoring component according to a preset period based on the acquisition path, the apparatus further includes:
the storage module is used for storing the performance parameters acquired each time in a time sequence database pre-configured by the server;
the first display module 504 is specifically configured to, when sending the collected performance parameters to the terminal:
extracting identification information and authentication information of the time sequence database from the performance monitoring request;
extracting performance parameters in a preset data transmission period from the time sequence database based on the identification information and the authentication information;
and sending the extracted performance parameters to the terminal.
Optionally, the performance monitoring request further includes a time range and a monitoring target, and the display module 504 is specifically configured to, when extracting, based on the identification information and the authentication information, the performance parameter in the preset data transmission period from the time-series database:
performing authorization authentication of the time sequence database based on the authentication information under the condition that the time sequence database indicated by the identification information is the pre-configured time sequence database;
If the authentication is passed, determining performance parameters matched with the monitoring target in the preset data sending period from the time sequence database; extracting the performance parameters in the time range from the matched performance parameters.
Optionally, the data monitoring component and the data acquisition component are both configured in the server;
or at least one of the data monitoring component or the data acquisition component is configured in other servers in the server cluster to which the server belongs.
Optionally, the data acquisition component is configured in a server other than the server, and before the second acquisition module 503 calls the data acquisition component to acquire the pre-configured acquisition path in the data acquisition component, the apparatus further includes:
the first sending module is used for sending a component calling request to the other servers and receiving component information returned by the other servers when the load of the data acquisition component is detected to be in accordance with a preset condition;
and the determining module is used for determining the data acquisition component based on the component information.
Referring to fig. 6, there is also provided a server performance monitoring apparatus 600, comprising:
A second sending module 601, configured to send a performance monitoring request to a server, so as to instruct the server to collect performance parameters of the server based on the performance monitoring request, call a data collection component to obtain a collection path preconfigured in the data collection component, and collect corresponding performance parameters from the data collection component according to a preset period based on the collection path;
a second receiving module 602, configured to receive the performance parameter sent by the server;
a second display module 603 is configured to create a dashboard, and graphically display the performance parameters in the dashboard based on a preset chart type.
In one embodiment, the second sending module 601 is specifically configured to, when sending a performance monitoring request to a server:
and sending performance monitoring requests and configuration updating instructions to a plurality of servers, wherein each performance monitoring request comprises a server identifier so that each server can update the configured data monitoring assembly and data acquisition assembly based on the configuration updating instructions, and calling the updated data monitoring assembly to acquire performance parameters of the servers based on the server identifier, calling the updated data acquisition assembly and acquiring the preconfigured acquisition path in the updated data acquisition assembly, and acquiring the performance parameters from the updated data monitoring assembly according to a preset period based on the acquisition path.
Optionally, the second display module 603 is specifically configured to, when graphically displaying the performance parameter in the dashboard based on a preset chart type:
determining statistical information of the performance parameters, wherein the statistical information comprises an average value, a maximum value, a minimum value, a performance parameter abnormal value and abnormal trend information;
graphically displaying at least one of the average value, the maximum value, the minimum value, and the abnormal trend information in the instrument panel based on a preset chart type;
and/or graphically displaying the performance parameters in the instrument panel based on a preset chart type, and marking the performance parameter abnormal values in the performance parameters.
The modules in the server performance monitoring apparatus described above may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one exemplary embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing server performance data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of server performance monitoring.
It will be appreciated by those skilled in the art that the structure shown in FIG. 7 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one exemplary embodiment, a computer device is provided that includes a memory having a computer program stored therein and a processor that when executing the computer program performs the steps of the server performance monitoring method described above.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor implements the steps of the server performance monitoring method described above.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, implements the steps of the server performance monitoring method described below.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are both information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (13)

1. A method for monitoring server performance, the method comprising:
receiving a performance monitoring request sent by a terminal;
invoking a data monitoring component to collect performance parameters of a server based on the performance monitoring request;
invoking a data acquisition component to acquire a pre-configured acquisition path in the data acquisition component, and acquiring corresponding performance parameters from the data monitoring component according to a preset period based on the acquisition path;
And sending the collected performance parameters to the terminal to instruct the terminal to create a dashboard, and displaying the performance parameters in the dashboard in a graphical mode based on a preset graph type.
2. The method of claim 1, wherein after the performance parameters are collected from the data monitoring component at a preset period based on the collection path, comprising:
storing the performance parameters collected each time in a time sequence database pre-configured by the server;
the sending the collected performance parameters to the terminal comprises the following steps:
extracting identification information and authentication information of the time sequence database from the performance monitoring request;
extracting performance parameters in a preset data transmission period from the time sequence database based on the identification information and the authentication information;
and sending the extracted performance parameters to the terminal.
3. The method according to claim 2, wherein the performance monitoring request further includes a time range and a monitoring target, and the extracting performance parameters in a preset data transmission period from the time sequence database based on the identification information and the authentication information includes:
Performing authorization authentication of the time sequence database based on the authentication information under the condition that the time sequence database indicated by the identification information is the pre-configured time sequence database;
if the authentication is passed, determining performance parameters matched with the monitoring target in the preset data sending period from the time sequence database; extracting the performance parameters in the time range from the matched performance parameters.
4. The method of claim 2, wherein the data monitoring component and the data acquisition component are both disposed in the server;
or at least one of the data monitoring component or the data acquisition component is configured in other servers in the server cluster to which the server belongs.
5. The method of claim 4, wherein the data acquisition component is configured in a server other than the server, and wherein the invoking the data acquisition component before acquiring the pre-configured acquisition path in the data acquisition component comprises:
sending a component calling request to the other servers, and receiving component information returned by the other servers when the load of the data acquisition component is detected to be in accordance with a preset condition;
And determining the data acquisition component based on the component information.
6. A method for monitoring server performance, the method comprising:
sending a performance monitoring request to a server to instruct the server to call a data monitoring component to acquire performance parameters of the server based on the performance monitoring request, call a data acquisition component to acquire a pre-configured acquisition path in the data acquisition component, and acquire corresponding performance parameters from the data monitoring component according to a preset period based on the acquisition path;
receiving the performance parameters sent by the server;
a dashboard is created and the performance parameters are graphically presented in the dashboard based on a preset chart type.
7. The method of claim 6, wherein the sending the performance monitoring request to the server comprises:
and sending performance monitoring requests and configuration updating instructions to a plurality of servers, wherein each performance monitoring request comprises a server identifier so that each server can update the configured data monitoring assembly and data acquisition assembly based on the configuration updating instructions, and calling the updated data monitoring assembly to acquire performance parameters of the servers based on the server identifier, calling the updated data acquisition assembly to acquire the preconfigured acquisition paths in the updated data acquisition assembly, and acquiring corresponding performance parameters from the updated data monitoring assembly according to a preset period based on the acquisition paths.
8. The method of claim 6, wherein graphically displaying the performance parameter in the dashboard based on a preset chart type comprises:
determining statistical information of the performance parameters, wherein the statistical information comprises an average value, a maximum value, a minimum value, a performance parameter abnormal value and abnormal trend information;
graphically displaying at least one of the average value, the maximum value, the minimum value, and the abnormal trend information in the instrument panel based on a preset chart type;
and/or graphically displaying the performance parameters in the instrument panel based on a preset chart type, and marking the performance parameter abnormal values in the performance parameters.
9. A server performance monitoring apparatus, comprising:
the first receiving module is used for receiving a performance monitoring request sent by the terminal;
the first acquisition module is used for calling the data monitoring component to acquire the performance parameters of the server based on the performance monitoring request;
the second acquisition module is used for calling the data acquisition assembly to acquire a pre-configured acquisition path in the data acquisition assembly and acquiring corresponding performance parameters from the data monitoring assembly according to a preset period based on the acquisition path;
And the first display module is used for sending the collected performance parameters to the terminal so as to instruct the terminal to create a dashboard, and displaying the performance parameters in the dashboard in a graphical mode based on a preset graph type.
10. A server performance monitoring apparatus, comprising:
the second sending module is used for sending a performance monitoring request to the server to instruct the server to collect performance parameters of the server based on the performance monitoring request, and calling the data collection assembly to obtain a pre-configured collection path in the data collection assembly, and collecting corresponding performance parameters from the data collection assembly according to a preset period based on the collection path;
the second receiving module is used for receiving the performance parameters sent by the server;
and the second display module is used for creating a dashboard and displaying the performance parameters in the dashboard in a graphical mode based on preset graph types.
11. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 8 when the computer program is executed.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 8.
13. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 8.
CN202311200095.7A 2023-09-18 2023-09-18 Server performance monitoring method, device, computer equipment and storage medium Pending CN117194165A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311200095.7A CN117194165A (en) 2023-09-18 2023-09-18 Server performance monitoring method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311200095.7A CN117194165A (en) 2023-09-18 2023-09-18 Server performance monitoring method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117194165A true CN117194165A (en) 2023-12-08

Family

ID=88984803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311200095.7A Pending CN117194165A (en) 2023-09-18 2023-09-18 Server performance monitoring method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117194165A (en)

Similar Documents

Publication Publication Date Title
US11550829B2 (en) Systems and methods for load balancing in a system providing dynamic indexer discovery
CN112910945B (en) Request link tracking method and service request processing method
US9093841B2 (en) Power distribution network event correlation and analysis
US10116534B2 (en) Systems and methods for WebSphere MQ performance metrics analysis
CN108509313B (en) Service monitoring method, platform and storage medium
CN110309109B (en) Data monitoring method, device, computer equipment and storage medium
CN111400367B (en) Service report generation method, device, computer equipment and storage medium
CN107404417A (en) A kind of processing method of monitoring data, processing unit and processing system
CN112148700A (en) Log data processing method and device, computer equipment and storage medium
WO2019169765A1 (en) Electronic device, method for acquiring state information in cluster environment, system, and storage medium
CN113760641A (en) Service monitoring method, device, computer system and computer readable storage medium
CN115248826B (en) Method and system for large-scale distributed graph database cluster operation and maintenance management
CN112328448A (en) Zookeeper-based monitoring method, monitoring device, equipment and storage medium
CN103973516A (en) Method and device for achieving monitoring function in data processing system
CN115883407A (en) Data acquisition method, system, equipment and storage medium
CN114157679A (en) Cloud-native-based distributed application monitoring method, device, equipment and medium
CN114064402A (en) Server system monitoring method
CN113570476A (en) Container service monitoring method of power grid monitoring system based on custom alarm rule
CN117194165A (en) Server performance monitoring method, device, computer equipment and storage medium
CN114816914A (en) Data processing method, equipment and medium based on Kubernetes
CN109766238B (en) Session number-based operation and maintenance platform performance monitoring method and device and related equipment
CN108415808B (en) Real-time visual monitoring method, system, equipment and medium for access distribution unit
CN112596974A (en) Full link monitoring method, device, equipment and storage medium
CN112527595A (en) Monitoring method and device for Greenplus cluster database and computer equipment
CN117097599B (en) Network service detection method, device, computer equipment and storage medium

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