Method and system for collecting monitoring data of cloud host

By calculating the linear deviation rate of the cloud host and dynamically adjusting the acquisition cycle, the problem that traditional monitoring systems cannot cope with the dynamic changes in resource demand is solved, and efficient and timely monitoring data collection is achieved.

CN119583384AActive Publication Date: 2025-03-07CHINA TELECOM CLOUD TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411706360.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-07
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

Traditional cloud host monitoring systems use fixed sampling frequency and cannot effectively respond to dynamic changes in resource requirements, resulting in waste of resources or untimely monitoring.

Method used

By obtaining the historical data of the target cloud host, calculating the fitting function, determining the linear deviation average and historical average of the target data set, calculating the linear deviation rate, dynamically adjusting the monitoring and acquisition period, and realizing adaptive monitoring and data acquisition.

Benefits of technology

It improves sampling efficiency, reduces resource waste, timely captures the changes in resource use, and enhances the information value of monitoring data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583384A_ABST
    Figure CN119583384A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a cloud host monitoring data acquisition method and system. The cloud host monitoring data acquisition method comprises the following steps: acquiring historical data of a target cloud host; calculating a fitting function based on the historical data; determining a target data set in the historical data, calculating a linear deviation average value of the target data set, and calculating a historical average value of the target data set based on the fitting function; calculating the linear deviation rate of the target cloud host based on the linear deviation average value and the historical average value; calculating a monitoring acquisition period of the target cloud host based on the linear deviation rate; and based on the monitoring acquisition period, acquiring monitoring data of the target cloud host. The linear deviation rate of the target cloud host is calculated through the historical data of the target cloud host, and the linear deviation rate of the target cloud host can reflect the proportion of the data fluctuation of the target cloud host relative to the overall trend, so that the dynamic adjustment of the monitoring data acquisition frequency of the target cloud host is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and system for collecting cloud host monitoring data. Background Art

[0002] In a cloud computing environment, resource monitoring is the basis for ensuring service quality, optimizing resource utilization, and timely detecting system failures. Resource monitoring not only helps maintain service level agreements, but is also crucial to cost control and system health.

[0003] However, traditional monitoring systems often use fixed sampling frequencies (periodic sampling methods). This static method cannot effectively cope with the dynamic changes in resource demand, resulting in resource waste or untimely monitoring. For example, during peak load periods, fixed frequencies may not provide enough data to make timely resource adjustment decisions, while during periods of low load, a large amount of unnecessary data collection may be generated, resulting in resource waste.

[0004] Therefore, it is urgent to develop a cloud host monitoring data collection method that can adaptively adjust the monitoring strategy. Summary of the invention

[0005] Based on this, it is necessary to provide a cloud host monitoring data collection method and system that can improve sampling efficiency in response to the above technical problems.

[0006] In a first aspect, the present application provides a method for collecting cloud host monitoring data, comprising:

[0007] Get the historical data of the target cloud host;

[0008] Based on the historical data, calculating a fitting function;

[0009] Determining a target data set from the historical data, calculating a linear deviation average value of the target data set, and calculating a historical average value of the target data set based on the fitting function;

[0010] Calculating the linear deviation rate of the target cloud host based on the linear deviation average value and the historical average value;

[0011] Based on the linear deviation rate, calculating the monitoring collection period of the target cloud host;

[0012] Based on the monitoring collection cycle, the monitoring data of the target cloud host is collected.

[0013] In one embodiment, the calculating the monitoring collection period of the target cloud host based on the linear deviation rate includes:

[0014] Determine target sensitivity;

[0015] Based on the target sensitivity, a sampling data window value and / or a jitter data window value of the target cloud host is calculated.

[0016] In one embodiment, the calculating the monitoring collection period of the target cloud host based on the linear deviation rate includes:

[0017] Based on the linear deviation rate and the threshold, a monitoring collection period of the target cloud host is determined.

[0018] In one of the embodiments, when the linear deviation rate is not less than a threshold, determining a maximum collection time in the historical data of the target cloud host;

[0019] Based on the collection interval time corresponding to the maximum collection time, the monitoring collection period of the target cloud host is determined.

[0020] In one of the embodiments, when the linear deviation rate is less than a threshold, determining a maximum collection time and a minimum collection time in the historical data of the target cloud host;

[0021] Based on the maximum collection time, the minimum collection time and the linear deviation rate, a monitoring collection period of the target cloud host is determined.

[0022] In one embodiment, after collecting the monitoring data of the target cloud host based on the monitoring collection cycle, the following steps are performed:

[0023] The monitoring data collected from the target cloud host is stored.

[0024] In a second aspect, the present application also provides a cloud host monitoring data collection system, including:

[0025] Cloud center component, used to manage cloud hosts;

[0026] The edge cluster component is connected to the cloud center component and executes the cloud host monitoring data collection method as described in any of the above items.

[0027] In one of the embodiments, the edge cluster component includes a collection parameter configuration module, and the collection parameter configuration module configures the collection list in response to the configuration instruction sent by the cloud center component.

[0028] In one of the embodiments, the edge cluster component includes a monitoring data collection module, which is connected to multiple cloud hosts and obtains historical data of the multiple cloud hosts.

[0029] In one of the embodiments, the edge cluster component includes a collection frequency adjustment module and / or a monitoring data storage module, the collection frequency adjustment module is used to adjust the collection frequency of the target cloud host, and the monitoring data storage module is used to store monitoring data of the target cloud host.

[0030] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0031] Get the historical data of the target cloud host;

[0032] Based on the historical data, calculating a fitting function;

[0033] Determining a target data set from the historical data, calculating a linear deviation average value of the target data set, and calculating a historical average value of the target data set based on the fitting function;

[0034] Calculating the linear deviation rate of the target cloud host based on the linear deviation average value and the historical average value;

[0035] Based on the linear deviation rate, calculating the monitoring collection period of the target cloud host;

[0036] Based on the monitoring collection cycle, the monitoring data of the target cloud host is collected.

[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0038] Get the historical data of the target cloud host;

[0039] Based on the historical data, calculating a fitting function;

[0040] Determining a target data set from the historical data, calculating a linear deviation average value of the target data set, and calculating a historical average value of the target data set based on the fitting function;

[0041] Calculating the linear deviation rate of the target cloud host based on the linear deviation average value and the historical average value;

[0042] Based on the linear deviation rate, calculating the monitoring collection period of the target cloud host;

[0043] Based on the monitoring collection cycle, the monitoring data of the target cloud host is collected.

[0044] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0045] Get the historical data of the target cloud host;

[0046] Based on the historical data, calculating a fitting function;

[0047] Determining a target data set from the historical data, calculating a linear deviation average value of the target data set, and calculating a historical average value of the target data set based on the fitting function;

[0048] Calculating the linear deviation rate of the target cloud host based on the linear deviation average value and the historical average value;

[0049] Based on the linear deviation rate, calculating the monitoring collection period of the target cloud host;

[0050] Based on the monitoring collection cycle, the monitoring data of the target cloud host is collected.

[0051] The above-mentioned cloud host monitoring data collection method and system calculates the linear deviation rate of the target cloud host through the historical data of the target cloud host. The linear deviation rate of the target cloud host can reflect the proportion of the data fluctuation of the target cloud host relative to the overall trend, so as to obtain the prediction of the future trend of key performance indicators, and then realize the dynamic adjustment of the monitoring data collection frequency of the target cloud host, so as to achieve the highest information acquisition efficiency with the lowest data collection amount, thereby enhancing the information value of the monitoring data. Specifically, the present application can reduce data collection when resource usage is relatively stable, thereby reducing the burden on cloud resources, and when resource usage changes dramatically, by increasing the collection frequency, timely capture key performance change points, and reduce data distortion caused by insufficient sampling. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0053] Figure 1 A schematic diagram of a flow chart of a method for collecting cloud host monitoring data in a first embodiment;

[0054] Figure 2 A schematic diagram of a flow chart of a method for collecting cloud host monitoring data in a second embodiment;

[0055] Figure 3 A schematic diagram of a flow chart of a method for collecting cloud host monitoring data in a third embodiment;

[0056] Figure 4 It is a flowchart of a method for collecting cloud host monitoring data in a fourth embodiment;

[0057] Figure 5 It is a flowchart of a method for collecting cloud host monitoring data in a fifth embodiment;

[0058] Figure 6 It is a flowchart of a method for collecting cloud host monitoring data in a sixth embodiment;

[0059] Figure 7 A structural block diagram of a cloud host monitoring data collection system in one embodiment;

[0060] Figure 8 It is a schematic diagram of the flow of the acquisition frequency adjustment module in one embodiment;

[0061] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0063] As mentioned in the background technology, traditional monitoring systems often use a fixed sampling frequency (periodic sampling method). This static method cannot effectively cope with the dynamic changes in resource demand, resulting in resource waste or untimely monitoring. In the periodic sampling method, a fixed sampling time interval is generally set in advance. When the set sampling time point is reached, the monitoring software collects and stores the relevant monitoring indicators of the cloud host. In addition, traditional technologies also include threshold-based event-driven methods. In the threshold-based event-driven method, various thresholds for resource usage are preset. Once the actual usage of the resource reaches or exceeds these thresholds, it triggers an increase or decrease in the acquisition frequency.

[0064] However, the inventors have found that both the periodic sampling method and the threshold-based event-driven method have defects. In the periodic sampling method, its adaptability is limited when processing nonlinear or rapidly changing data. The fixed sampling interval may result in the inability to capture key details when the data fluctuates violently, thereby missing important information at critical moments. In addition, the fixed sampling frequency causes the information density of the monitoring data to be insufficient and fully cover all key change points, especially when there are spikes or mutations in resource usage, resulting in the smoothing of the analysis results, which cannot accurately reflect sudden performance problems, thereby affecting the accuracy of fault diagnosis and performance optimization. Moreover, since the sampling frequency remains unchanged, the periodic sampling method may not be able to provide timely updated information when the data changes faster, and thus cannot accurately reflect the immediate status of the system. This is a significant defect for cloud environments that require rapid response. In the threshold-based event-driven method, when the resource usage changes relatively slowly, the threshold-based event-driven method may trigger too frequent sampling behavior and generate a large amount of redundant data. This situation will not only increase the storage and processing burden of the monitoring system, but may also cause additional resource pressure on the cloud host, especially when the cloud host is already in a state of continuous high load, the impact of this additional pressure is more significant. Moreover. When resource indicators change quickly but the magnitude of the change has not yet reached the preset threshold, the threshold-based event-driven approach may not be able to respond to the change in time, causing the sampling frequency to be unable to keep up with the actual change speed of the resource. This delay may result in insufficient sampling times and an inability to accurately capture the real-time change trend of resource usage.

[0065] Based on this, multiple embodiments of the present application provide a method and system for collecting cloud host monitoring data, which dynamically and efficiently monitor the resource usage of the cloud host through an adaptive algorithm.

[0066] The cloud host monitoring data collection method provided in the embodiment of the present application can be applied to an environment where a terminal and a server interact. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and Internet of Things devices. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0067] In one embodiment, Figure 1 As shown, a method for collecting cloud host monitoring data is provided. This embodiment uses the method applied to a terminal as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0068] Step S100: Obtain historical data of the target cloud host.

[0069] Step S200: Calculate the fitting function based on historical data.

[0070] Step S300: determining a target data set in the historical data, calculating the average value of the linear deviation of the target data set, and calculating the historical average value of the target data set based on the fitting function.

[0071] Step S400: Calculate the linear deviation rate of the target cloud host based on the linear deviation average value and the historical average value.

[0072] Step S500: Calculate the monitoring collection period of the target cloud host based on the linear deviation rate.

[0073] Step S600: Based on the monitoring collection cycle, collect monitoring data of the target cloud host.

[0074] In step S100, the performance data of the target cloud host in the past period of time is obtained through the API interface of the cloud platform, or the local database or log file. For example, key indicators such as CPU utilization, memory occupancy, disk input and output, and network traffic of the target cloud host can be obtained.

[0075] In step S200, data fitting can be performed using a univariate linear method to obtain a fitting function that can describe the data trend of the target cloud host. This embodiment does not limit the specific form of the fitting function.

[0076] In step S300, as an example, the target data set may be the first M data of the most recent sampling. Afterwards, the average linear deviation between the target data set and the fitting function may be calculated to evaluate the volatility of the data, and the historical average of the target data set based on the fitting function may also be calculated to understand the overall trend of the data.

[0077] In step S400, a ratio of data fluctuation to the overall trend, i.e., a linear deviation rate, can be calculated by comparing the linear deviation average value and the historical average value. As an example, the linear deviation rate can be equal to the ratio of the linear deviation average value to the historical average value.

[0078] In step S500, the collection period of the monitoring data can be dynamically adjusted according to the fluctuation degree of the data. As an example, at this time, a threshold or rule can be set, such as shortening the collection period when the linear deviation rate exceeds a certain value. When the linear deviation rate is lower than a certain value, the collection period is extended.

[0079] In step S600, the performance data of the target cloud host may be collected periodically through a timer or a scheduler according to the calculated monitoring collection period.

[0080] In this embodiment, the linear deviation rate of the target cloud host is calculated through the historical data of the target cloud host. The linear deviation rate of the target cloud host can reflect the proportion of the data fluctuation of the target cloud host relative to the overall trend, so as to obtain the prediction of the future trend of the key performance indicators, and then realize the dynamic adjustment of the monitoring data collection frequency of the target cloud host, so as to achieve the highest information acquisition efficiency with the lowest data collection amount, thereby enhancing the information value of the monitoring data. Specifically, this embodiment can reduce data collection when the resource usage is relatively stable, thereby reducing the burden on cloud resources, and when the resource usage changes dramatically, by increasing the collection frequency, timely capture key performance change points, and reduce data distortion caused by insufficient sampling.

[0081] In one embodiment, see Figure 2 , step S500 includes:

[0082] Step S510: Determine target sensitivity.

[0083] Step S511: Based on the target sensitivity, a sampling data window value and / or a jitter data window value of the target cloud host is calculated.

[0084] In step S510, the sensitivity can be used to determine whether the change in the cloud host performance data is significant. The target sensitivity can be a fixed value, or a percentage or standard deviation dynamically calculated based on historical data.

[0085] In step S511, two key parameters for monitoring data acquisition can be determined based on the target sensitivity: the sampling data window value and the jitter data window value. The sampling data window value can define the time range or number of data points considered each time data is collected. A larger window value can smooth data fluctuations, but may mask significant changes in a short period of time. A smaller window value can capture data changes more sensitively, but may increase noise. The jitter data window value can be used to determine whether the data has changed significantly (i.e., jitter) in a short period of time.

[0086] In this embodiment, the sampling data window value and the jitter data window value can be set according to different monitoring indicators and the required sensitivity, so as to reduce the impact of sampling on the working conditions. Specifically, increasing the window width can increase the number of sampling points for jitter ratio calculation, thereby reducing the impact of individual data mutations on the jitter ratio, but it will also reduce the sensitivity. Similarly, reducing the window width will increase the sensitivity, but there will be a high misjudgment rate when encountering mutation data, which increases unnecessary acquisition frequency.

[0087] In one embodiment, see Figure 3 , step S500 includes:

[0088] Step S520: Determine the monitoring collection period of the target cloud host based on the linear deviation rate and the threshold.

[0089] The linear deviation rate can be used to evaluate the fluctuation of the target cloud host performance data, and determine whether the monitoring collection cycle needs to be adjusted based on the preset threshold. For example, if the linear deviation rate exceeds the threshold, it indicates that the data fluctuation is large and more frequent collection is required. Otherwise, the collection frequency can be appropriately reduced.

[0090] For details, please refer to Figure 4 In one possible example, step S520 may include:

[0091] Step S521: When the linear deviation rate is not less than a threshold, a maximum collection time is determined in the historical data of the target cloud host.

[0092] Step S522: Determine the monitoring collection period of the target cloud host based on the collection interval time corresponding to the maximum collection time.

[0093] In step S521 to step S522, if the linear deviation rate is not less than the threshold, it means that the data fluctuates greatly. At this time, the maximum collection time can be found in the historical data. Then, within the maximum collection time, the average time interval between adjacent data points is calculated as a new monitoring collection cycle.

[0094] In another possible example, see Figure 5 , step S520 may include:

[0095] Step S523: When the linear deviation rate is less than the threshold, a maximum collection time and a minimum collection time are determined in the historical data of the target cloud host.

[0096] Step S524: Determine the monitoring collection period of the target cloud host based on the maximum collection time, the minimum collection time and the linear deviation rate.

[0097] In step S523 to step S524, if the linear deviation rate is less than the threshold, it means that the data fluctuation is small. At this time, the historical data can be analyzed to find the maximum collection time and the minimum collection time. Then, a more reasonable monitoring collection cycle is calculated by combining the maximum collection time, the minimum collection time and the linear deviation rate. As an example, the threshold can be 1.

[0098] In this embodiment, the monitoring and collection cycle is dynamically adjusted according to the fluctuation of the target cloud host performance data, thereby reducing the collection cost and storage requirements while ensuring data accuracy. This helps to optimize the performance monitoring strategy of the cloud host and improve operation and maintenance efficiency and system stability.

[0099] In one embodiment, see Figure 6, after step S600, the following steps are included:

[0100] Step S700: Store the monitoring data collected from the target cloud host.

[0101] First, it can ensure that the collected monitoring data can be saved completely and accurately. After that, the monitoring data collected from the target cloud host can be used as a data source for subsequent data analysis, performance evaluation, and troubleshooting. Specifically, a relational database (such as MySQL, PostgreSQL) can be used to store the monitoring data. Of course, the monitoring data collected from the target cloud host can be stored in the form of files on a local file system or a distributed file system, or the storage service of the cloud service provider can be used to store the monitoring data.

[0102] In this embodiment, by effectively storing the collected monitoring data of the target cloud host, reliable data support is provided for subsequent data analysis and performance monitoring to adapt to changing business needs.

[0103] The following is an exemplary description of the cloud host monitoring data collection method provided by the present application. First, for a cloud host E that needs to be collected i , get the following configuration: Maximum acquisition time T max , minimum acquisition time T min , the required collection index list F, sampling data window value N, jitter data window value M. Among them, the sampling data window value N and the jitter data window value M can be set according to different monitoring indicators and the required sensitivity. After that, the latest N historical data sets D of the required collection index F of the cloud host in the monitoring data storage module can be read. For historical data D1 to D n The N sampling values ​​of are used to fit the data using a univariate linear method. The univariate linear regression model is as follows:

[0104] y=β0+β1x

[0105] D={(x1,y1),(x2,y2),...,(x n ,y n )} can represent a sampling set, x1 <x2<…<x n Indicates the sampling time point, the corresponding y n Represents the actual data of the monitoring indicator. Use the least squares method to solve β0 and β1, and the solution of the equation group is:

[0106]

[0107] Furthermore, it is necessary to calculate the linear deviation rate. At this time, select the first M data of the most recent sampling and calculate the average linear deviation:

[0108]

[0109] The historical average of the first M data:

[0110]

[0111] The linear deviation rate can be expressed as:

[0112]

[0113] The linear deviation rate reflects the linear deviation of the indicators collected by the monitoring system. The larger the value, the more dramatic the data changes in a nonlinear manner, and the collection interval of the monitoring indicators should be reduced; otherwise, the collection interval of the monitoring indicators should be increased. At the same time, the linear deviation rate is an equal magnitude ratio, which can adapt to the magnitude differences of different monitoring indicators. Finally, the collection time can be updated. The collection interval of the monitoring system should be adjusted in real time according to the linear deviation rate. If it is greater than 1, it is considered that the monitoring indicator changes drastically in a nonlinear manner, and the minimum collection interval is used at this time; otherwise, The value size adjusts the collection interval.

[0114]

[0115] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0116] Based on the same inventive concept, please refer to Figure 7 and Figure 8 In one embodiment, a cloud host monitoring data collection system is provided. The cloud host monitoring data collection system includes a cloud center component and an edge cluster component. Specifically, the cloud center component can be connected to multiple edge cluster components.

[0117] The cloud center has a built-in cloud host management module, which is responsible for the management of the entire life cycle of the cloud host and ensures that the monitoring configuration is synchronized to the acquisition parameter configuration module in real time. The edge cluster deploys the cloud host monitoring service, which is responsible for the comprehensive monitoring of multiple cloud hosts, including key indicators such as CPU utilization, memory usage, disk input and output (I / O) and network traffic, and supports the flexible configuration requirements of the cloud host.

[0118] The edge cluster component can implement the cloud host monitoring data collection method provided in one or more of the above embodiments. Specifically, the edge cluster component includes a collection frequency adjustment module, a monitoring data collection module, a monitoring data storage module, and a collection parameter configuration module.

[0119] Specifically, the acquisition parameter configuration module is used to read parameter configuration and refine configuration management, including the list of cloud hosts that need to be monitored E = {E1, E2..., E n}, the collection index list corresponding to the cloud host F = {F1, F2..., F n}, etc., to ensure the personalized deployment of monitoring strategies. As an example, specifically, before step S100, the cloud center selects the edge cluster to start the cloud host, and immediately pushes the monitoring configuration to the collection configuration module of the monitoring service. Under the guidance of the cloud host management module, the cloud host is activated and its monitoring configuration instructions are passed to the collection configuration module of the cloud host monitoring service. The configuration clearly defines the monitoring indicators (including CPU usage F cpu and memory usage F mem ), their respective maximum and minimum acquisition cycles T max , T min , sampling data window value N, jitter data window value M. At this time, the monitoring configuration items of each cloud host (such as collection indicators, window size, etc.) can be flexibly adjusted according to business needs, and support real-time updates through the cloud host configuration channel.

[0120] The collection frequency adjustment module can read historical data, perform linear regression prediction, calculate the linear deviation rate, and update the collection cycle T to be executed accordingly. The monitoring data collection module communicates with the cloud host agent according to the set collection cycle T to realize the collection of monitoring data. After that, the monitoring data collection module writes the collected data to the monitoring data storage module to realize the persistent storage and subsequent query of the data.

[0121] The collection frequency adjustment module can be responsible for monitoring the model regression of data and dynamically adjusting the collection frequency. As an example, a data collection module named node_exporter can be deployed to collect key performance indicators, including CPU usage F cpu 、Memory usage F mem and disk I / O activity IOThe module realizes data capture through proxy communication with the cloud host, and its monitoring indicators can be flexibly selected according to the configuration file, ensuring a high degree of customization. Before the monitoring data collection starts, the collection frequency adjustment module can be activated. cpu For example, after the last data collection is completed, the collection frequency adjustment module adjusts the historical window size N cpu , extract data from the monitoring data storage module. If the data in the storage module is less than the sampling data window size, the update collection time is Otherwise, based on the set window size, the acquisition frequency adjustment module collects data and performs linear regression analysis to obtain the model y = β0 + β1x, where y1, y2, ..., y n , is the regression value of each sampling point, according to the jitter window size M cpu , calculate the linear average deviation of the nearest M data points, and find the average value of these M data. Based on this, the linear deviation ratio is calculated. Reflects the severity of data changes. And, adjust the sampling frequency according to the linear jitter ratio. If it is greater than 1, it indicates that the data fluctuates violently, and the next collection interval is adjusted to the minimum value. When the linear jitter ratio If the jitter is considered to be gentle, the fluctuation is considered to be gentle, and the collection interval is adjusted to The collection frequency module starts the next round of data capture tasks. The collection process of memory usage is similar to that of CPU, following the same aforementioned steps to ensure the consistency and comprehensiveness of resource monitoring.

[0122] The monitoring data collection module can communicate with the cloud host agent to realize the collection function of monitoring indicators, and store the collected data in the monitoring data storage module. The monitoring data storage module is used to centrally store the monitoring data from each cloud host to support subsequent analysis and query.

[0123] Each module in the above cloud host monitoring data collection system can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0124] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig. 9As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the collected data of the cloud host monitoring data. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for collecting cloud host monitoring data is implemented.

[0125] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0126] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0127] Step S100: Obtain historical data of the target cloud host.

[0128] Step S200: Calculate the fitting function based on historical data.

[0129] Step S300: determining a target data set in the historical data, calculating the average value of the linear deviation of the target data set, and calculating the historical average value of the target data set based on the fitting function.

[0130] Step S400: Calculate the linear deviation rate of the target cloud host based on the linear deviation average value and the historical average value.

[0131] Step S500: Calculate the monitoring collection period of the target cloud host based on the linear deviation rate.

[0132] Step S600: Based on the monitoring collection cycle, collect monitoring data of the target cloud host.

[0133] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0134] Step S510: Determine target sensitivity.

[0135] Step S511: Based on the target sensitivity, a sampling data window value and / or a jitter data window value of the target cloud host is calculated.

[0136] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0137] Step S520: Determine the monitoring collection period of the target cloud host based on the linear deviation rate and the threshold.

[0138] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0139] Step S521: When the linear deviation rate is not less than a threshold, a maximum collection time is determined in the historical data of the target cloud host.

[0140] Step S522: Determine the monitoring collection period of the target cloud host based on the collection interval time corresponding to the maximum collection time.

[0141] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0142] Step S523: When the linear deviation rate is less than the threshold, a maximum collection time and a minimum collection time are determined in the historical data of the target cloud host.

[0143] Step S524: Determine the monitoring collection period of the target cloud host based on the maximum collection time, the minimum collection time and the linear deviation rate.

[0144] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0145] Step S700: Store the monitoring data collected from the target cloud host.

[0146] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0147] Step S100: Obtain historical data of the target cloud host.

[0148] Step S200: Calculate the fitting function based on historical data.

[0149] Step S300: determining a target data set in the historical data, calculating the average value of the linear deviation of the target data set, and calculating the historical average value of the target data set based on the fitting function.

[0150] Step S400: Calculate the linear deviation rate of the target cloud host based on the linear deviation average value and the historical average value.

[0151] Step S500: Calculate the monitoring collection period of the target cloud host based on the linear deviation rate.

[0152] Step S600: Based on the monitoring collection cycle, collect monitoring data of the target cloud host.

[0153] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0154] Step S510: Determine target sensitivity.

[0155] Step S511: Based on the target sensitivity, a sampling data window value and / or a jitter data window value of the target cloud host is calculated.

[0156] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0157] Step S520: Determine the monitoring collection period of the target cloud host based on the linear deviation rate and the threshold.

[0158] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0159] Step S521: When the linear deviation rate is not less than a threshold, a maximum collection time is determined in the historical data of the target cloud host.

[0160] Step S522: Determine the monitoring collection period of the target cloud host based on the collection interval time corresponding to the maximum collection time.

[0161] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0162] Step S523: When the linear deviation rate is less than the threshold, a maximum collection time and a minimum collection time are determined in the historical data of the target cloud host.

[0163] Step S524: Determine the monitoring collection period of the target cloud host based on the maximum collection time, the minimum collection time and the linear deviation rate.

[0164] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0165] Step S700: Store the monitoring data collected from the target cloud host.

[0166] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0167] Step S100: Obtain historical data of the target cloud host.

[0168] Step S200: Calculate the fitting function based on historical data.

[0169] Step S300: determining a target data set in the historical data, calculating the average value of the linear deviation of the target data set, and calculating the historical average value of the target data set based on the fitting function.

[0170] Step S400: Calculate the linear deviation rate of the target cloud host based on the linear deviation average value and the historical average value.

[0171] Step S500: Calculate the monitoring collection period of the target cloud host based on the linear deviation rate.

[0172] Step S600: Based on the monitoring collection cycle, collect monitoring data of the target cloud host.

[0173] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0174] Step S510: Determine target sensitivity.

[0175] Step S511: Based on the target sensitivity, a sampling data window value and / or a jitter data window value of the target cloud host is calculated.

[0176] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0177] Step S520: Determine the monitoring collection period of the target cloud host based on the linear deviation rate and the threshold.

[0178] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0179] Step S521: When the linear deviation rate is not less than a threshold, a maximum collection time is determined in the historical data of the target cloud host.

[0180] Step S522: Determine the monitoring collection period of the target cloud host based on the collection interval time corresponding to the maximum collection time.

[0181] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0182] Step S523: When the linear deviation rate is less than the threshold, a maximum collection time and a minimum collection time are determined in the historical data of the target cloud host.

[0183] Step S524: Determine the monitoring collection period of the target cloud host based on the maximum collection time, the minimum collection time and the linear deviation rate.

[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0185] Step S700: Store the monitoring data collected from the target cloud host.

[0186] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0187] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0188] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for collecting cloud host monitoring data, characterized in that: The method comprises: Get the historical data of the target cloud host; Based on the historical data, calculating a fitting function; Determining a target data set from the historical data, calculating a linear deviation average value of the target data set, and calculating a historical average value of the target data set based on the fitting function; Calculating the linear deviation rate of the target cloud host based on the linear deviation average value and the historical average value; Based on the linear deviation rate, calculating the monitoring collection period of the target cloud host; Based on the monitoring collection cycle, the monitoring data of the target cloud host is collected.

2. The method for collecting cloud host monitoring data according to claim 1, characterized in that: The calculating the monitoring collection period of the target cloud host based on the linear deviation rate includes: Determine target sensitivity; Based on the target sensitivity, a sampling data window value and / or a jitter data window value of the target cloud host is calculated.

3. The method for collecting cloud host monitoring data according to claim 1, characterized in that: The calculating the monitoring collection period of the target cloud host based on the linear deviation rate includes: Based on the linear deviation rate and the threshold, a monitoring collection period of the target cloud host is determined.

4. The method for collecting cloud host monitoring data according to claim 3, characterized in that: When the linear deviation rate is not less than a threshold, determining a maximum collection time in historical data of the target cloud host; Based on the collection interval time corresponding to the maximum collection time, the monitoring collection period of the target cloud host is determined.

5. The method for collecting cloud host monitoring data according to claim 3, characterized in that: When the linear deviation rate is less than a threshold, determining a maximum collection time and a minimum collection time in the historical data of the target cloud host; Based on the maximum collection time, the minimum collection time and the linear deviation rate, a monitoring collection period of the target cloud host is determined.

6. The method for collecting cloud host monitoring data according to claim 1, characterized in that: After collecting the monitoring data of the target cloud host based on the monitoring collection cycle, the method includes: The monitoring data collected from the target cloud host is stored.

7. A cloud host monitoring data collection system, characterized in that: include: Cloud center component, used to manage cloud hosts; The edge cluster component is connected to the cloud center component and executes the cloud host monitoring data collection method as described in any one of claims 1-6.

8. The cloud host monitoring data collection system according to claim 7, characterized in that: The edge cluster component includes a collection parameter configuration module, and the collection parameter configuration module configures a collection list in response to a configuration instruction sent by the cloud center component.

9. The cloud host monitoring data collection system according to claim 7, characterized in that: The edge cluster component includes a monitoring data acquisition module, which is connected to multiple cloud hosts and obtains historical data of the multiple cloud hosts.

10. The cloud host monitoring data collection system according to claim 7, characterized in that: The edge cluster component includes a collection frequency adjustment module and / or a monitoring data storage module. The collection frequency adjustment module is used to adjust the collection frequency of the target cloud host, and the monitoring data storage module is used to store monitoring data of the target cloud host.

Citation Information

Patent Citations

  • Cloud platform resource monitoring method and device, electronic equipment and readable storage medium

    CN116089213A

  • Low complexity detection of voiced speech and pitch estimation

    IN202017006218A

  • Composition for forming lithium metal protective layer, lithium electrode and method of manufacturing for the same

    KR1020250122223A