Index data processing method and device, electronic equipment and storage medium

By running the indicator adaptation service program on the client, the original indicator data collected by the operation and maintenance service program is parsed and encapsulated, and the problem that the original indicator data of the operation and maintenance service program does not match the Prometheus specifications is solved, and the effect of no transformation adaptation is achieved, and the application of cloud-native scenarios is supported.

CN119597567APending Publication Date: 2025-03-11ALIBABA CLOUD COMPUTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311174219.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-11
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

It is difficult for the prior art to adapt the original indicator data collected with the data specifications of the Prometheus monitoring system without modifying the operation and maintenance service procedures, especially when the application design does not consider going to the cloud or connecting to Prometheus.

Method used

Provides a method of processing indicator data. By running the indicator adaptation service program on the client, responding to the indicator data collection instructions of the operation and maintenance service program, obtaining the original indicator data, parsing and encapsulating it, converting it into standard indicator data that complies with the Prometheus specifications, and sending it to the monitoring system.

Benefits of technology

There is no need to transform the operation and maintenance service programs, and the original indicator data collected is adapted to the data specifications of the Prometheus monitoring system, supporting the application of data to cloud-native scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597567A_ABST
    Figure CN119597567A_ABST
Patent Text Reader

Abstract

One or more embodiments of the invention provide an index data processing method and device, electronic equipment and a storage medium. The method comprises the steps that an index adaptation service program responds to an index data collection instruction for an operation and maintenance service program running on the same client side, and original index data, collected by the operation and maintenance service program, of host equipment where the client side is located is obtained; performing data analysis on the original index data to obtain an original index name and an index value contained in the original index data; and packaging the original index name and the index value obtained by analysis into standard index data based on a data specification of the monitoring system for the index data, and sending the standard index data to the monitoring system. Therefore, the data specification of the monitoring system for the index data can be compatible without modifying the operation and maintenance service program, the original index data collected by the operation and maintenance service program is matched with the specified data specification, and then the standard index data can be applied to a cloud native scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of operation and maintenance technology, and in particular, to an indicator data processing method, device, electronic device, and storage medium. Background Art

[0002] Prometheus is an open source service monitoring and alerting system. Its core component, Prometheus server, can regularly pull metrics from each monitoring target and store the pulled metrics in local or remote storage. Prometheus server can also be used as a data source to connect to visualization tools such as Grafana to visualize the collected metrics data.

[0003] Currently, Prometheus has been widely used in cloud-native scenarios. Many applications (such as Kubernetes) have implemented Prometheus monitoring interfaces, allowing the Prometheus server to directly obtain indicator data generated by the application through the monitoring interface.

[0004] However, there are still quite a few applications that do not provide Prometheus monitoring interfaces, such as applications that were not designed to be migrated to the cloud or were not connected to Prometheus during development. For these applications, on the one hand, if Prometheus monitoring interfaces are implemented in these applications, not only will the transformation cost be high, but it will also intrude on the applications; on the other hand, since each application designs its data format based on its own needs at the beginning of its design, the original indicator data generated by each application may not conform to the Prometheus specification and needs to be adapted to the original indicator data. Summary of the invention

[0005] The present application provides an indicator data processing method, which is applied to an indicator adaptation service program running on a client; the indicator adaptation service program is used to provide indicator data adaptation services for an operation and maintenance service program running on the client, and to provide indicator data collection services for a monitoring system running on a cloud platform; the method comprises:

[0006] In response to an indicator data collection instruction for the operation and maintenance service program, obtaining original indicator data of the host device where the client is located collected by the operation and maintenance service program;

[0007] Performing data analysis on the original indicator data to obtain original indicator names and indicator values ​​contained in the original indicator data;

[0008] Based on the data specification of the monitoring system for the indicator data, the original indicator name and indicator value obtained by parsing are encapsulated into standard indicator data, and the standard indicator data is sent to the monitoring system.

[0009] The present application also provides an indicator data processing device, which is used to provide indicator data adaptation services for an operation and maintenance service program running on a client, and to provide indicator data collection services for a monitoring system running on a cloud platform; the device includes:

[0010] an acquisition unit, configured to acquire original indicator data of the host device where the client is located, collected by the operation and maintenance service program, in response to an indicator data collection instruction for the operation and maintenance service program;

[0011] A parsing unit, used to parse the original indicator data to obtain the original indicator name and indicator value contained in the original indicator data;

[0012] An encapsulation unit, configured to encapsulate the original indicator name and indicator value obtained by parsing into standard indicator data based on the data specification of the monitoring system for the indicator data;

[0013] A sending unit is used to send the standard indicator data to the monitoring system.

[0014] The present application also provides an electronic device, comprising a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are interconnected via the bus;

[0015] The memory stores machine-readable instructions, and the processor executes the above method by calling the machine-readable instructions.

[0016] The present application also provides a machine-readable storage medium, which stores machine-readable instructions. When the machine-readable instructions are called and executed by a processor, the above method is implemented.

[0017] Through the above embodiments, the operation and maintenance service program only needs to normally collect the original indicator data of the host device where the client is located, and the indicator adaptation service program running additionally on the same client can provide indicator data adaptation services for the operation and maintenance service program; that is, in response to the indicator data collection instruction for the operation and maintenance service program, the indicator adaptation service program can adapt the original indicator data that has been collected by the operation and maintenance service program, repackage it into standard indicator data that meets the data specifications of the monitoring system for indicator data, and provide the packaged standard indicator data to the monitoring system. Therefore, there is no need to modify the operation and maintenance service program itself, and it can be compatible with the data specifications of the monitoring system for indicator data, and the original indicator data collected by the operation and maintenance service program can be adapted to the specified data specifications, and the standard indicator data can be applied to cloud native scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0019] Figure 1 is a schematic diagram of the architecture of an indicator data processing system shown in an exemplary embodiment;

[0020] Figure 2 is a flow chart of an indicator data processing method shown in an exemplary embodiment;

[0021] Figure 3 is a schematic diagram of the architecture of another indicator data processing system shown in an exemplary embodiment;

[0022] Figure 4 is a schematic structural diagram of an electronic device in which an indicator data processing device is located, shown in an exemplary embodiment;

[0023] Figure 5 It is a block diagram of an indicator data processing device shown in an exemplary embodiment. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0025] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0026] Prometheus is an open source service monitoring and alerting system. Its core component, Prometheus server, can regularly pull metrics from each monitoring target and store the pulled metrics in local or remote storage; the monitoring target can be statically configured or automatically configured based on service discovery. Prometheus server can also be used as a data source to connect to visualization tools such as Grafana to visualize the collected metrics data.

[0027] Currently, Prometheus has been widely used in cloud-native scenarios. The Prometheus monitoring interface has been implemented in many applications (such as Kubernetes), so that the Prometheus server can directly obtain the indicator data generated by the application through the monitoring interface, that is, the application itself can be directly used as an Exporter.

[0028] However, there are still quite a few applications that do not provide Prometheus monitoring interfaces, such as applications that were not designed to be migrated to the cloud or were not connected to Prometheus during development. For these applications, on the one hand, if Prometheus monitoring interfaces are implemented in these applications, not only will the transformation cost be high, but it will also intrude on the applications; on the other hand, since each application designs its data format based on its own needs at the beginning of its design, the original indicator data generated by each application may not conform to the Prometheus specification and needs to be adapted to the original indicator data.

[0029] For example, in the field of operating system operation and maintenance, an operation and maintenance service program has been developed, which can monitor the CPU, memory, IO, scheduling and other indicator data of each single machine in the machine cluster; subsequently, in order to apply the monitoring data collected by the operation and maintenance service program to cloud native scenarios, it may be necessary to connect the operation and maintenance service program to Prometheus, and then manage the indicator data in a unified manner through visualization tools. However, the monitoring data collected by the operation and maintenance service program (that is, the original indicator data) may not comply with the Prometheus specification.

[0030] In view of this, the present specification aims to propose a technical solution that can adapt the original indicator data collected by the operation and maintenance service program to the specified data specification without intruding the operation and maintenance service program.

[0031] See also Figure 1 , Figure 1 FIG. 1 is a schematic diagram of an architecture of an indicator data processing system according to an exemplary embodiment. Figure 1 As shown, the indicator data processing system 100 may include: a monitoring system 101 running on a cloud platform, an indicator adaptation service program 102 running on a client, and an operation and maintenance service program 103 running on the same client. Among them, the operation and maintenance service program 103 can monitor the various indicator data of the host device where the client is located, and obtain the original indicator data described in this specification. The indicator adaptation service program 102 can provide indicator data adaptation services for the operation and maintenance service program 103, adapt the original indicator data collected by the operation and maintenance service program 103, and obtain standard indicator data that meets the data specifications of the monitoring system 101 for indicator data; the indicator adaptation service program 102 can also provide indicator data collection services for the monitoring system 101, and when the monitoring system 101 needs to obtain indicator data from the client, it provides the monitoring system 101 with standard indicator data that meets the data specifications of the monitoring system 101 for indicator data.

[0032] It should be noted that Figure 1 Only one client, as well as the indicator adaptation service program 102 and the operation and maintenance service program 103 running on the client are shown as an example, and no special limitation is imposed on this specification. In actual applications, the monitoring system 101 can obtain indicator data from multiple clients, and each client can run an indicator adaptation service program that provides indicator data collection services for the monitoring system 101; if different operation and maintenance service programs are running on each client, since the data formats of the original indicator data generated by different operation and maintenance service programs may be different, the indicator adaptation service programs running on each client are also different. In other words, the indicator adaptation service program running on the same client can be specially configured for the operation and maintenance service program.

[0033] During implementation, in response to an indicator data collection instruction for the operation and maintenance service program, the indicator adaptation service program can obtain the original indicator data of the host device where the client is located, which is collected by the operation and maintenance service program; further, the indicator adaptation service program can perform data analysis on the original indicator data to obtain the original indicator names and indicator values ​​contained in the original indicator data; further, the indicator adaptation service program can encapsulate the original indicator names and indicator values ​​obtained by analysis into standard indicator data based on the data specifications of the monitoring system for indicator data, and send the standard indicator data to the monitoring system.

[0034] For example, Figure 1 As shown, the operation and maintenance service program 103 can collect the original indicator data of the host device where the client is located according to one or more pre-configured indicators; the monitoring system 101 can send an indicator data collection instruction for the operation and maintenance service program 103 to the client; in response to the indicator data collection instruction, the indicator adaptation service program 102 can obtain the original indicator data "io{vda, wawait}3.63" collected by the operation and maintenance service program 103, indicating that the wawait indicator of the vda device in the IO subsystem is 3.63; further, the indicator adaptation service program 102 can parse the obtained original indicator data "io{vda, wawait}3.63" to obtain the original indicator name "wawait" and the indicator value "3.63"; further, the indicator adaptation service program 102 can encapsulate the parsed original indicator name "wawait" and the indicator value "3.63" into standard indicator data "vda_wawait" based on the data specification of the monitoring system 101 for indicator data. 3.63”, and sends the packaged standard indicator data to the monitoring system 103.

[0035] It should be noted that in the above-described embodiment, the standard indicator data "vda_wawait 3.63" is merely an exemplary description and does not specifically limit this specification. The actual adaptation result is related to the specific data specification of the indicator data of the monitoring system 101. For example, based on the data specification of the indicator data of the monitoring system 101, the original indicator name "wawait" and the indicator value "3.63" obtained by parsing can also be encapsulated as "io_vda_wawait3.63".

[0036] It can be seen that in the technical solution in this specification, the operation and maintenance service program only needs to normally collect the original indicator data of the host device where the client is located, and the indicator adaptation service program running additionally on the same client can provide indicator data adaptation services for the operation and maintenance service program; that is, in response to the indicator data collection instruction for the operation and maintenance service program, the indicator adaptation service program can adapt the original indicator data that has been collected by the operation and maintenance service program, repackage it into standard indicator data that meets the data specifications of the monitoring system for indicator data, and provide the packaged standard indicator data to the monitoring system. Therefore, there is no need to modify the operation and maintenance service program itself, and it can be compatible with the data specifications of the monitoring system for indicator data, adapt the original indicator data collected by the operation and maintenance service program to the specified data specifications, and then apply the standard indicator data to cloud native scenarios.

[0037] The technical solutions in this specification are described below through specific embodiments and in combination with specific application scenarios.

[0038] See also Figure 2 , Figure 2 is a flowchart of an indicator data processing method shown in an exemplary embodiment. The method can be used for Figure 1 The indicator adaptation service program 102 is shown.

[0039] In this specification, an operation and maintenance service program and an indicator adaptation service program can be run on the client; wherein the operation and maintenance service program can be used to collect original indicator data of the host device where the client is located; the indicator adaptation service program can be used to provide indicator data adaptation services for the indicator adaptation service program, and can provide indicator data collection services for the monitoring system running on the cloud platform.

[0040] In some possible embodiments, the cloud platform may specifically include a cloud native platform, a container cloud platform, etc., which is not particularly limited in this specification.

[0041] In some possible embodiments, the host device where the client is located may specifically be a physical host of the cloud platform.

[0042] In one embodiment shown, the monitoring system may specifically include a Prometheus service monitoring system; the indicator adaptation service program may specifically include an Exporter service program corresponding to the Prometheus service monitoring system. It should be noted that, in a broad sense, any program that complies with the Prometheus specification and can provide monitoring data to Prometheus can be called an Exporter, but the existing Exporter components in the relevant technology are mainly general programs developed for databases such as Redis and MySQL, and the Exporter service program involved in this specification is customized and developed for the operation and maintenance service program.

[0043] To facilitate understanding by those skilled in the art, in one or more embodiments shown below, the monitoring system may be a Prometheus service monitoring system, and the data specification of the monitoring system for indicator data may be a Prometheus specification, to illustrate the technical solution in this specification, which does not represent a special limitation on this specification.

[0044] like Figure 2 As shown, the method can perform the following steps:

[0045] Step 202: In response to an indicator data collection instruction for an operation and maintenance service program running on the same client, original indicator data of a host device where the client is located collected by the operation and maintenance service program is obtained.

[0046] For example, Figure 1 As shown, the operation and maintenance service program 103 can collect the original indicator data of the host device where the client is located according to one or more pre-configured indicators; in response to the indicator data collection instruction for running on the same client, the indicator adaptation service program 102 can obtain the original indicator data "io{vda, wawait}3.63" collected by the operation and maintenance service program 103, indicating that the wawait indicator of the vda device in the IO subsystem is 3.63.

[0047] In one embodiment shown, in step 202, the indicator data collection instruction may include: an indicator data collection instruction triggered by a command line tool on the client; or, an indicator data collection instruction sent by the monitoring system to the client; or, an indicator data collection instruction periodically triggered according to a preset period.

[0048] For example, curl is an open source command line tool that can be used to send HTTP / HTTPS requests to the server and receive responses. Since the Exporter service program is open to the outside world in the form of an http server, the indicator data collection instruction for the operation and maintenance service program can be triggered on the client through curl to obtain the adapted standard indicator data from the Exporter service program.

[0049] For another example, the Prometheus server can periodically poll each monitoring object. Since the Exporter service program is open to the outside world in the form of an http server, the Prometheus server can send indicator data collection instructions for the operation and maintenance service program to the client to obtain the adapted standard indicator data from the Exporter service program.

[0050] For another example, the indicator adaptation service program is configured with a preset period, which can periodically obtain the original indicator data collected by the operation and maintenance service program, and automatically perform adaptation processing based on the data specifications of the monitoring system for the indicator data.

[0051] In one embodiment shown, in step 202, in response to an indicator data collection instruction for the operation and maintenance service program, the original indicator data of the host device where the client is located collected by the operation and maintenance service program is obtained, which may specifically include: in response to the indicator data collection instruction for the operation and maintenance service program, calling the Collect function to obtain the original indicator data of the host device where the client is located collected by the operation and maintenance service program; wherein the collection object of the Collect function is pre-configured as the operation and maintenance service program.

[0052] Step 204: parsing the original indicator data to obtain the original indicator name and indicator value contained in the original indicator data.

[0053] For example, Figure 1 As shown, after obtaining the original indicator data "io{vda, wawait}3.63", the indicator adaptation service program 102 can perform data analysis on the obtained original indicator data "io{vda, wawait}3.63" to obtain the original indicator name "wawait" and the indicator value "3.63".

[0054] In some possible embodiments, the operation and maintenance service program can be used to monitor the operating status of each subsystem in the operating system installed on the host device where the client is located. In this case, in order to distinguish the indicators with the same name in different subsystems, the original indicator data can specifically include the subsystem identifier, the original indicator name and the indicator value. Accordingly, the indicator adaptation service program performs data analysis on the original indicator data to obtain the subsystem identifier, the original indicator name and the indicator value contained in the original indicator data.

[0055] For example, the original indicator data "cpu{util}1.88" can indicate that the indicator util in the CPU subsystem is 1.88, where "cpu" is the subsystem ID of the CPU subsystem, "util" is the original indicator name, and "1.88" is the indicator value of the indicator util in the CPU subsystem. The original indicator data "mem{util}37.43" can indicate that the indicator util in the memory subsystem is 37.43, where "mem" is the subsystem ID of the memory subsystem, "util" is the original indicator name, and "37.43" is the indicator value of the indicator util in the memory subsystem.

[0056] In the embodiments shown above, the various subsystems in the operating system may specifically include but are not limited to: a CPU subsystem, a memory subsystem, an IO subsystem, a scheduling subsystem, and the like.

[0057] It should be noted that the original indicator data or standard indicator data involved in this specification may also be referred to as monitoring sample data; in this case, the indicator values ​​involved in this specification may also be referred to as sample values, monitoring values, etc., which does not affect the implementation of the technical solution in this specification.

[0058] Step 206: Based on the data specification of the monitoring system for the indicator data, the original indicator name and indicator value obtained by parsing are encapsulated into standard indicator data.

[0059] For example, Figure 1 As shown, after parsing to obtain the original indicator name "wawait" and the indicator value "3.63", the indicator adaptation service program 102 can encapsulate the parsed original indicator name "wawait" and the indicator value "3.63" into the standard indicator data "vda_wawait 3.63" based on the data specification for indicator data of the monitoring system 101.

[0060] It should be noted that in step 206, the data specification may include data type specification, data size specification, etc. in addition to the data format specification, which will not be shown one by one in this specification.

[0061] In one embodiment shown, the original indicator data may include a subsystem identifier, an original indicator name, and an indicator value. In this case, in step 206, based on the data specification of the monitoring system for indicator data, the original indicator name and indicator value obtained by parsing are encapsulated into standard indicator data, which may specifically include: based on the data specification of the monitoring system for indicator data, the subsystem identifier, the original indicator name, and the indicator value obtained by parsing are encapsulated into standard indicator data; wherein the standard indicator name contained in the standard indicator data is generated based on the subsystem identifier and the original indicator name obtained by parsing.

[0062] For example, after parsing the acquired original indicator data "io{vda, wawait}3.63" to obtain the subsystem identifier "io", the original indicator name "wawait" and the indicator value "3.63", the indicator adaptation service program 102 can encapsulate the parsed subsystem identifier "io", the original indicator name "wawait" and the indicator value "3.63" into the standard indicator data "io_vda_wawait 3.63" based on the data specification for indicator data of the monitoring system 101, where "io_vda_wawait" is the standard indicator name.

[0063] In practical applications, in addition to the standard indicator name and indicator content, standard indicator data that conforms to the Prometheus specification may also include general annotation information and / or type annotation information; wherein the general annotation information includes the standard indicator name and description information; the type annotation information includes the standard indicator name and indicator type. It should be noted that the indicator types involved in this specification refer to gauge, counter, histogram, etc., rather than the data type of the indicator value; for the specific meaning of each indicator type, please refer to the relevant technology, which will not be repeated here.

[0064] For example, after parsing the acquired original indicator data "io{vda, wawait}3.63" to obtain the subsystem identifier "io", the original indicator name "wawait" and the indicator value "3.63", the indicator adaptation service program 102 can encapsulate the data parsing result into the standard indicator data shown below based on the Prometheus specification:

[0065] #HELP Number of io_vda_wawait currently processed / / General comment information

[0066] #TYPE io_vda_wawait counter / / Type comment information

[0067] sysak io_vda_wawait 3.63 / / "sysak" is the application identifier of the operation and maintenance service program, which facilitates Prometheus to uniformly manage indicator data.

[0068] In one embodiment shown, in the case where type annotation information needs to be included in the standard indicator data, the subsystem identifier, the original indicator name and the indicator value obtained by parsing are encapsulated into standard indicator data based on the data specification of the monitoring system for indicator data, which may specifically include: according to the correspondence between the pre-configured original indicator name and the indicator type, the indicator type corresponding to the original indicator name obtained by parsing is determined as the indicator type of the standard indicator data; based on the data specification of the monitoring system for indicator data, the subsystem identifier, the original indicator name and the indicator value obtained by parsing, and the determined indicator type are encapsulated into standard indicator data.

[0069] For example, a correspondence between the original indicator name "wawait" and the indicator type "counter" is pre-configured; based on this, after the indicator adaptation service program 102 parses and obtains the subsystem identifier "io" and the original indicator name "wawait", it can determine that the standard indicator name of the standard indicator data is "io_vda_wawait", and can determine that the indicator type of the standard indicator data is "counter", that is, the type annotation information "#TYPE io_vda_wawait counter" can be obtained; and then, based on the Prometheus specification, the data parsing results can be encapsulated as the standard indicator data shown above.

[0070] It should be noted that, in the above-described implementation, if the indicator type corresponding to the original indicator name is not pre-configured, the default indicator type "untyped" may be determined as the indicator type of the standard indicator data. Alternatively, in some possible embodiments, the standard indicator data may not include type annotation information.

[0071] Step 208: Send the standard indicator data to the monitoring system.

[0072] For example, Figure 1 As shown, after encapsulating the standard indicator data “vda_wawait 3.63”, the indicator adaptation service program 102 may send the encapsulated standard indicator data to the monitoring system 103 .

[0073] In one embodiment shown, sending the standard indicator data to the monitoring system may specifically include: storing the standard indicator data in a message queue corresponding to the monitoring system, so that the monitoring system pulls the standard indicator data from the message queue.

[0074] For example, the indicator adaptation service program running on the client can report the encapsulated standard indicator data to the pushgateway, so that the Prometheus server can uniformly pull the standard indicator data from the pushgateway.

[0075] In one embodiment shown, when the indicator data collection instruction is an http request sent by the monitoring system to the client, sending the standard indicator data to the monitoring system may specifically include: sending the standard indicator data directly to the Prometheus server as an http response corresponding to the indicator data collection instruction.

[0076] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of this specification, the following Figure 3 The system architecture diagram shown in the figure illustrates the embodiments in this specification. Figure 3 , Figure 3 The indicator data processing method provided in this specification can be applied to the following: Figure 3 The Exporter service program shown.

[0077] like Figure 3As shown, the Exporter service program is open to the outside in the form of an http server; the Prometheus server can send an indicator data collection instruction for the operation and maintenance service program to the client to obtain the adapted standard indicator data from the Exporter service program; in response to the indicator data collection instruction, the inside of the Exporter service program can access the original indicator data collected by the operation and maintenance service program through the collector interface, wherein the collector has completed registration before the http server is opened to the outside; after obtaining the original indicator data, the Parse parser (also known as the syntax parser) in the Exporter service program can parse the original indicator data to obtain the original indicator name and indicator value contained in the original indicator data; further, the data encapsulator in the Exporter service program can encapsulate the parsed original indicator name and indicator value into standard indicator data based on the Prometheus specification, and then return the encapsulated standard indicator data to the requester.

[0078] Through the above technical solutions, it can be known that the operation and maintenance service program only needs to normally collect the original indicator data of the host device where the client is located, and the indicator adaptation service program running additionally on the same client can provide indicator data adaptation services for the operation and maintenance service program; that is, in response to the indicator data collection instruction for the operation and maintenance service program, the indicator adaptation service program can adapt the original indicator data that has been collected by the operation and maintenance service program, repackage it into standard indicator data that meets the data specifications of the monitoring system for indicator data, and provide the packaged standard indicator data to the monitoring system. Therefore, there is no need to modify the operation and maintenance service program itself, and it can be compatible with the data specifications of the monitoring system for indicator data, and the original indicator data collected by the operation and maintenance service program can be adapted to the specified data specifications, and the standard indicator data can be applied to cloud native scenarios.

[0079] Corresponding to the above-mentioned embodiment of the indicator data processing method, this specification also provides an embodiment of an indicator data processing device.

[0080] See also Figure 4 , Figure 4It is a hardware structure diagram of an electronic device where an indicator data processing device is located, shown in an exemplary embodiment. At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, a memory 408, and a non-volatile memory 410, and of course may also include other required hardware. One or more embodiments of this specification can be implemented based on software, such as the processor 402 reading the corresponding computer program from the non-volatile memory 410 into the memory 408 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0081] See also Figure 5 , Figure 5 FIG. 1 is a block diagram of an indicator data processing device according to an exemplary embodiment. The indicator data processing device can be applied to Figure 4 In the electronic device shown in the figure, the technical solution of this specification is implemented. The device is used to provide an adaptation service for indicator data for the operation and maintenance service program running on the client, and to provide an indicator data collection service for the monitoring system running on the cloud platform. The device may include:

[0082] An acquisition unit 502 is used to acquire original indicator data of the host device where the client is located collected by the operation and maintenance service program in response to an indicator data collection instruction for the operation and maintenance service program;

[0083] The parsing unit 504 is used to parse the original indicator data to obtain the original indicator name and indicator value contained in the original indicator data;

[0084] An encapsulation unit 506 is used to encapsulate the original indicator name and indicator value obtained by parsing into standard indicator data based on the data specification of the monitoring system for the indicator data;

[0085] The sending unit 508 is used to send the standard indicator data to the monitoring system.

[0086] In this embodiment, the operation and maintenance service program is used to monitor the operating status of each subsystem in the operating system installed on the host device where the client is located; the original indicator data includes a subsystem identifier, an original indicator name and an indicator value;

[0087] The encapsulation unit 506 is specifically used for:

[0088] Based on the data specification of the monitoring system for indicator data, the subsystem identifier, the original indicator name and the indicator value obtained by parsing are encapsulated into standard indicator data; wherein the standard indicator name contained in the standard indicator data is generated based on the subsystem identifier and the original indicator name obtained by parsing.

[0089] In this embodiment, the encapsulation unit 506 is specifically used for:

[0090] According to the pre-configured correspondence between the original indicator name and the indicator type, the indicator type corresponding to the original indicator name obtained by parsing is determined as the indicator type of the standard indicator data;

[0091] Based on the data specification of the monitoring system for indicator data, the subsystem identifier, the original indicator name and the indicator value obtained through parsing, and the determined indicator type are encapsulated into standard indicator data.

[0092] In this embodiment, the sending unit 508 is specifically configured to:

[0093] The standard indicator data is stored in a message queue corresponding to the monitoring system, so that the monitoring system pulls the standard indicator data from the message queue.

[0094] In this embodiment, the indicator data collection instruction includes:

[0095] An indicator data collection instruction triggered by a command line tool on the client; or,

[0096] The monitoring system sends an indicator data collection instruction to the client.

[0097] In this embodiment, the cloud platform includes a cloud native platform.

[0098] In this embodiment, the monitoring system includes a Prometheus service monitoring system; the indicator adaptation service program includes an Exporter service program corresponding to the Prometheus service monitoring system.

[0099] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0100] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Ordinary technicians in this field can understand and implement it without paying creative work.

[0101] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0102] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

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

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

[0105] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

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

[0107] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0108] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "one", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0109] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0110] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.

Claims

1. A method for processing indicator data, the method being applied to an indicator adaptation service program running on a client; the indicator adaptation service program is used to provide indicator data adaptation services for an operation and maintenance service program running on the client, and to provide indicator data collection services for a monitoring system running on a cloud platform; the method comprising: In response to an indicator data collection instruction for the operation and maintenance service program, obtaining original indicator data of the host device where the client is located collected by the operation and maintenance service program; Performing data analysis on the original indicator data to obtain original indicator names and indicator values ​​contained in the original indicator data; Based on the data specification of the monitoring system for the indicator data, the original indicator name and indicator value obtained by parsing are encapsulated into standard indicator data, and the standard indicator data is sent to the monitoring system.

2. According to the method of claim 1, the operation and maintenance service program is used to monitor the operating status of each subsystem in the operating system installed on the host device where the client is located; the original indicator data includes a subsystem identifier, an original indicator name and an indicator value; The data specification for the indicator data based on the monitoring system, encapsulating the original indicator name and indicator value obtained by parsing into standard indicator data, includes: Based on the data specification of the monitoring system for indicator data, the subsystem identifier, the original indicator name and the indicator value obtained by parsing are encapsulated into standard indicator data; wherein the standard indicator name contained in the standard indicator data is generated based on the subsystem identifier and the original indicator name obtained by parsing.

3. The method according to claim 2, wherein based on the data specification of the monitoring system for the indicator data, the subsystem identifier, the original indicator name and the indicator value obtained by parsing are encapsulated into standard indicator data, including: According to the pre-configured correspondence between the original indicator name and the indicator type, the indicator type corresponding to the original indicator name obtained by parsing is determined as the indicator type of the standard indicator data; Based on the data specification of the monitoring system for indicator data, the subsystem identifier, the original indicator name and the indicator value obtained through parsing, and the determined indicator type are encapsulated into standard indicator data.

4. The method according to claim 1, wherein sending the standard indicator data to the monitoring system comprises: The standard indicator data is stored in a message queue corresponding to the monitoring system, so that the monitoring system pulls the standard indicator data from the message queue.

5. According to the method of claim 1, the indicator data collection instruction comprises: An indicator data collection instruction triggered by a command line tool on the client; or, The monitoring system sends an indicator data collection instruction to the client. The method according to claim 1 , wherein the cloud platform comprises a cloud native platform.

7. According to the method described in claim 1, the monitoring system includes a Prometheus service monitoring system; the indicator adaptation service program includes an Exporter service program corresponding to the Prometheus service monitoring system.

8. An indicator data processing device, the device is used to provide indicator data adaptation services for operation and maintenance service programs running on a client, and provide indicator data collection services for a monitoring system running on a cloud platform; The device comprises: an acquisition unit, configured to acquire original indicator data of the host device where the client is located, collected by the operation and maintenance service program, in response to an indicator data collection instruction for the operation and maintenance service program; A parsing unit, used to parse the original indicator data to obtain the original indicator name and indicator value contained in the original indicator data; An encapsulation unit, configured to encapsulate the original indicator name and indicator value obtained by parsing into standard indicator data based on the data specification of the monitoring system for the indicator data; A sending unit is used to send the standard indicator data to the monitoring system.

9. An electronic device, comprising a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are interconnected via the bus; The memory stores machine-readable instructions, and the processor executes the method according to any one of claims 1 to 7 by calling the machine-readable instructions.

10. A machine-readable storage medium storing machine-readable instructions, wherein the machine-readable instructions, when called and executed by a processor, implement the method according to any one of claims 1 to 7.