Adaptive adjustment method, device and storage medium for monitoring indicator collection
By evaluating the length and rate of the message queue in real time and dynamically adjusting the collection configuration of monitoring indicators, the problem of mismatch between monitoring indicator collection and processing capabilities in large-scale computing systems is solved, and the stability and efficiency of the system are improved.
Patent Information
- Application Number
- CN202510662147.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-05-22
AI Technical Summary
In large-scale computing systems, the mismatch between the collection and processing capabilities of monitoring indicators leads to system instability. Traditional static configuration methods are unable to cope with dynamic anomalies, affecting the processing efficiency and storage capacity of the monitoring system.
Through the anomaly assessment component and the backpressure-based dynamic adjustment component, the length and rate of the message queue are evaluated in real time, and the collection configuration of monitoring indicators is dynamically adjusted to ensure that the upstream inflow rate matches the downstream processing rate, achieving a dynamic balance between monitoring coverage and processing capacity.
It improves the reliability and accuracy of monitoring indicator collection, reduces the abnormal impact of system fluctuations on monitoring indicators, stabilizes the data production and consumption process, and enhances the processing capacity of the monitoring system.
Smart Images

Figure CN120223592B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of monitoring indicator collection, and in particular to a self-adaptive adjustment method, device and storage medium for monitoring indicator collection. Background Art
[0002] Industrial control systems, data centers, and supercomputing systems often involve large-scale computing nodes. These nodes communicate with each other to complete computing services. When a hardware unit in a node experiences an anomaly or error, the system can become unstable. Due to the large scale of the system, the probability of problematic nodes increases accordingly. Monitoring systems collect, observe, and analyze operational data (also known as monitoring metrics) from each node in real time. They provide both in-band (operating system-related metrics such as CPU utilization, memory usage, and network I / O) and out-of-band (hardware-related metrics such as temperature, current, and voltage) system health monitoring, enabling operational assurance through health analysis and anomaly prediction.
[0003] The number of monitoring indicators increases proportionally with the number of monitored nodes and the volume of business operations. For example, in a supercomputing system, when the number of nodes reaches 5,000, even if a single node only has 56 in-band monitoring indicators, the system-wide in-band monitoring indicator data can reach 18GB per day. The number of out-of-band monitoring indicators is typically 300 per month, and the system-wide out-of-band monitoring indicator data can reach 200GB per day, not even accounting for the massive volume of alarms. Furthermore, the rate at which monitoring indicators are generated fluctuates dynamically due to various system events and anomalies.
[0004] Therefore, it is necessary to control and manage the collection of monitoring indicators to match the processing and storage capabilities of the monitoring system.
[0005] In view of this, the present invention is proposed. Summary of the Invention
[0006] In order to solve the above technical problems, the present invention provides an adaptive adjustment method, device and storage medium for monitoring indicator collection, which can dynamically adjust the collection quantity of monitoring indicators according to the real-time collection of monitoring indicators, so as to adapt the monitoring system's ability to digest and process monitoring indicators, and achieve a dynamic balance between monitoring coverage and monitoring processing capabilities.
[0007] In a first aspect, an embodiment of the present invention provides a method for adaptively adjusting monitoring indicator collection, the method comprising:
[0008] Determine the total length of the message queue at time t;
[0009] If the total length is less than or equal to zero, the total length of the message queue at a preset number of time points after time t is monitored, and the collection configuration of the monitoring indicator is adjusted according to the total length of the message queue at a preset number of time points after time t;
[0010] If the total length is greater than zero, the collection configuration of the monitoring indicator is adjusted according to the change rate of the messages in the message queue at time t and a preset number of time points after time t, and the change rate of the messages in the message queue at multiple time points before time t;
[0011] The monitoring indicators are temporarily stored in the message queue after being collected, and are removed from the message queue when the monitoring indicators are analyzed and processed.
[0012] In a second aspect, an embodiment of the present invention provides an electronic device, comprising:
[0013] processor and memory;
[0014] The processor is configured to execute the steps of the adaptive adjustment method for monitoring indicator collection described in any embodiment by calling the program or instruction stored in the memory.
[0015] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a program or instruction, and the program or instruction enables a computer to execute the steps of the adaptive adjustment method for monitoring indicator collection described in any embodiment.
[0016] The embodiments of the present invention have the following technical effects:
[0017] By determining whether the monitoring indicator collection configuration matches the monitoring system's processing capability for the monitoring indicator based on the total length of the message queue at a certain moment, and when the monitoring indicator collection configuration does not match the monitoring system's processing capability for the monitoring indicator, the monitoring indicator collection configuration is dynamically adjusted, thereby achieving the purpose of matching the monitoring indicator collection configuration with the monitoring system's processing capability for the monitoring indicator, and realizing a dynamic balance between monitoring coverage and monitoring processing capability. Specifically, if the total length of the message queue at time t is zero or less than zero, it means that the monitoring system's processing capability is sufficient to adapt to the current collection configuration. In order to avoid the abnormal impact of system fluctuations on the monitoring indicator, under this premise, the total length of the message queue at a preset number of time points after time t is continuously monitored, and the monitoring indicator collection configuration is adjusted based on the total length of the message queue at the preset number of time points after time t, thereby improving the reliability and accuracy of the adjustment method. If the total length of the message queue at time t is greater than zero, it means that there are remaining unprocessed monitoring indicators, which means that the processing capacity of the monitoring system is insufficient to adapt to the current collection configuration. Under this premise, in order to avoid the abnormal impact of system fluctuations on the monitoring indicators, the collection configuration of the monitoring indicators is adjusted according to the change rate of messages in the message queue at time t and a preset number of time points after time t, as well as the change rate of messages in the message queue at multiple time points before time t. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 This is a process of an adaptive adjustment method for monitoring indicator collection provided by an embodiment of the present invention Figure 1 ;
[0020] Figure 2 This is a process of an adaptive adjustment method for monitoring indicator collection provided by an embodiment of the present invention Figure 2 ;
[0021] Figure 3 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0022] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention are described clearly and completely below. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are also within the scope of protection of the present invention.
[0023] Typically, monitoring systems for large-scale computing systems operate at level 2 (or higher). These systems utilize node-based collection agents and BMUs (Body Management Units) to collect in-band status (operating system-related metrics, such as CPU utilization, memory usage, and network I / O) and out-of-band status (hardware-related metrics, such as temperature, current, and voltage). Collected metrics are identified by a whitelist in a configuration file. These metrics are forwarded via an intermediate-tier monitoring server (for monitoring systems at level 3 and above) or sent directly to a system-level monitoring server. Given the large number of nodes in large-scale systems, monitoring servers often cannot store and process all node metrics in real time. Therefore, system-level monitoring servers typically use message queues (such as Kafka) as a buffering middleware, feeding all node-reported metrics into multiple message queues. Backend storage components and upper-tier monitoring and analysis components consume the messages in these queues to perform monitoring services. Monitoring metric collection anomalies are dynamic, and traditional methods that statically configure monitoring metric collection lists and collection frequencies lack the flexibility to address these anomalies. To address this, the technical solution of the present invention proposes a dynamic adjustment strategy for monitoring indicators based on backpressure, which aims to dynamically adjust the collection indicator quantity and collection frequency of the underlying nodes (upstream) through real-time evaluation of the system-level (downstream) queue length and node rate, so that the upstream inflow rate and the downstream processing rate match, thereby stabilizing the data production and consumption process.
[0024] The technical solution of the present invention mainly includes an anomaly assessment component and a backpressure-based dynamic adjustment component, which are respectively used to detect whether the monitoring indicators are reported too quickly or are difficult to process, and to adaptively adjust the collection configuration when abnormal monitoring indicators are found, so as to achieve the purpose of matching the collection configuration of the monitoring indicators with the monitoring system's processing capability of the monitoring indicators, and realize a dynamic balance between the monitoring coverage and the monitoring processing capability.
[0025] The anomaly assessment component's functionality includes: the collection agent continuously sends node monitoring metrics to the system monitoring server's message queue. Production operations that add messages (monitoring metrics) to the queue increase the length of the message queue. The system monitoring service consumes messages from the message queue to store and process monitoring metrics. Consumption operations that remove messages from the queue reduce the length of the message queue. In the system server, by observing the production and consumption of m message queues, the production rate of each message queue at time t can be calculated. , consumption rate , where i = 1,2,3....m, represents the identifier of the message queue. When the monitoring indicator collection is too fast or too slow, the message queue will have a trend of accumulation or sudden drop of messages. This trend can be observed by rate difference. Therefore, calculate the first The difference between the production rate and consumption rate of a message queue The difference can also be called the rate of change of the message. The difference between the production rate and consumption rate of all message queues is accumulated to obtain the rate difference between the entry and exit of the global monitoring indicator. .
[0026] Considering that distributed nodes in large-scale systems are prone to network transmission anomalies and monitoring indicator anomalies, which lead to frequent changes in the rate of change of messages in the message queue, not all changes in production rate and consumption rate represent monitoring indicator collection anomalies. Monitoring indicator collection anomalies that affect the system should show a certain degree of persistence. Therefore, a dynamic sliding window is maintained to record the changes in the message queue within a period of time. The statistical time series data of the difference between production rate and consumption rate can smooth the interference of instantaneous or short-term fluctuations on abnormal collection and detection, and improve the stability and accuracy of detection. Moment, calculation The maximum value of the rate differences recorded in the sliding window and minimum value As the current rate difference The upper and lower thresholds are used to determine Whether it exceeds the expected range, if it exceeds, it is marked as a significant fluctuation. In order to avoid misjudgment caused by short-term data fluctuations, when When it is judged to be a significant fluctuation, the system will continue to detect the rate difference at the next n moments. (where n is the specified number of consecutive monitoring times). If the sign of the rate difference is the same as If the sign of the rate difference is consistent and both exceed the limit, it is considered an abnormality in monitoring indicator collection, triggering the corresponding subsequent processing strategy; otherwise, it is considered a short-term data fluctuation and no action is required. This method effectively improves the ability to identify abnormal data while reducing the possibility of misjudgment.
[0027] The functional implementation of the dynamic adjustment component based on back pressure includes:
[0028] In the System Management Server, get the current time The length of each message queue (where i = 1, 2, 3....m), sum the lengths of each message queue to get the total message queue length First, check Whether it is 0 determines whether the queue is in a pile-up state. If If it is equal to 0, it means that the consumption rate is greater than or equal to the production rate. Loop detection for n times. If there is no change, the control script will modify the collection configuration in reverse, using the additive method to increase the collection frequency (for example, the collection interval -a) or increase the number of indicators ( ) to increase data production.
[0029] When the total message queue length When the consumption rate is determined to be less than the production rate, further combined with the change rate To make a judgment, specifically, when and When the system is in a high load state (HIGH_LOAD), the control script modifies the acquisition configuration in reverse, using a multiplication-reduction method to reduce the acquisition frequency (acquisition interval ) or reduce the number of indicators ( ).
[0030] when and When the system is in a low load state (LOW_LOAD), the control script modifies the acquisition configuration in reverse, using the additive method to increase the acquisition frequency (acquisition interval -a) or increase the number of indicators ( ) to increase data production.
[0031] In summary, the adaptive adjustment method for monitoring metric collection provided by embodiments of the present invention aims to dynamically adjust the amount and frequency of metrics collected by underlying nodes (upstream) by real-time evaluation of system-level (downstream) queue lengths and message change rates. This ensures that the upstream inflow rate matches the downstream processing rate, thereby stabilizing the data production and consumption process. The adaptive adjustment method for monitoring metric collection provided by embodiments of the present invention can be performed by an electronic device.
[0032] Figure 1 This is a flow chart of a method for adaptively adjusting monitoring indicator collection provided by an embodiment of the present invention. Figure 1The adaptive adjustment method for monitoring indicator collection specifically includes the following steps:
[0033] S110: Determine the total length of the message queue at time t.
[0034] Here, time t may refer to any specific time, for example, the current time may be marked as time t.
[0035] There can be multiple message queues. In this scenario, the total length refers to the sum of the lengths of each message queue, for example Indicates the length of the i-th message queue at time t, , m represents the total number of message queues.
[0036] S120. If the total length is less than or equal to zero, the total length of the message queue at a preset number of time points after time t is monitored, and the collection configuration of the monitoring indicator is adjusted according to the total length of the message queue at a preset number of time points after time t.
[0037] If the total length is less than or equal to zero, it means that the consumption rate of the message queue is greater than or equal to the production rate, which means that the processing capacity of the monitoring system is sufficient to adapt to the current collection configuration.
[0038] Furthermore, considering that the collection of monitoring indicators is easily affected by system fluctuations, in order to avoid the abnormal impact of system fluctuations on monitoring indicators and improve detection reliability, the total length of the message queue at multiple consecutive time points after moment t is continuously monitored, and the collection configuration of the monitoring indicators is adjusted according to the total length of the message queue at a preset number of time points after moment t.
[0039] Exemplarily, if the sum of the total lengths of the message queues at a preset number of time points after time t is zero, the collection frequency of the monitoring indicators is controlled to increase, and / or the number of monitoring indicators in one collection is controlled to increase.
[0040] If , then the frequency of monitoring indicator collection is increased, and / or the number of monitoring indicators collected in one collection is increased. Indicates the total length of the message queue at time t+i.
[0041] S130. If the total length is greater than zero, the collection configuration of the monitoring indicator is adjusted according to the change rate of the messages in the message queue at time t and a preset number of time points after time t, and the change rate of the messages in the message queue at multiple time points before time t.
[0042] The monitoring indicators are temporarily stored in the message queue after being collected, and are removed from the message queue when the monitoring indicators are analyzed and processed.
[0043] If the total length of the message queue at time t is greater than zero, it means that there are remaining unprocessed monitoring indicators, which means that the processing capacity of the monitoring system is insufficient to adapt to the current collection configuration. Under this premise, in order to avoid the abnormal impact of system fluctuations on the monitoring indicators, the collection configuration of the monitoring indicators is adjusted according to the change rate of messages in the message queue at time t and a preset number of time points after time t, as well as the change rate of messages in the message queue at multiple time points before time t.
[0044] The rate of change of messages in a message queue is the difference between the message generation rate and the message consumption rate. When there are multiple message queues, the rate of change of messages in the message queue is the sum of the rate of change of each message queue, that is, the difference between the production rate and the consumption rate of all message queues is accumulated to obtain the global monitoring indicator of the rate difference between queue entry and exit. .
[0045] Considering that distributed nodes in large-scale systems are prone to network transmission anomalies and monitoring indicator anomalies, which lead to frequent changes in the rate of change of messages in the message queue, not all changes in production rate and consumption rate represent monitoring indicator collection anomalies. Monitoring indicator collection anomalies that affect the system should show a certain degree of persistence. Therefore, a dynamic sliding window is maintained to record the changes in the message queue within a period of time. The statistical time series data of the difference between production rate and consumption rate can smooth the interference of instantaneous or short-term fluctuations on abnormal collection and detection, and improve the stability and accuracy of detection. Moment, calculation The maximum value of the rate differences recorded in the sliding window and minimum value As the current rate difference The upper and lower thresholds are used to determine Whether it exceeds the expected range, if it exceeds, it is marked as a significant fluctuation. In order to avoid misjudgment caused by short-term data fluctuations, when When it is judged to be a significant fluctuation, the system will continue to detect the rate difference at the next n moments. (where n is the specified number of consecutive monitoring times). If the sign of the rate difference is the same as If the sign of the rate difference is consistent and both exceed the limit, it is considered an abnormality in monitoring indicator collection, triggering the corresponding subsequent processing strategy; otherwise, it is considered a short-term data fluctuation and no action is required. This method effectively improves the ability to identify abnormal data while reducing the possibility of misjudgment.
[0046] Exemplarily, adjusting the collection configuration of the monitoring indicator according to the change rate of the messages in the message queue at time t and a preset number of time points after time t, and the change rate of the messages in the message queue at multiple time points before time t, includes:
[0047] An upper threshold and a lower threshold are determined based on the rate of change of messages in the message queue at multiple time points before time t; if the rate of change of messages in the message queue at time t is greater than the upper threshold and the average value of the rate of change of messages in the message queue at a preset number of time points after time t is greater than the upper threshold (this indicates that the production rate of messages is greater than the consumption rate, which exceeds the processing capacity of the monitoring system), then the collection frequency of the monitoring indicators is controlled to decrease, and / or the number of monitoring indicators in one collection is controlled to decrease, so as to achieve a dynamic balance between the collection configuration of the monitoring indicators and the processing capacity of the monitoring system.
[0048] If the rate of change of messages in the message queue at time t is not greater than the upper threshold or the average value of the rate of change of messages in the message queue at a preset number of time points after time t is not greater than the upper threshold, then the rate of change of messages in the message queue at time t and the average value of the rate of change of messages in the message queue at a preset number of time points after time t are compared with the lower threshold, and the collection configuration of the monitoring indicator is adjusted according to the comparison result.
[0049] The comparing the change rate of messages in the message queue at time t and the average value of the change rate of messages in the message queue at a preset number of time points after time t with the lower threshold, and adjusting the collection configuration of the monitoring indicator according to the comparison result, includes:
[0050] If the rate of change of messages in the message queue at time t is less than the lower limit threshold, and the average value of the rate of change of messages in the message queue at a preset number of time points after time t is less than the lower limit threshold (this indicates that the production rate of messages is less than the consumption rate, and the processing capacity of the monitoring system is not fully utilized. In order to take into account the coverage and comprehensiveness of monitoring, the collection frequency of monitoring indicators can be increased, or the number of collections can be increased), then the collection frequency of monitoring indicators is controlled to increase, and / or the number of monitoring indicators in one collection is controlled to increase.
[0051] If the rate of change of messages in the message queue at time t is not less than the lower limit threshold, or the average value of the rate of change of messages in the message queue at a preset number of time points after time t is not less than the lower limit threshold, the collection frequency of the monitoring indicators and the number of monitoring indicators in one collection are kept unchanged.
[0052] In some embodiments, the control of reducing the number of monitoring indicators in one acquisition includes: determining a first target number by a multiplicative subtraction method, and controlling the number of monitoring indicators in one acquisition to reduce the first target number. Among them, multiplicative subtraction is a mathematical strategy used when adjusting parameters such as the number or frequency of indicator acquisition, that is, reducing according to a certain proportion. For example, assuming that the initial indicator acquisition number is x, when a multiplicative subtraction operation is required, multiply it by a coefficient r less than 1 to obtain a new acquisition number y=x×r. If r=0.5, then after each multiplicative subtraction operation is performed, the indicator acquisition number will become half of the original. The purpose of this setting is to avoid excessive adjustment, and at the same time, it can quickly reduce the resource consumption of the monitoring system and alleviate the processing pressure of the monitoring system.
[0053] Alternatively, the number of times the number of monitoring indicators is reduced during a single collection is determined; a matching first target indicator is determined based on the number; and the first target indicator is controlled to be deleted from the collection list. This method can selectively determine which monitoring indicators to abandon collection. Preferably, less important monitoring indicators are abandoned first to maximize monitoring effectiveness even when monitoring indicators are reduced.
[0054] The control increases the number of indicators monitored in one acquisition, including:
[0055] An additive approach is used to determine the second target number and to control the increase in the number of monitored indicators during a collection. Additive increment is a method that increases the number of indicators by a fixed value. For example, if the initial number of indicators collected is x, when an additive increment is required, a fixed increment a is added to obtain the new number of indicators collected, y = x + a. This setting aims to steadily increase the consumption of monitoring system processing resources, precisely control the growth rate, and ensure system stability.
[0056] Alternatively, the number of times the number of monitoring indicators in a collection is continuously increased is determined; a matching second target indicator is determined based on the number; and the second target indicator is controlled to be added to the collection list. This method can selectively determine which monitoring indicators to add to the collection, preferably prioritizing the addition of more important monitoring indicators to ensure monitoring effectiveness.
[0057] The control monitoring indicator collection frequency is reduced, including:
[0058] Use a multiplicative subtraction method to control the acquisition frequency of the monitoring indicator to decrease; or, identify the configuration value of the acquisition frequency in the acquisition configuration of the monitoring indicator; calculate the difference between the configuration value and the set value; and modify the configuration value of the acquisition frequency in the acquisition configuration of the monitoring indicator to the difference.
[0059] The control monitoring indicator collection frequency is increased, including:
[0060] Adopting an additive increase method to control the increase of the acquisition frequency of the monitoring indicator; or, identifying the configuration value of the acquisition frequency in the acquisition configuration of the monitoring indicator; calculating the sum of the configuration value and the set value; and modifying the configuration value of the acquisition frequency in the acquisition configuration of the monitoring indicator to the sum.
[0061] Correspondingly, you can refer to Figure 2 The flowchart of a method for adaptively adjusting monitoring indicator collection shown in FIG. 1 specifically includes the following steps:
[0062] S1. Get the total length of all message queues, len(t), and the difference between the production rate and the consumption rate at time t, △s(t).
[0063] S2. Determine whether len(t) is greater than zero. If so, execute S3; otherwise, execute S4.
[0064] S3. Determine the upper and lower thresholds for abnormality detection.
[0065] S4. Judgment Is it true? If so, execute S5.
[0066] in, Represents the sum of the total lengths of all message queues at n time points after time t. Indicates the total length of all message queues at time t+i.
[0067] S5. Increase the frequency of upstream collection or increase the number of indicators.
[0068] S6. Determine △s(t)>upd(t) and Is it true? If so, execute S7; otherwise, execute S8.
[0069] Where upd(t) represents the upper threshold.
[0070] It represents the average value of the difference between the production rate and the consumption rate at n time points after time t. Represents the difference between the production rate and consumption rate of all message queues at time t+i.
[0071] S7. Reduce the upstream collection frequency or reduce the number of indicators.
[0072] S8. Determine whether △s(t) < lwd(t) and Is it true? If so, execute S9; otherwise, execute S10.
[0073] Where lwd(t) represents the lower threshold.
[0074] S9. Increase the frequency of upstream collection or increase the number of indicators.
[0075] S10. Keep the acquisition configuration unchanged.
[0076] This embodiment of the present invention detects anomalies in the metric collection process of large-scale computer systems by monitoring the persistent and significant differences in the production-consumption rate of metric message queues. When such anomalies occur in large-scale computer systems, the system automatically adjusts the number and frequency of source-side metric collection based on backpressure transmission. Dynamically adapting metric collection through additive and multiplicative subtraction ensures that the upstream inflow rate matches the downstream processing rate, thereby stabilizing the data production and consumption process.
[0077] Figure 3 Schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 3 As shown, the electronic device 200 includes one or more processors 201 and a memory 202 .
[0078] The processor 201 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 200 to perform desired functions.
[0079] The memory 202 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), a hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 201 may execute the program instructions to implement the adaptive adjustment method for monitoring indicator acquisition of any embodiment of the present invention described above and / or other desired functions. Various contents such as initial external parameters and thresholds may also be stored in the computer-readable storage medium.
[0080] In one example, the electronic device 200 may further include an input device 203 and an output device 204, which are interconnected via a bus system and / or other connection mechanisms (not shown). The input device 203 may include, for example, a keyboard, a mouse, etc. The output device 204 may output various information to the outside, including warning information, braking force, etc. The output device 204 may include, for example, a display, a speaker, a printer, a communication network, and remote output devices connected thereto.
[0081] Of course, to simplify, Figure 3Only some of the components related to the present invention in the electronic device 200 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device 200 may further include any other appropriate components according to specific application scenarios.
[0082] In addition to the above-mentioned methods and devices, an embodiment of the present invention may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the adaptive adjustment method for monitoring indicator collection provided by any embodiment of the present invention.
[0083] The computer program product may be written in any combination of one or more programming languages to implement the operations of embodiments of the present invention, including object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's computing device, as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0084] In addition, an embodiment of the present invention may also be a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the processor executes the steps of the adaptive adjustment method for monitoring indicator collection provided by any embodiment of the present invention.
[0085] The computer-readable storage medium may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0086] It should be noted that the terms used in the present invention are only for describing specific embodiments and are not intended to limit the scope of this application. As shown in the present specification, unless the context clearly indicates an exception, the words "one", "an", "a kind of" and / or "the" do not specifically refer to the singular and may also include the plural. The terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method or device comprising a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also include elements inherent to such process, method or device. In the absence of further restrictions, the elements defined by the sentence "comprise a..." do not exclude the presence of other identical elements in the process, method or device comprising the elements.
[0087] It should also be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they cannot be understood as limitations on the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be a communication between the internal parts of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.
Claims
1. A self-adaptive adjustment method for monitoring index collection, characterized in that: include: Determine the total length of the message queue at time t; If the total length is zero, the total length of the message queue at a preset number of time points after time t is monitored, and the collection configuration of the monitoring indicator is adjusted according to the total length of the message queue at the preset number of time points after time t; If the total length is greater than zero, the collection configuration of the monitoring indicator is adjusted according to the change rate of the messages in the message queue at time t and a preset number of time points after time t, and the change rate of the messages in the message queue at multiple time points before time t; The monitoring indicators are temporarily stored in the message queue after being collected, and are removed from the message queue when the monitoring indicators are analyzed and processed. The monitoring indicators are indicators of large-scale computer systems. The adjusting of the collection configuration of the monitoring indicator according to the change rate of the messages in the message queue at time t and a preset number of time points after time t, and the change rate of the messages in the message queue at multiple time points before time t, includes: Determine the upper threshold and the lower threshold according to the rate of change of messages in the message queue at multiple time points before time t; Moment, calculation The maximum value of the rate differences recorded in the sliding window and minimum value As the current rate difference The upper and lower thresholds of If the rate of change of messages in the message queue at time t is greater than the upper threshold and the average value of the rate of change of messages in the message queue at a preset number of time points after time t is greater than the upper threshold, then the collection frequency of the monitoring indicator is controlled to decrease, and / or the number of monitoring indicators in one collection is controlled to decrease; If the rate of change of messages in the message queue at time t is not greater than the upper threshold or the average value of the rate of change of messages in the message queue at a preset number of time points after time t is not greater than the upper threshold, then the rate of change of messages in the message queue at time t and the average value of the rate of change of messages in the message queue at a preset number of time points after time t are compared with the lower threshold, and the collection configuration of the monitoring indicator is adjusted according to the comparison result.
2. The method according to claim 1, characterized in that The adjusting of the collection configuration of the monitoring indicator according to the total length of the message queue at a preset number of time points after time t includes: If the sum of the total lengths of the message queues at a preset number of time points after time t is zero, the collection frequency of the monitoring indicators is controlled to increase, and / or the number of monitoring indicators in one collection is controlled to increase.
3. The method according to claim 1, characterized in that The comparing the change rate of messages in the message queue at time t and the average value of the change rate of messages in the message queue at a preset number of time points after time t with the lower threshold, and adjusting the collection configuration of the monitoring indicator according to the comparison result, includes: If the rate of change of messages in the message queue at time t is less than the lower threshold, and the average value of the rate of change of messages in the message queue at a preset number of time points after time t is less than the lower threshold, then the frequency of collecting the monitoring indicator is controlled to increase, and / or the number of monitoring indicators in one collection is controlled to increase; If the rate of change of messages in the message queue at time t is not less than the lower limit threshold, or the average value of the rate of change of messages in the message queue at a preset number of time points after time t is not less than the lower limit threshold, the collection frequency of the monitoring indicators and the number of monitoring indicators in one collection are kept unchanged.
4. The method according to claim 3, characterized in that The control reduces the number of indicators monitored in one collection, including: Determining a first target quantity by a multiplicative subtraction method, and controlling the number of monitoring indicators in one acquisition to reduce the first target quantity; Alternatively, the number of times the number of monitoring indicators is reduced in one acquisition is continuously controlled is determined; a matching first target indicator is determined according to the number; and the first target indicator is controlled to be deleted from the acquisition list.
5. The method according to claim 3, characterized in that The control increases the number of indicators monitored in one acquisition, including: Determining a second target quantity by an additive increase method, and controlling the number of monitoring indicators in one acquisition to increase the second target quantity; Alternatively, the number of times the number of monitoring indicators in one acquisition is continuously controlled to increase is determined; a matching second target indicator is determined according to the number; and the second target indicator is controlled to be added to the acquisition list.
6. The method according to claim 3, characterized in that The control monitoring indicator collection frequency is reduced, including: Use the multiplicative reduction method to control the frequency of monitoring index collection; Alternatively, a configuration value of the acquisition frequency in the acquisition configuration of the monitoring indicator is identified; a difference between the configuration value and a set value is calculated; and the configuration value of the acquisition frequency in the acquisition configuration of the monitoring indicator is modified to the difference.
7. The method according to claim 3, characterized in that The control monitoring indicator collection frequency is increased, including: Adopting the additive increase method to control the collection frequency of monitoring indicators; Alternatively, a configuration value of the acquisition frequency in the acquisition configuration of the monitoring indicator is identified; a sum of the configuration value and a set value is calculated; and the configuration value of the acquisition frequency in the acquisition configuration of the monitoring indicator is modified to the sum.
8. An electronic device, characterized in that: The electronic device comprises: processor and memory; The processor is configured to execute the steps of the adaptive adjustment method for monitoring indicator collection as described in any one of claims 1 to 7 by calling the program or instruction stored in the memory.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute the steps of the adaptive adjustment method for monitoring indicator collection according to any one of claims 1 to 7.
Citation Information
Patent Citations
A method and apparatus for configuring messages of a message queue
CN109240836A
Message queue management method and device
CN113138860A
Message pushing method, device, client device and system
CN118509298A