Secondary calculation index acquisition method and system
By providing a visual configuration interface and corresponding system components, users can configure and collect secondary computing indicators without a deep understanding of PromQL, solving the problem of low efficiency in the existing technology of secondary computing indicator acquisition, and achieving more efficient indicator acquisition and more intuitive configuration process.
Patent Information
- Application Number
- CN202510061852.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, the acquisition efficiency of secondary computing indicators is low, and users need to have a deep understanding of PromQL and there are technical barriers.
Provide a method and system for collecting secondary calculation indicators. By displaying the configuration interface, users can configure secondary calculation indicators and corresponding secondary calculation rules based on understanding only the secondary calculation logic between basic indicators. The system includes a monitoring platform, a procurement and control platform, a storage service and a secondary computing service, and these components realize the collection, storage and secondary computing of basic indicators.
The efficiency of secondary computing indicator acquisition is improved, and the dependence on PromQL is reduced. Users can configure secondary computing indicators and rules more intuitively, which enhances the ease of use of the system.
Smart Images

Figure CN119848389A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for collecting secondary calculation indicators. Background Art
[0002] At present, in order to obtain more in-depth and comprehensive information, it is often necessary to perform secondary calculations on the basic indicators collected from the monitored object (host or service), so as to collect secondary calculation indicators. Secondary calculation indicators refer to new indicators obtained through some mathematical operations or model conversion based on basic indicators. These new indicators can often provide more in-depth and comprehensive information, which helps to better understand and analyze the original data.
[0003] In the prior art, monitoring systems (such as Prometheus) collect monitoring data containing basic indicators of the target (host or service) through the Exporter component, and use the PromQL query language to query and analyze the basic indicators. The secondary computing collection solution aims to use the rich operators and functions of PromQL to perform secondary processing on basic indicators to extract more meaningful indicators and trends. PromQL's mathematical operators (such as addition, subtraction, multiplication, and division) and functions (such as irate, rate, histogram_quantile, etc.) are used for secondary calculations. For example, calculate CPU usage (100*(1-avg(irate(node_cpu{mode='idle'}[5m]))by(job))), memory usage ((node_memory_bytes_total-node_memory_free_bytes_total) / node_memory_bytes_total), etc.
[0004] In summary, the collection solution for secondary calculation indicators is implemented through promSQL, which requires users to have a deep understanding of promSQL and has technical barriers, resulting in low collection efficiency of secondary calculation indicators. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a method and system for collecting secondary calculation indicators to achieve the purpose of improving the efficiency of collecting secondary calculation indicators.
[0006] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0007] A first aspect of an embodiment of the present invention discloses a method for collecting secondary calculation indicators, the method comprising:
[0008] Display the configuration interface;
[0009] In response to the configuration operation of the user on the configuration interface, a secondary calculation indicator and a corresponding secondary calculation rule are obtained; the secondary calculation rule includes: one or more basic indicators, a collection rule corresponding to each of the basic indicators, and a calculation method between each of the basic indicators;
[0010] Based on the collection rules corresponding to each of the basic indicators, collect each basic indicator value from the monitored object, and store the basic indicator and the basic indicator value in the first database;
[0011] The basic indicator values are periodically pulled from the first database, and secondary calculations are performed based on the calculation methods between the basic indicators and the basic indicator values to obtain secondary calculation indicator values.
[0012] Preferably, the obtaining of the secondary calculation index and the corresponding secondary calculation rule in response to the configuration operation of the user on the configuration interface includes:
[0013] In response to the user's indicator definition operation on the configuration interface, obtaining a secondary calculation indicator;
[0014] In response to a rule configuration operation in the configuration interface, displaying a rule configuration window in the configuration interface;
[0015] For each basic indicator selected through the rule configuration window, determining the resource type, matching condition and calculation method for collecting the basic indicator selected by the user in the rule configuration window, and obtaining a collection rule corresponding to the basic indicator;
[0016] Determine the calculation method between the basic indicators selected by the user through the rule configuration window;
[0017] A secondary calculation rule is created based on each of the basic indicators, the collection rules corresponding to each of the basic indicators, and the calculation method between each of the basic indicators.
[0018] Preferably, the collecting of each basic indicator value from the monitored object based on the collection rule corresponding to each basic indicator, and storing the basic indicator and the basic indicator value in the first database includes:
[0019] Based on the collection rules corresponding to each of the basic indicators, monitoring data is collected for the monitored object, so that the collected monitoring data contains the values of each basic indicator;
[0020] For each of the monitoring data, determining whether it is the basic indicator value;
[0021] If the monitoring data is the basic indicator value, the basic indicator and the basic indicator value are stored in the first database.
[0022] Preferably, the method further comprises:
[0023] storing the secondary calculation index and the secondary calculation index value in the first database;
[0024] In response to a user's query instruction, the secondary calculation indicator and the secondary calculation indicator value indicated by the query instruction are extracted from the first database for display.
[0025] Preferably, the method further comprises:
[0026] Each piece of monitoring data collected is stored in the second database.
[0027] The second aspect of the embodiment of the present invention discloses a collection system of secondary calculation indicators, the system comprising: a monitoring platform, a collection and control platform, a secondary calculation service and a warehousing service;
[0028] The monitoring platform is used to display a configuration interface; in response to the user's configuration operation on the configuration interface, a secondary calculation indicator and a corresponding secondary calculation rule are obtained; the secondary calculation rule includes: one or more basic indicators, a collection rule corresponding to each of the basic indicators, and a calculation method between each of the basic indicators;
[0029] The acquisition and control platform is used to acquire each basic indicator value from the monitored object based on the acquisition rules corresponding to each basic indicator;
[0030] The storage service is used to store the basic indicator and the basic indicator value in the first database;
[0031] The secondary calculation service is used to periodically pull each of the basic indicator values from the first database, perform secondary calculation based on the calculation method between each of the basic indicators and each of the basic indicator values, and obtain the secondary calculation indicator value.
[0032] Preferably, the monitoring platform for obtaining the secondary calculation index and the corresponding secondary calculation rule in response to the configuration operation of the user on the configuration interface is specifically used for:
[0033] In response to the user's indicator definition operation on the configuration interface, obtaining a secondary calculation indicator;
[0034] In response to a rule configuration operation in the configuration interface, displaying a rule configuration window in the configuration interface;
[0035] For each basic indicator selected through the rule configuration window, determining the resource type, matching condition and calculation method for collecting the basic indicator selected by the user in the rule configuration window, and obtaining a collection rule corresponding to the basic indicator;
[0036] Determine the calculation method between the basic indicators selected by the user through the rule configuration window;
[0037] A secondary calculation rule is created based on each of the basic indicators, the collection rules corresponding to each of the basic indicators, and the calculation method between each of the basic indicators.
[0038] Preferably, the acquisition and control platform is specifically used for:
[0039] Based on the collection rules corresponding to each of the basic indicators, monitoring data is collected for the monitored object, so that the collected monitoring data contains the values of each basic indicator;
[0040] Accordingly, the warehousing service is specifically used for:
[0041] For each of the monitoring data, determining whether it is the basic indicator value;
[0042] If the monitoring data is the basic indicator value, the basic indicator and the basic indicator value are stored in the first database.
[0043] Preferably, the warehousing service is also used for:
[0044] storing the secondary calculation index and the secondary calculation index value in the first database;
[0045] Accordingly, the monitoring platform is also used for:
[0046] In response to a user's query instruction, the secondary calculation indicator and the secondary calculation indicator value indicated by the query instruction are extracted from the first database for display.
[0047] Preferably, the warehousing service is also used for:
[0048] Each piece of monitoring data collected is stored in the second database.
[0049] Based on the above-mentioned embodiment of the present invention, a method and system for collecting secondary calculation indicators are provided, the method comprising: displaying a configuration interface; in response to the user's configuration operation on the configuration interface, obtaining secondary calculation indicators and corresponding secondary calculation rules; the secondary calculation rules include: one or more basic indicators, the collection rules corresponding to each of the basic indicators, and the calculation method between each of the basic indicators; based on the collection rules corresponding to each of the basic indicators, each basic indicator value is collected from the monitored object, and the basic indicator and the basic indicator value are stored in the first database; each basic indicator value is periodically pulled from the first database, and secondary calculation is performed based on the calculation method between each of the basic indicators and each of the basic indicator values to obtain the secondary calculation indicator value. In this solution, a visual configuration interface for secondary calculation indicators is provided, and users can configure secondary calculation indicators and corresponding secondary calculation rules based on only understanding the secondary calculation logic between basic indicators, thereby achieving the purpose of improving the collection efficiency of secondary calculation indicators. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0051] Figure 1 A flowchart of a method for collecting secondary calculation indicators disclosed in an embodiment of the present invention;
[0052] Figure 2 A schematic diagram of a configuration interface disclosed in an embodiment of the present invention;
[0053] Figure 3 A structural diagram of a secondary calculation index collection system disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising 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, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0056] First, the technical terms appearing in this application are explained as follows:
[0057] Secondary calculation: refers to the process of performing some mathematical operations on basic indicators to obtain secondary indicators.
[0058] Secondary calculation indicators: refers to new indicators obtained through mathematical operations or model conversion based on basic indicators. These new indicators can often provide more in-depth and comprehensive information, which helps to better understand and analyze the original data.
[0059] Basic indicators: Monitoring indicators obtained through collection scripts, used for secondary calculation to generate secondary calculation indicator values.
[0060] Prometheus: Prometheus (developed in golang) is an open source monitoring, alarm, and time series database. It provides a common data model and fast and convenient data collection, storage, and query interfaces.
[0061] Exporter: Any program that provides monitoring sample data to Prometheus can be called an Exporter. Exporter exposes the endpoint for monitoring data collection to Prometheus Server in the form of HTTP service. Prometheus Server can obtain the monitoring data to be collected by accessing the Endpoint provided by the Exporter.
[0062] PromSQL: PromQL (Prometheus Query Language) is a data query DSL (Domain Specific Language) language developed by Prometheus itself. It allows users to select and aggregate time series data in real time.
[0063] As can be seen from the background technology, the existing secondary calculation indicator collection solution is implemented through promSQL, which requires users to have a deep understanding of promSQL and has technical barriers, resulting in low efficiency in the collection of secondary calculation indicators.
[0064] Therefore, an embodiment of the present invention discloses a method for collecting secondary calculation indicators. In this solution, a visual configuration interface for secondary calculation indicators is provided. Users can configure secondary calculation indicators and corresponding secondary calculation rules based on only understanding the secondary calculation logic between basic indicators, thereby achieving the purpose of improving the efficiency of secondary calculation indicator collection.
[0065] like Figure 1 FIG. 1 is a flow chart of a method for collecting secondary calculation indicators disclosed in an embodiment of the present invention, which mainly includes the following steps:
[0066] Step S101: Display the configuration interface.
[0067] Step S102: In response to the configuration operation of the user in the configuration interface, a secondary calculation index and a corresponding secondary calculation rule are obtained.
[0068] In step S102, the secondary calculation rules include: one or more basic indicators, the collection rules corresponding to each basic indicator, and the calculation method between the basic indicators.
[0069] The basic indicators include basic information of the basic indicators, such as the name.
[0070] like Figure 2 , which is a schematic diagram of a configuration interface disclosed in an embodiment of the present invention.
[0071] It should be noted that after defining the secondary calculation indicators, users can configure the corresponding secondary calculation rules and select one or more basic indicators (for example Figure 2 After calculating indicator 1 and indicator 2 in the calculation, for each basic indicator, you can select the calculation method, matching conditions and resource type when collecting the basic indicator as the collection rule of the basic indicator. When multiple basic indicators are involved, you can select the calculation method between the basic indicators (for example Figure 2 The calculation method between the calculation index 1 and the calculation index 2 shown is "division").
[0072] For example, there are 18 optional calculation methods between basic indicators: addition, subtraction, multiplication, division, sum(), ignoring(), time(), groupby(), rate(), sumrate(), changes(), histogram_quantile(), increase(), delta(), max(), min(), avg(), offset().
[0073] The specific implementation process of step S102 includes the following steps:
[0074] Step S201: In response to the user's indicator definition operation in the configuration interface, a secondary calculation indicator is obtained.
[0075] In step S201, the defined secondary calculation index should at least include: basic information of the secondary calculation index and indication information of the basic index to be used for calculating the secondary calculation index.
[0076] Step S202: In response to the rule configuration operation in the configuration interface, a rule configuration window is displayed in the configuration interface.
[0077] For example, Figure 2 The "Add Secondary Calculation Rule" window shown is the rule configuration window displayed in the configuration interface.
[0078] Step S203: For each basic indicator selected through the rule configuration window, determine the resource type, matching conditions and calculation method for basic indicator collection selected by the user in the rule configuration window to obtain the collection rule corresponding to the basic indicator.
[0079] by Figure 2 For example, select the resource type: This refers to the resource type of the basic indicators that the user wants to collect. In this example, api-server is selected, which means that the user is concerned about the monitoring data of the API server in the Kubernetes cluster.
[0080] Metric selection: The monitoring data contains multiple basic metrics, which refers to the specific basic metrics you want to monitor. Here, apiserver_request_total is selected, which is a metric that measures the total number of requests received by the API server.
[0081] Matching conditions: These are the conditions used to filter the underlying metrics, which in this example include:
[0082] 1. K8S cluster: K8SCluster.cluster name is selected here, which means that the user wants to filter out the basic indicators belonging to a specific Kubernetes cluster in the API server.
[0083] 2. Code: A regular expression is used here to further filter the basic indicators.
[0084] Calculation method: This refers to how you want to calculate or aggregate the matched basic indicators. In this example, "Last N minutes", "5" and "Sum" are selected, which means that the user wants to collect the sum of the last 5 minutes as the basic indicator value.
[0085] In general, this rule configuration window allows users to customize the collection rules of basic indicators according to resource types, basic indicators, matching conditions and calculation methods, so that the basic indicator values that users want can be collected.
[0086] Step S204: Determine the calculation method between the basic indicators selected by the user through the rule configuration window.
[0087] Step S205: creating secondary calculation rules based on each basic indicator, the collection rules corresponding to each basic indicator and the calculation method between each basic indicator.
[0088] Step S103: Based on the collection rules corresponding to each basic indicator, each basic indicator value is collected from the monitored object, and the basic indicators and basic indicator values are stored in the first database.
[0089] It should be noted that, based on the collection rules corresponding to each basic indicator, each basic indicator value can be collected from the monitoring object, but not only the basic indicator values are returned from the monitoring object, but these basic indicator values are returned as part of the monitoring data. Therefore, it is necessary to filter from the monitoring data to obtain the basic indicator value, as follows:
[0090] In the specific implementation process of step S103, based on the collection rules corresponding to each basic indicator, monitoring data is collected for the monitored object, so that the collected monitoring data contains each basic indicator value; for each monitoring data, it is determined whether it is a basic indicator value; if the monitoring data is a basic indicator value, the basic indicator and the basic indicator value are stored in the first database.
[0091] More specifically, based on the collection rules corresponding to each basic indicator, the monitoring data collection for the monitored object includes:
[0092] The collection rules corresponding to each basic indicator are sent to the corresponding monitoring object in the form of a collection script, and the monitoring data containing the basic indicator value is obtained by executing the collection script in the collection object.
[0093] In one embodiment, each piece of monitoring data collected is stored in a second database for persistent storage of the monitoring data. When problems such as data loss in the first database occur, basic indicators and their corresponding basic indicator values can be found in the second database.
[0094] Step S104: periodically extract each basic indicator value from the first database, perform secondary calculation based on the calculation method between each basic indicator and each basic indicator value, and obtain a secondary calculation indicator value.
[0095] by Figure 2 For example, if the calculation method between two basic indicators (calculation indicator 1 and calculation indicator 2) is "division", then divide calculation indicator 1 by calculation indicator 2 to get the secondary calculation indicator value.
[0096] In one embodiment, the secondary calculation index and the secondary calculation index value are stored in a first database; in response to a user's query instruction, the secondary calculation index and the secondary calculation index value indicated by the query instruction are extracted from the first database for display.
[0097] It should be noted that the current mainstream secondary calculation indicator collection method is: after each query, the configured PromSQL is used to calculate and query, and then displayed, without persistent storage. In the embodiment of the present invention, the secondary calculation indicator and its corresponding secondary calculation indicator value are stored for a long time to ensure the timeliness of the subsequent query results.
[0098] Based on a method for collecting secondary calculation indicators disclosed in the above-mentioned embodiment of the present invention, a configuration interface is displayed; in response to the user's configuration operation in the configuration interface, a secondary calculation indicator and a corresponding secondary calculation rule are obtained; the secondary calculation rule includes: one or more basic indicators, a collection rule corresponding to each basic indicator, and a calculation method between each basic indicator; based on the collection rule corresponding to each basic indicator, each basic indicator value is collected from the monitored object, and the basic indicator and the basic indicator value are stored in the first database; each basic indicator value is periodically pulled from the first database, and secondary calculations are performed based on the calculation method between each basic indicator and each basic indicator value to obtain the secondary calculation indicator value. In this solution, a visual configuration interface for secondary calculation indicators is provided, and users can configure secondary calculation indicators and corresponding secondary calculation rules based on only understanding the secondary calculation logic between basic indicators, thereby achieving the purpose of improving the efficiency of collecting secondary calculation indicators.
[0099] Based on the above-mentioned method for collecting secondary calculation indicators disclosed in the embodiment of the present invention, Figure 3 As shown, it is a structural diagram of a secondary computing indicator collection system disclosed in an embodiment of the present invention, including: a monitoring platform 301, a collection and control platform 302, a secondary computing service 303 and a warehousing service 304.
[0100] The monitoring platform 301 is used to display the configuration interface; in response to the user's configuration operation in the configuration interface, secondary calculation indicators and corresponding secondary calculation rules are obtained; the secondary calculation rules include: one or more basic indicators, the collection rules corresponding to each basic indicator and the calculation method between each basic indicator.
[0101] It should be noted that the monitoring platform provides a unified data query interface, a chart display interface, and a configuration interface, and sends secondary calculation indicators and corresponding secondary calculation rules to the secondary calculation service 303 and the acquisition control platform 302.
[0102] Among them, the data query interface can be used to query the basic indicators and corresponding basic indicator values stored in the first database, as well as the secondary calculation indicators and corresponding secondary calculation indicator values; the chart display interface can display the data queried by the data query interface in the form of a chart.
[0103] In one embodiment, the monitoring platform 301 for obtaining secondary calculation indicators and corresponding secondary calculation rules in response to the configuration operation of the user in the configuration interface is specifically used for:
[0104] In response to the user's indicator definition operation in the configuration interface, a secondary calculation indicator is obtained; in response to the rule configuration operation in the configuration interface, a rule configuration window is displayed in the configuration interface; for each basic indicator selected through the rule configuration window, the resource type, matching conditions and calculation method for basic indicator collection selected by the user are determined in the rule configuration window to obtain the collection rule corresponding to the basic indicator; the calculation method between each basic indicator selected by the user is determined through the rule configuration window; based on each basic indicator, the collection rules corresponding to each basic indicator and the calculation method between each basic indicator, a secondary calculation rule is created.
[0105] The acquisition and control platform 302 is used to acquire each basic indicator value from the monitored object based on the acquisition rules corresponding to each basic indicator.
[0106] It should be noted that the function of the acquisition and control platform 302 is to distribute the acquisition rules corresponding to the basic indicators in the secondary calculation rules to the corresponding monitoring objects after the user completes the creation of secondary calculation indicators and the configuration of secondary calculation rules on the monitoring platform 301, and send the collected monitoring data to the warehousing service 303 to screen the basic indicator values and enter them into the warehouse.
[0107] The storage service 303 is used to store the basic indicators and the basic indicator values into the first database.
[0108] In one embodiment, the acquisition and control platform 302 is specifically used for:
[0109] Based on the collection rules corresponding to each basic indicator, monitoring data is collected for the monitored object so that the collected monitoring data contains the values of each basic indicator;
[0110] Accordingly, the warehousing service 303 is specifically used for:
[0111] For each monitoring data, determine whether it is a basic indicator value; if the monitoring data is a basic indicator value, store the basic indicator and the basic indicator value in the first database.
[0112] In one embodiment, the warehousing service 303 is further used to:
[0113] storing the secondary calculation index and the secondary calculation index value in the first database;
[0114] Accordingly, the monitoring platform 301 is also used for:
[0115] In response to a user's query instruction, the secondary calculation index and the secondary calculation index value indicated by the query instruction are extracted from the first database for display.
[0116] In one embodiment, the warehousing service 303 is further used to:
[0117] Each piece of monitoring data collected is stored in the second database.
[0118] The secondary calculation service 304 is used to periodically pull each basic indicator value from the first database, perform secondary calculation based on the calculation method between each basic indicator and each basic indicator value, and obtain the secondary calculation indicator value.
[0119] It should be noted that the secondary calculation service 304 periodically pulls basic index values from the first database and obtains corresponding secondary calculation index values according to user-defined secondary calculation rules and sends them to the warehousing service 303 to be stored in the first database.
[0120] Based on a secondary calculation indicator collection system disclosed in the above-mentioned embodiment of the present invention, a configuration interface is displayed; in response to the user's configuration operation in the configuration interface, a secondary calculation indicator and a corresponding secondary calculation rule are obtained; the secondary calculation rule includes: one or more basic indicators, a collection rule corresponding to each basic indicator, and a calculation method between each basic indicator; based on the collection rule corresponding to each basic indicator, each basic indicator value is collected from the monitored object, and the basic indicator and the basic indicator value are stored in the first database; each basic indicator value is periodically pulled from the first database, and secondary calculations are performed based on the calculation method between each basic indicator and each basic indicator value to obtain the secondary calculation indicator value. In this solution, a visual configuration interface for secondary calculation indicators is provided, and users can configure secondary calculation indicators and corresponding secondary calculation rules based on only understanding the secondary calculation logic between basic indicators, thereby achieving the purpose of improving the collection efficiency of secondary calculation indicators.
[0121] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely 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 embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0122] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0123] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for collecting secondary calculation indicators, characterized in that: The method comprises: Display the configuration interface; In response to the configuration operation of the user on the configuration interface, a secondary calculation indicator and a corresponding secondary calculation rule are obtained; the secondary calculation rule includes: one or more basic indicators, a collection rule corresponding to each of the basic indicators, and a calculation method between each of the basic indicators; Based on the collection rules corresponding to each of the basic indicators, collect each basic indicator value from the monitored object, and store the basic indicator and the basic indicator value in the first database; The basic indicator values are periodically pulled from the first database, and secondary calculations are performed based on the calculation methods between the basic indicators and the basic indicator values to obtain secondary calculation indicator values.
2. The method according to claim 1, characterized in that The obtaining of secondary calculation indicators and corresponding secondary calculation rules in response to the configuration operation of the user on the configuration interface includes: In response to the user's indicator definition operation on the configuration interface, obtaining a secondary calculation indicator; In response to a rule configuration operation in the configuration interface, displaying a rule configuration window in the configuration interface; For each basic indicator selected through the rule configuration window, determining the resource type, matching condition and calculation method for collecting the basic indicator selected by the user in the rule configuration window, and obtaining a collection rule corresponding to the basic indicator; Determine the calculation method between the basic indicators selected by the user through the rule configuration window; A secondary calculation rule is created based on each of the basic indicators, the collection rules corresponding to each of the basic indicators, and the calculation method between each of the basic indicators.
3. The method according to claim 1, characterized in that The step of acquiring each basic indicator value from the monitored object based on the acquisition rule corresponding to each basic indicator, and storing the basic indicator and the basic indicator value in the first database includes: Based on the collection rules corresponding to each of the basic indicators, monitoring data is collected for the monitored object, so that the collected monitoring data contains the values of each basic indicator; For each of the monitoring data, determining whether it is the basic indicator value; If the monitoring data is the basic indicator value, the basic indicator and the basic indicator value are stored in the first database.
4. The method according to claim 1, characterized in that The method further comprises: storing the secondary calculation index and the secondary calculation index value in the first database; In response to a user's query instruction, the secondary calculation indicator and the secondary calculation indicator value indicated by the query instruction are extracted from the first database for display.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Each piece of monitoring data collected is stored in the second database.
6. A secondary calculation index collection system, characterized in that: The system includes: monitoring platform, acquisition and control platform, secondary computing service and warehousing service; The monitoring platform is used to display a configuration interface; in response to the configuration operation of the user on the configuration interface, a secondary calculation indicator and a corresponding secondary calculation rule are obtained; the secondary calculation rule includes: one or more basic indicators, a collection rule corresponding to each of the basic indicators, and a calculation method between each of the basic indicators; The acquisition and control platform is used to acquire each basic indicator value from the monitored object based on the acquisition rules corresponding to each basic indicator; The storage service is used to store the basic indicator and the basic indicator value in the first database; The secondary calculation service is used to periodically pull each of the basic indicator values from the first database, perform secondary calculation based on the calculation method between each of the basic indicators and each of the basic indicator values, and obtain the secondary calculation indicator value.
7. The system according to claim 6, characterized in that The monitoring platform for obtaining secondary calculation indicators and corresponding secondary calculation rules in response to the configuration operation of the user on the configuration interface is specifically used for: In response to the user's indicator definition operation on the configuration interface, obtaining a secondary calculation indicator; In response to a rule configuration operation in the configuration interface, displaying a rule configuration window in the configuration interface; For each basic indicator selected through the rule configuration window, determining the resource type, matching condition and calculation method for collecting the basic indicator selected by the user in the rule configuration window, and obtaining a collection rule corresponding to the basic indicator; Determine the calculation method between the basic indicators selected by the user through the rule configuration window; A secondary calculation rule is created based on each of the basic indicators, the collection rules corresponding to each of the basic indicators, and the calculation method between each of the basic indicators.
8. The system according to claim 6, characterized in that The acquisition and control platform is specifically used for: Based on the collection rules corresponding to each of the basic indicators, monitoring data is collected for the monitored object, so that the collected monitoring data contains the values of each basic indicator; Accordingly, the warehousing service is specifically used for: For each of the monitoring data, determining whether it is the basic indicator value; If the monitoring data is the basic indicator value, the basic indicator and the basic indicator value are stored in the first database.
9. The system according to claim 6, characterized in that The warehousing service is also used for: storing the secondary calculation index and the secondary calculation index value in the first database; Accordingly, the monitoring platform is also used for: In response to a user's query instruction, the secondary calculation indicator and the secondary calculation indicator value indicated by the query instruction are extracted from the first database for display.
10. The system according to any one of claims 6 to 9, characterized in that: The warehousing service is also used for: Each piece of monitoring data collected is stored in the second database.
Citation Information
Patent Citations
Method and device for extracting index
CN110689268A
Custom index creating method and device
CN115098546A
Information display method and device, equipment and medium
CN116842051A