CN116627778A - Service system performance monitoring method and device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN116627778A
CN116627778A CN202310369294.4A CN202310369294A CN116627778A CN 116627778 A CN116627778 A CN 116627778A CN 202310369294 A CN202310369294 A CN 202310369294A CN 116627778 A CN116627778 A CN 116627778A
Authority
CN
China
Prior art keywords
interface
time sequence
preset
information
preset time
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
CN202310369294.4A
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.)
Shenzhen Fulin Technology Co Ltd
Original Assignee
Shenzhen Fulin Technology 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 Shenzhen Fulin Technology Co Ltd filed Critical Shenzhen Fulin Technology Co Ltd
Priority to CN202310369294.4A priority Critical patent/CN116627778A/en
Publication of CN116627778A publication Critical patent/CN116627778A/en
Pending legal-status Critical Current

Links

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
    • G06F11/349Performance evaluation by tracing or monitoring for interfaces, buses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application belongs to the technical field of computers, and relates to a service system performance monitoring method, a service system performance monitoring device, computer equipment and a storage medium. The monitoring method includes the steps that interface information of each interface in a service system is collected, the interface information comprises interface names, interface identifiers and corresponding performance indexes, the interface identifiers of the interfaces are matched with preset interface identifiers to obtain matching information, the matching information is configured in a preset time sequence database, the preset time sequence database is operated, and when the time sequence database is determined to be communicated, target interface identifiers to be displayed are obtained from the preset time sequence database. When the performance index of the service system is monitored through the time sequence database, the memory storage is smaller and the index acquisition speed is faster.

Description

Service system performance monitoring method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for monitoring performance of a service system, a computer device, and a storage medium.
Background
With the rapid development of SaaS (Software as a Service software operating services), a customer group has a need to build a private deployment link in addition to using services in the SaaS environment. However, in such a demand background, how to quickly and efficiently monitor the performance index of the service gradually becomes an urgent solution, and the industry usually uses promethaus to implement the monitoring, where promethaus is a solution for data monitoring, and is characterized by being capable of grasping the running state of the system at any time, quickly positioning the problem and removing the fault, but in the case that the data volume collected by promethaus is large, there is a problem that the memory grows too fast.
Disclosure of Invention
The embodiment of the application aims to provide a service system performance monitoring method, a device, computer equipment and a storage medium, which are used for solving the problem that the memory is excessively fast to increase when the acquired data volume of Prometheus is large.
In order to solve the above technical problems, the embodiment of the present application provides a method for monitoring performance of a service system, which adopts the following technical scheme:
collecting interface information of each interface in a service system, wherein the interface information comprises an interface name, an interface identifier and corresponding performance indexes;
matching the interface identifiers of the interfaces with preset interface identifiers to obtain matching information;
configuring the matching information in a preset time sequence database, and operating the preset time sequence database; and
verifying whether the preset time sequence databases are communicated, acquiring a target interface identifier to be displayed from the preset time sequence databases when the preset time sequence databases are communicated, and displaying the interface names and performance indexes of the interfaces corresponding to the target interface identifier on a visual page.
Further, the step of matching the interface identifier of each interface with a preset interface identifier to obtain matching information includes:
Matching the interface identifiers of all interfaces with the preset interface identifiers based on a preset regular expression, wherein the preset interface identifiers comprise at least two interfaces;
if one or more interface identifiers are successfully matched with one of the preset interface identifiers, storing the interface names and the performance indexes corresponding to the one or more interface identifiers in a target storage area, wherein the target storage area is a storage area corresponding to the preset interface identifiers in a classification storage library, and the storage areas corresponding to the preset interface identifiers are different; and
and taking interface information of all interfaces stored in the target storage area as the matching information.
Further, after the step of using the interface information of all the interfaces stored in the target storage area as the matching information, the method further includes:
checking whether the matching information accords with the expectation;
if the verification meets the expectation, executing the step of verifying whether the preset time sequence database is communicated; and
and if the verification does not meet the expectation, returning to the step of executing the matching of the matching information according to the preset matching rule to obtain the target performance index information.
Further, the step of verifying whether the matching information meets the expectations includes:
any one interface in the target storage area corresponding to the matching information is obtained to serve as a check interface, and a check interface identifier corresponding to the check interface is obtained;
if the verification interface identifier is consistent with the preset interface identifier corresponding to the target storage area, the matching information accords with the expectation; and
and if the verification interface identifier is inconsistent with the preset interface identifier corresponding to the target storage area, the matching information is inconsistent with the expectation.
Further, the step of collecting interface information of each interface in the service system includes:
placing Nginx Lua exporter performance libraries into a Lua library and embedding the Lua library in an nginnx module;
receiving and responding to an information acquisition instruction, and outputting the information acquisition instruction by using a log access control of the Nginx component to generate an Nginx log; and
and acquiring interface information of each interface in the service system according to the Nginx log.
Further, the step of configuring the matching information in a preset time sequence database and running the preset time sequence database further includes:
Acquiring a mirror image installation package or a binary installation package of the preset time sequence database, decompressing and installing to generate a Prometheus. Yaml file; and
and configuring port information of the Nginx Lua exporter performance library and the matching information in the Prometaus.yaml file, writing local port information of the preset time sequence database into the Prometaus.yaml file, and running the Prometaus.yaml file.
Further, when the preset time sequence database is determined to be communicated, a target interface identifier to be displayed is obtained from the preset time sequence database, and the interface names and performance indexes of the interfaces corresponding to the target interface identifier are displayed in a visual page, which comprises the following steps:
configuring a port of a preset index display tool according to the Prometaus database and the local port information of the preset time sequence database;
connecting the preset time sequence database by using the preset index display tool, and verifying whether a connection port of the preset index display tool is effective;
if the target interface identification is effective, acquiring the target interface identification to be displayed from the preset time sequence database; and
And displaying the interface names and the performance indexes of the interfaces corresponding to the target interface identifiers in the page of the preset index display tool.
In order to solve the above technical problem, an embodiment of the present application further provides a service system performance monitoring device, including:
the system comprises an acquisition module, a service system and a service system, wherein the acquisition module is used for acquiring interface information of each interface in the service system, and the interface information comprises an interface name, an interface identifier and a corresponding performance index;
the matching module is used for matching the interface identifiers of the interfaces with preset interface identifiers to obtain matching information;
the configuration module is used for configuring the matching information in a preset time sequence database and running the preset time sequence database; and
the display module is used for verifying whether the preset time sequence databases are communicated, acquiring a target interface identifier to be displayed from the preset time sequence databases when the preset time sequence databases are determined to be communicated, and displaying the interface names and the performance indexes of the interfaces corresponding to the target interface identifier on a visual page.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, where the computer device includes a memory and a processor, where the memory stores computer readable instructions, and the processor implements the steps of the service system performance monitoring method described above when executing the computer readable instructions.
To solve the above technical problem, the embodiments of the present application further provide a computer readable storage medium, where computer readable instructions are stored on the computer readable storage medium, where the computer readable instructions implement the steps of the service system performance monitoring method as described above when executed by a processor.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
the application acquires interface information of each interface in a service system, wherein the interface information comprises an interface name, an interface identifier and a corresponding performance index, matches the interface identifier of each interface with a preset interface identifier to obtain matching information, configures the matching information in a preset time sequence database, operates the preset time sequence database, finally verifies whether the preset time sequence database is communicated, acquires a target interface identifier to be displayed from the preset time sequence database when the preset time sequence database is determined to be communicated, and displays the interface name and the performance index of each interface corresponding to the target interface identifier on a visual page. Therefore, when the performance index of the service system is monitored through the time sequence database, the memory storage is smaller and the index acquisition speed is faster.
Drawings
In order to more clearly illustrate the solution of the present application, a brief description will be given below of the drawings required for the description of the embodiments of the present application, it being apparent that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained from these drawings without the exercise of inventive effort for a person of ordinary skill in the art.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow chart of one embodiment of a business system performance monitoring method according to the present application;
FIG. 3 is a schematic diagram illustrating one embodiment of a business system performance monitoring apparatus in accordance with the present application;
FIG. 4 is a schematic structural diagram of one embodiment of a computer device in accordance with the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description of the application and the claims and the description of the drawings above are intended to cover a non-exclusive inclusion. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In order to make the person skilled in the art better understand the solution of the present application, the technical solution of the embodiment of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as a web browser application, a shopping class application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, electronic book readers, MP3 players (Moving Picture Experts Group Audio Layer III, dynamic video expert compression standard audio plane 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video expert compression standard audio plane 4) players, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the method for monitoring performance of a service system provided by the embodiment of the present application is generally executed by a server, and accordingly, the device for monitoring performance of a service system is generally disposed in the server.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow chart of one embodiment of a business system performance monitoring method according to the present application is shown. The service system performance monitoring method comprises the following steps:
Step S201, collecting interface information of each interface in the service system, wherein the interface information comprises an interface name, an interface identifier and a corresponding performance index.
In this embodiment, the electronic device (e.g., the server shown in fig. 1) on which the service system performance monitoring method operates may be connected by a wired connection manner or a wireless connection manner. It should be noted that the wireless connection may include, but is not limited to, 3G/4G/5G connection, wiFi connection, bluetooth connection, wiMAX connection, zigbee connection, UWB (ultra wideband) connection, and other now known or later developed wireless connection.
In this embodiment, a server on which the performance monitoring method of the service system operates is exemplified, and the server collects interface information of each interface in the service system, where the interface information includes an interface name, an interface identifier, and a corresponding performance index, and the performance index includes request amount information, time-consuming information, status code information, connection number information, and the like. For example, the service system has an interface a, an interface b, an interface c, an interface d, and the like, and the interface information of the interface a includes an interface name (i.e., an a interface), an interface identifier (if the a interface is an interface in the page a, the interface identifier may be defined as a workplace_a), and a performance index (i.e., time-consuming information acquired to the a interface, request amount information, status code information, connection number information, and the like of the a interface); similarly, the interface names of the interface B, the interface C and the interface D are respectively the interface B, the interface C and the interface D, and the interface identifiers of the interface B, the interface C and the interface D are respectively workplace_ B, workplace _ C, workplace _D (namely, the interface B is in the page B, the interface C is in the page C, and the interface D is in the page D).
Thus, the server collects interface information of all interfaces in all pages in the service system. The specific steps are as follows:
putting a Nginx Lua exporter performance library into a Lua library, and embedding the Lua library into an Nginx component, wherein the Nginx Lua Exporter performance library is an open-source Lua performance acquisition library and supports Counter, gauge, histogram, summay and other general statistical capabilities;
receiving and responding to an information acquisition instruction, and outputting the information acquisition instruction by using a log access control of the Nginx component to generate an Nginx log;
and acquiring interface information of each interface in the service system according to the Nginx log.
In this embodiment, the Nginx Lua exporter performance library is first placed in the Lua library, and the Lua library is embedded in the nginix component, where the nginix component is a component responsible for proxy of the request to the server, and the nginix component is generally implemented in Lua language, that is, some of the contents in the nginix component are stored in the Lua library. Thus, if the Nginx Lua exporter performance library is to be placed in the Lua library and the Lua library is embedded in the catalog of the nmginx component, the nmginx component can directly use the interface of this Nginx Lua Exporter performance library to be able to collect data directly through the interface of the Nginx Lua Exporter performance library. Specifically, an information acquisition request instruction is received through an Nginx component, the information acquisition instruction is output and generated by utilizing a log access control access_log of the Nginx component, finally, configuration supporting Syslog (Sysyslog is often called as a system log or a system record) is written in Nginx.conf (configuration file of the Nginx) of the Nginx component, the configuration is used for transmitting a record file message in the Internet protocol (TCP/IP) network, and then the Nginx log is output to a Syslog server; when the interface information of each interface is acquired, the Nginx log can be searched through an index of the head of the Nginx-access-log or configuration Kibana (Kibana is an open source analysis and visualization platform), so that the interface information of each interface in a service system generated in response to an information acquisition instruction is browsed.
Step S202, the interface identification of each interface is matched with a preset interface identification, and matching information is obtained.
In this embodiment, after the server obtains the interface information of each interface, the server matches the interface identifier in the interface information of each interface with the preset interface identifier to obtain matching information. The number of the preset interface identifiers may be multiple, for example, workplace_ A, workplace _ B, workplace _ C, workplace _d, and the interface identifiers of the respective interfaces are included in the preset interface identifiers, that is, each interface identifier may be matched with one preset interface identifier, so as to obtain matching information.
Step S203, configuring the matching information in a preset time sequence database, and running the preset time sequence database.
In this embodiment, after obtaining the matching information, the server configures the matching information in a preset time sequence database, and operates the preset time sequence database. In this embodiment, the preset time-series database is a storage component with Victoria-Metrics as performance indexes, the Victoria-Metrics is a monitoring solution and a time-series database which support high availability, economy, high efficiency and scalability, compared with the index ingestion query speed of the promethaus database, the speed is 20 times higher, the memory size is 7 times less, and the API of the promethaus database is compatible, and for the environment based on the promethaus database, only the Victoria-Metrics needs to be deployed, and the port can be replaced rapidly, specifically as follows:
Obtaining a mirror installation package or a binary installation package of the preset time sequence database, decompressing and installing the mirror installation package or the binary installation package of the preset time sequence database through a dock (dock is an environment component name of service operation and can be understood as a container), generating a Prometaus.yaml file (Prometaus.yaml is a configuration file, parameters in operation are all placed in the Prometaus.yaml file), configuring port information (such as a default 9145 port) of the Nginx Lua exporter performance database and the matching information in the Prometaus.yaml file, and writing local port information (such as a default 8428 port) of the preset time sequence database into the Prometaus.yaml file, and operating the Prometaus.yaml file in a background through a command (nonhup is a command of background operation), so that the service can be operated in a background suspended form) through the command, thereby realizing that the Prometaus can be configured with the time sequence database to be compatible with the Prometaus.
Step S204, verifying whether the preset time sequence databases are communicated, acquiring a target interface identifier to be displayed from the preset time sequence databases when the preset time sequence databases are determined to be communicated, and displaying the interface names and the performance indexes of the interfaces corresponding to the target interface identifier on a visual page.
In this embodiment, whether a preset time sequence database is connected is verified, when the preset time sequence database is determined to be connected, a target interface identifier to be displayed is obtained from the preset time sequence database, and the interface names and performance indexes of the interfaces corresponding to the target interface identifier are displayed on a visual page. The method comprises the following steps:
configuring a port of a preset index display tool according to the Prometaus database and the local port information of the preset time sequence database;
connecting a preset time sequence database by using the preset index display tool, and verifying whether a connection port of the preset index display tool is effective;
if the target interface identification is effective, acquiring the target interface identification to be displayed from the preset time sequence database; and
and displaying the interface names and the performance indexes of the interfaces corresponding to the target interface identifiers in the page of the preset index display tool.
The preset index display tool is Grafana, which is a tool for displaying indexes. The configuration of the ports of Grafana can be divided into a first configuration and a non-configuration.
If Grafana is first-time use, namely, when the port of Grafana is first-time configuration, grafana uses Prometheus (Prometheus is a tool for collecting indexes) as a data source, and configures the port of Grafana by using local port information (such as a default 8428 port) of the preset time sequence database as a connection port; connecting Grafana with a preset time sequence database, clicking testing (whether testing is a function of acquiring data or not) to verify whether a connection port of Grafana is effective, and acquiring a target interface identifier to be displayed from the preset time sequence database if the connection port of Grafana is effective; displaying the interface name and the performance index of each interface corresponding to the target interface identifier in a dashboard (dashboard is a customizable panel in Grafana) page of the Grafana; if the connection port of Grafana is not validated, it indicates that the data source between the Grafana and the preset time sequence database is not connected, and at this time, step 203 is executed back until the connection port of Grafana is validated.
If Grafana is not used for the first time, namely, when the ports of Grafana are not configured for the first time, deleting the ports in Grafana used for the last time, taking Prometaus as a data source, configuring the ports of Grafana by taking local port information of the preset time sequence database as a connection port, and returning to execute the step of connecting the preset time sequence database by using Grafana (Grafana is a tool for displaying indexes).
In this embodiment, the Grafana is used to connect to a preset time sequence database, local port information of the preset time sequence database needs to be configured, if the connection port of the Grafana is configured for the first time, the connection port of the Grafana must be set as a default port (e.g. 8428 port) of the time sequence database, so that the correctness of the connection port can be ensured, and index data stored in the time sequence database can be collected. If the connection port of Grafana is not first configured, and the connection port of Grafana is also not Prometaus for the data source, the connection port of Grafana needs to be deleted, and a default port (such as 8428 port) of the time sequence database is filled. Therefore, the performance index of the service system is displayed more clearly, the long-tail time-consuming interface can be focused and positioned more quickly based on the monitoring of the page-level dimension, the situation that the same interface consumes different time on different pages and cannot be judged when summarized together is avoided.
The application acquires interface information of each interface in a service system, wherein the interface information comprises an interface name, an interface identifier and a corresponding performance index, matches the interface identifier of each interface with a preset interface identifier to obtain matching information, configures the matching information in a preset time sequence database, operates the preset time sequence database, finally verifies whether the preset time sequence database is communicated, acquires a target interface identifier to be displayed from the preset time sequence database when the preset time sequence database is determined to be communicated, and displays the interface name and the performance index of each interface corresponding to the target interface identifier on a visual page. Therefore, when the performance index of the service system is monitored through the time sequence database, the memory storage is smaller and the index acquisition speed is faster. In addition, compared with the monitoring scheme of Prometheus, the monitoring scheme based on the preset time sequence database has the advantages that the memory storage is 7 times smaller, the index acquisition speed is improved by at least 20 times, and the machine resource occupation is less.
In some optional implementations of this embodiment, the step of matching the interface identifier of each interface with a preset interface identifier to obtain matching information includes:
Matching the interface identifiers of all interfaces with the preset interface identifiers based on a preset regular expression, wherein the preset interface identifiers comprise at least two interfaces;
if one or more interface identifiers are successfully matched with one of the preset interface identifiers, storing the interface names and the performance indexes corresponding to the one or more interface identifiers in a target storage area, wherein the target storage area is a storage area corresponding to the preset interface identifiers in a classification storage library, and the storage areas corresponding to the preset interface identifiers are different;
and taking interface information of all interfaces stored in the target storage area as the matching information.
Specifically, the interface identifier of each interface is matched with a preset interface identifier through a preset regular expression reg.re.find (reg.re.find is a regular expression and is used for matching a character string of a certain rule), the preset interface identifier includes at least two interfaces, if one or more interface identifiers are successfully matched with one of the preset interface identifiers, the interface names and the performance indexes corresponding to the one or more interface identifiers are stored in a target storage area, and the target storage area is a storage area corresponding to the preset interface identifier in a classification repository, wherein the storage area corresponding to each preset interface identifier is different.
For example, if page a, page B, page C, and page D each have a label of workplace_ A, workplace _ B, workplace _ C, workplace _d, then all of interfaces 1, 2, 4, and 8 in page a will have workplace_a, and this workplace_a is the interface label of interfaces 1, 2, 4, and 8, and similarly, each of interfaces in page B, page C, and page D also has workplace_ B, workplace _ C, workplace _d, which is not listed herein. The header (header is a preset interface identifier in the interface request, the preset interface identifier is exemplified by "work place_a"), that is, based on the reg.re.find regular matching of "work place_a", the interface identifier work_a matched with the header is found, and the interface 1, the interface 2, the interface 4 and the interface 8 corresponding to the interface identifier work_a, the interface 1, the interface 2, the interface 4 and the interface 8 are all placed in the socket_a (the name of the socket is the index classification) corresponding to the "work place_a" (wherein, the performance index corresponding to each interface is also correspondingly stored in the storage area corresponding to the preset interface identifier). It should be noted that, if the preset interface identifier is "workplace_b", the interface names matched with the workplace_a and corresponding to the workplace_b are stored in the socket_b corresponding to the workplace_b, that is, the storage areas corresponding to each preset interface identifier are different, so that the problem that the number of sockets is too large and the data access is slow and the performance of the service system is affected can be avoided because the index performance of the interfaces of all pages is placed in one socket. Moreover, the page distinguishing index socket can display data in a longer time dimension, so that the problem that the time-consuming bitmap type cannot display the data quantity of which the time dimension exceeds 2 weeks is solved.
After the step of using the interface information of all interfaces stored in the target storage area as the matching information, the method further comprises the following steps:
checking whether the matching information accords with the expectation;
if the verification meets the expectation, executing the step of verifying whether the preset time sequence database is communicated;
and if the verification does not meet the expectation, returning to the step of executing the matching of the matching information according to the preset matching rule to obtain the target performance index information.
Specifically, any one interface in the target storage area corresponding to the matching information is obtained to serve as a check interface, and a check interface identifier corresponding to the check interface is obtained; and if the verification interface identifier is consistent with the preset interface identifier corresponding to the target storage area, the matching information accords with the expectation, and the step of verifying whether the preset time sequence database is communicated is continuously executed. And if the check interface identifier is inconsistent with the preset interface identifier corresponding to the target storage area, the matching information is not in accordance with the expectation, and the step of matching the matching information according to the preset matching rule to obtain the target performance index information is performed.
Taking interface 1 and the interface identifier of interface 1 as work place_a as an example, theoretically, the interface 1 should be categorized into socket_a, and the interface 1 may be searched in a file downloaded by an ocalcohol port/methods (localhost port/methods is an address for checking index categorization), and the corresponding categorization is socket_a, and then the matching information is confirmed to conform to expectations; if the interface 1 can be searched and the corresponding classification is the socket_b, the matching information is confirmed to be not in line with the expectations.
The application can avoid the problem that the number of the pockets is too large and the data access is slow because the index performance of the interfaces of all pages is placed in one pocket, and the performance of the business system is affected. Moreover, the page distinguishing index socket can display data in a longer time dimension, so that the problem that the time-consuming bitmap type cannot display the data quantity of which the time dimension exceeds 2 weeks is solved.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by computer readable instructions stored in a computer readable storage medium that, when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a service system performance monitoring apparatus, where an embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 3, the service system performance monitoring apparatus 300 according to the present embodiment includes: acquisition module 301, matching module 302, configuration module 303, and presentation module 304, wherein:
The acquiring module 301 is configured to acquire interface information of each interface in the service system, where the interface information includes an interface name, an interface identifier, and a corresponding performance index;
the matching module 302 is configured to match the interface identifier of each interface with a preset interface identifier, so as to obtain matching information;
a configuration module 303, configured to configure the matching information in a preset time sequence database, and run the preset time sequence database; and
the display module 304 is configured to verify whether the preset time sequence databases are connected, and when determining that the preset time sequence databases are connected, obtain a target interface identifier to be displayed from the preset time sequence databases, and display the interface names and performance indexes of the interfaces corresponding to the target interface identifier on a visual page.
In this embodiment, the collecting module 301 collects interface information of each interface in the service system, where the interface information includes an interface name, an interface identifier and a corresponding performance index, and matches the interface identifier of each interface with a preset interface identifier through the matching module 302 to obtain matching information, then configures the matching information in a preset time sequence database through the configuration module 303, runs the preset time sequence database, and finally verifies whether the preset time sequence database is connected, and when it is determined that the preset time sequence database is connected, obtains a target interface identifier to be displayed from the preset time sequence database, and displays a visual page of the interface name and the performance index of each interface corresponding to the target interface identifier through the display module 304. Therefore, when the performance index of the service system is monitored through the time sequence database, the memory storage is smaller and the index acquisition speed is faster.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 4, fig. 4 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It should be noted that only computer device 4 having components 41-43 is shown in the figures, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculations and/or information processing in accordance with predetermined or stored instructions, the hardware of which includes, but is not limited to, microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASICs), programmable gate arrays (fields-Programmable Gate Array, FPGAs), digital processors (Digital Signal Processor, DSPs), embedded devices, etc.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 4. Of course, the memory 41 may also comprise both an internal memory unit of the computer device 4 and an external memory device. In this embodiment, the memory 41 is typically used to store an operating system and various application software installed on the computer device 4, such as computer readable instructions of a service system performance monitoring method, etc. Further, the memory 41 may be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute computer readable instructions stored in the memory 41 or process data, such as computer readable instructions for executing the service system performance monitoring method.
The network interface 43 may comprise a wireless network interface or a wired network interface, which network interface 43 is typically used for establishing a communication connection between the computer device 4 and other electronic devices.
The computer device provided in this embodiment may execute the above-described method for monitoring performance of a service system. The service system performance monitoring method may be the service system performance monitoring method of each embodiment.
In this embodiment, by collecting interface information of each interface in the service system, where the interface information includes an interface name, an interface identifier and a corresponding performance index, matching the interface identifier of each interface with a preset interface identifier to obtain matching information, configuring the matching information in a preset time sequence database, operating the preset time sequence database, finally verifying whether the preset time sequence database is connected, and when determining that the preset time sequence database is connected, obtaining a target interface identifier to be displayed from the preset time sequence database, and displaying an interface name and a performance index of each interface corresponding to the target interface identifier on a visual page. Therefore, when the performance index of the service system is monitored through the time sequence database, the memory storage is smaller and the index acquisition speed is faster.
The present application also provides another embodiment, namely, a computer readable storage medium, where computer readable instructions are stored, where the computer readable instructions are executable by at least one processor to cause the at least one processor to perform the steps of the service system performance monitoring method as described above.
In this embodiment, the interface information of each interface in the service system is collected, where the interface information includes an interface name, an interface identifier and a corresponding performance index, the interface identifier of each interface is matched with a preset interface identifier to obtain matching information, then the matching information is configured in a preset time sequence database, the preset time sequence database is operated, finally whether the preset time sequence database is connected is verified, when the preset time sequence database is determined to be connected, a target interface identifier to be displayed is obtained from the preset time sequence database, and the interface name and the performance index of each interface corresponding to the target interface identifier are displayed in a visual page. Therefore, when the performance index of the service system is monitored through the time sequence database, the memory storage is smaller and the index acquisition speed is faster.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (the storage medium may be a non-volatile storage medium or a volatile storage medium, such as a ROM/RAM, a magnetic disk, an optical disk), and including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
It is apparent that the above-described embodiments are only some embodiments of the present application, but not all embodiments, and the preferred embodiments of the present application are shown in the drawings, which do not limit the scope of the patent claims. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a thorough and complete understanding of the present disclosure. Although the application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing description, or equivalents may be substituted for elements thereof. All equivalent structures made by the content of the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the scope of the application.

Claims (10)

1. The service system performance monitoring method is characterized by comprising the following steps:
collecting interface information of each interface in a service system, wherein the interface information comprises an interface name, an interface identifier and corresponding performance indexes;
matching the interface identifiers of the interfaces with preset interface identifiers to obtain matching information;
configuring the matching information in a preset time sequence database, and operating the preset time sequence database; and
verifying whether the preset time sequence databases are communicated, acquiring a target interface identifier to be displayed from the preset time sequence databases when the preset time sequence databases are communicated, and displaying the interface names and performance indexes of the interfaces corresponding to the target interface identifier on a visual page.
2. The method for monitoring performance of a service system according to claim 1, wherein the step of matching the interface identifier of each interface with a preset interface identifier to obtain matching information includes:
matching the interface identifiers of all interfaces with the preset interface identifiers based on a preset regular expression, wherein the preset interface identifiers comprise at least two interfaces;
If one or more interface identifiers are successfully matched with one of the preset interface identifiers, storing the interface names and the performance indexes corresponding to the one or more interface identifiers in a target storage area, wherein the target storage area is a storage area corresponding to the preset interface identifiers in a classification storage library, and the storage areas corresponding to the preset interface identifiers are different; and
and taking interface information of all interfaces stored in the target storage area as the matching information.
3. The method for monitoring performance of a service system according to claim 2, wherein after the step of using interface information of all interfaces stored in the target storage area as the matching information, further comprises:
checking whether the matching information accords with the expectation;
if the verification meets the expectation, executing the step of verifying whether the preset time sequence database is communicated; and
and if the verification does not meet the expectation, returning to the step of executing the matching of the matching information according to the preset matching rule to obtain the target performance index information.
4. A method for monitoring performance of a service system according to claim 3, wherein the step of verifying whether the matching information meets expectations comprises:
Any one interface in the target storage area corresponding to the matching information is obtained to serve as a check interface, and a check interface identifier corresponding to the check interface is obtained;
if the verification interface identifier is consistent with the preset interface identifier corresponding to the target storage area, the matching information accords with the expectation; and
and if the verification interface identifier is inconsistent with the preset interface identifier corresponding to the target storage area, the matching information is inconsistent with the expectation.
5. The method for monitoring performance of a service system according to any one of claims 1 to 4, wherein the step of collecting interface information of each interface in the service system includes:
placing Nginx Lua exporte r performance libraries into a Lua library and embedding the Lua library in an nginnx module;
receiving and responding to an information acquisition instruction, and outputting the information acquisition instruction by using a log access control of the Nginx component to generate an Nginx log; and
and acquiring interface information of each interface in the service system according to the Ngi nx log.
6. The method for monitoring performance of a service system according to claim 5, wherein the step of configuring the matching information in a predetermined time sequence database and running the predetermined time sequence database comprises:
Acquiring a mirror image installation package or a binary installation package of the preset time sequence database, decompressing and installing to generate Pr ometheus. Yaml files; and
and configuring port information and the matching information of the Nginx Lua exporter performance library in the Promethus. Yam l file, writing local port information of the preset time sequence database into the Prometheus. Yaml file, and running the Prometheus. Yam l file.
7. The method for monitoring performance of a service system according to any one of claims 1 to 4, wherein when it is determined that the preset time sequence database is connected, the step of obtaining a target interface identifier to be displayed from the preset time sequence database, and displaying the interface names and performance indexes of the interfaces corresponding to the target interface identifier on a visual page includes:
configuring a port of a preset index display tool according to the Prometaus database and the local port information of the preset time sequence database;
connecting the preset time sequence database by using the preset index display tool, and verifying whether a connection port of the preset index display tool is effective;
If the target interface identification is effective, acquiring the target interface identification to be displayed from the preset time sequence database; and
and displaying the interface names and the performance indexes of the interfaces corresponding to the target interface identifiers in the page of the preset index display tool.
8. A business system performance monitoring device, comprising:
the system comprises an acquisition module, a service system and a service system, wherein the acquisition module is used for acquiring interface information of each interface in the service system, and the interface information comprises an interface name, an interface identifier and a corresponding performance index;
the matching module is used for matching the interface identifiers of the interfaces with preset interface identifiers to obtain matching information;
the configuration module is used for configuring the matching information in a preset time sequence database and running the preset time sequence database; and
the display module is used for verifying whether the preset time sequence databases are communicated, acquiring a target interface identifier to be displayed from the preset time sequence databases when the preset time sequence databases are determined to be communicated, and displaying the interface names and the performance indexes of the interfaces corresponding to the target interface identifier on a visual page.
9. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which when executed by the processor implement the steps of the business system performance monitoring method of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon computer readable instructions which when executed by a processor implement the steps of the business system performance monitoring method of any of claims 1 to 7.
CN202310369294.4A 2023-04-03 2023-04-03 Service system performance monitoring method and device, computer equipment and storage medium Pending CN116627778A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310369294.4A CN116627778A (en) 2023-04-03 2023-04-03 Service system performance monitoring method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310369294.4A CN116627778A (en) 2023-04-03 2023-04-03 Service system performance monitoring method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116627778A true CN116627778A (en) 2023-08-22

Family

ID=87615973

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310369294.4A Pending CN116627778A (en) 2023-04-03 2023-04-03 Service system performance monitoring method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116627778A (en)

Similar Documents

Publication Publication Date Title
CN108427705B (en) Electronic device, distributed system log query method and storage medium
CN112491602B (en) Behavior data monitoring method and device, computer equipment and medium
CN113987074A (en) Distributed service full-link monitoring method and device, electronic equipment and storage medium
US8660833B2 (en) Method, computer program product and apparatus for providing an interactive network simulator
CN112416458A (en) Preloading method and device based on ReactNative, computer equipment and storage medium
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN112631911A (en) Automatic testing method and device, computer equipment and storage medium
CN115712422A (en) Form page generation method and device, computer equipment and storage medium
CN111813418A (en) Distributed link tracking method, device, computer equipment and storage medium
CN113010542B (en) Service data processing method, device, computer equipment and storage medium
CN116644250B (en) Page detection method, page detection device, computer equipment and storage medium
CN116661936A (en) Page data processing method and device, computer equipment and storage medium
CN113656044B (en) Android installation package compression method and device, computer equipment and storage medium
CN116627778A (en) Service system performance monitoring method and device, computer equipment and storage medium
CN111797297B (en) Page data processing method and device, computer equipment and storage medium
CN114637672A (en) Automatic data testing method and device, computer equipment and storage medium
CN112559131A (en) Method, device and equipment for updating container mirror image and computer readable storage medium
CN113806372B (en) New data information construction method, device, computer equipment and storage medium
CN116302847B (en) Dynamic acquisition method and device of abnormal information, computer equipment and medium
CN117591190A (en) Application data loading optimization method, device, equipment and storage medium thereof
CN115731057A (en) Information generation method and device, computer equipment and storage medium
CN116737437A (en) Data analysis method, device, computer equipment and storage medium
CN113553519A (en) Interface address display method and device, computer equipment and storage medium
CN117992110A (en) Engineering baseline version processing method and device, computer equipment and storage medium
CN114218191A (en) System function migration method and 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