Monitoring method, device, equipment and storage medium based on CPU dynamic threshold
Through the monitoring method based on CPU dynamic threshold, the CPU usage curve and real data of the current time period are predicted using historical data, and the alarm level is dynamically adjusted, which solves the problem of insufficient timeliness and accuracy of CPU monitoring alarms in the existing technology, and realizes the More efficient exception recognition and response.
Patent Information
- Application Number
- CN202110726394.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-29
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2041-06-29
AI Technical Summary
In the prior art, CPU usage monitoring alarms rely on experienced thresholds and cannot meet the high accuracy and timeliness requirements of open platforms, resulting in low timeliness and accuracy of monitoring alarms.
By obtaining the CPU usage historical data, determining the prediction curve of the current time period, and dynamically adjusting the alarm level with the real data within the preset period to achieve alarms for different abnormal situations.
It improves the accuracy and timeliness of CPU usage monitoring, can predict and identify abnormal situations more accurately, reduce false alarms, and improve the response efficiency of operation and maintenance personnel.
Smart Images

Figure CN113448805B_ABST
Abstract
Description
Technical Field
[0001] This article belongs to the field of financial technology, and specifically relates to a monitoring method, device, equipment and storage medium based on CPU dynamic threshold. Background Art
[0002] The central processing unit (CPU) is one of the cores of the server. In the operation and maintenance of computer servers, it is necessary to monitor the operating indicators of each server system in real time, such as the server's CPU usage, memory usage, hard disk usage, system load rate, network bandwidth usage, etc. The above indicators can reflect the health of the server from different dimensions. When the indicators are not in the normal range, the server system may not work properly, resulting in reduced performance and affecting the performance experience of the front-end application. When the CPU usage rate is too high for a long time, the CPU temperature will increase, which will affect the service life of the CPU in a high temperature environment, and sometimes even cause the server to crash.
[0003] In the prior art, the monitoring alarm for CPU usage is generally based on the threshold set by the operation and maintenance personnel based on their experience as the standard for alarm prompts. However, with the increase in the application of open platforms, the number of deployed servers is also increasing, which makes server monitoring more difficult and requires higher accuracy. Therefore, the method of setting by experience cannot meet the monitoring requirements of open platforms, resulting in low alarm timeliness and accuracy. Therefore, how to improve the timeliness and accuracy of CPU monitoring alarms has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] In view of the above problems in the prior art, the purpose of this article is to provide a monitoring method, device, equipment and storage medium based on CPU dynamic threshold, which can improve the timeliness and accuracy of server CPU monitoring alarms.
[0005] In order to solve the above technical problems, the specific technical solutions of this article are as follows:
[0006] In one aspect, the present invention provides a monitoring method based on a CPU dynamic threshold, the method comprising:
[0007] Get CPU usage history data;
[0008] Determine a CPU usage prediction curve of the server in the current time period based on the historical data, wherein the prediction curve is fitted by the CPU usage prediction values at each collection moment in the current time period;
[0009] The real data of CPU usage is obtained in real time according to a preset period, where each preset period includes multiple collection moments;
[0010] Determine the alarm level of each preset period according to the real data collected in the preset period and the prediction curve of the corresponding time period;
[0011] An alarm is issued according to the alarm level.
[0012] Further, determining a CPU usage prediction curve of the server in a current time period according to the historical data includes:
[0013] Acquire historical data of a first time period and a second time period, wherein the first time period is a previous historical time period of a time period corresponding to the preset period, and the second time period is a plurality of historical time periods of a time period corresponding to the preset period;
[0014] Calculate and obtain a predicted value of CPU usage at each moment in the current time period based on the historical data of the first time period and the second time period;
[0015] The CPU usage prediction curve is determined according to the CPU usage prediction value at each moment in the current time period.
[0016] Further, the calculating and obtaining the CPU usage prediction value at each moment in the current time period according to the historical data of the first time period and the second time period includes:
[0017] Calculate the standard deviation of the historical data at any corresponding moment in the second time period according to the historical data at the corresponding moment in the second time period;
[0018] The CPU usage prediction value at the corresponding moment in the current time period is calculated based on the standard deviation and combined with the historical data at the corresponding moment in the first time period.
[0019] Furthermore, after the calculation obtains the predicted value of CPU usage at the corresponding moment in the current time period, the following steps are further included:
[0020] Determine whether the CPU usage prediction value exceeds a preset value;
[0021] If so, the time corresponding to the CPU usage prediction value is determined, and the preset value is determined as the CPU usage prediction value at that time.
[0022] Furthermore, the obtaining of CPU usage historical data includes:
[0023] Determine a partition division rule for storing historical data, wherein the partition division is determined based on a database and table division strategy for storing historical data;
[0024] According to the partition division rule, historical data at each moment in the first time period and the second time period are extracted.
[0025] Further, the determining of the alarm level of each preset period according to the real data collected in the preset period and the prediction curve of the corresponding time period includes:
[0026] Determine the CPU usage prediction data at each collection moment according to the plurality of collection moments within the preset period and the prediction curve;
[0027] Determining the number of abnormal collection points within the preset period according to the real data and the predicted data;
[0028] When the number of abnormal collection points exceeds a preset number, the alarm level is determined according to the real data within the preset period.
[0029] Further, the alarm level includes the first level, the second level and the third level;
[0030] The determining of the alarm level according to the real data within the preset period includes:
[0031] Determine the number m of collection moments when the real data exceeds a first threshold and the number n of collection moments when the real data exceeds a second threshold, the first threshold being greater than the second threshold;
[0032] When m>x 1 , the alarm level is the first level;
[0033] When m = x 1 And n ≥ x 2 When, or m <x 1 And n ≥ x 3 , the alarm level is the second level;
[0034] When m = x 1 And n <x 2 When, or m <x 1 And n <x 3 When x 1 、x 2 and x 3 Preset thresholds for different alarm levels.
[0035] Further, the alarm level of each preset period is determined according to the real data collected in the preset period and the prediction curve of the corresponding time period, and then it also includes:
[0036] According to the alarm level of the server in the current preset period, determine the first alarm number of the same alarm level in the server within the first specified time period;
[0037] determining a plurality of second designated time periods corresponding to the first designated time period from the historical time periods;
[0038] According to the alarm level of the server in the current preset period and the first specified time period, determine the number of second alarms of the same alarm level in the server in each of the second specified time periods;
[0039] According to the first alarm number and the plurality of second alarm numbers, in combination with a preset rule, determining whether an alarm in a current preset period is an abnormal alarm;
[0040] If the alarm of the current preset period is an abnormal alarm, the alarm is cancelled.
[0041] Further, judging whether the alarm of the current preset period is an abnormal alarm according to the first alarm number and the plurality of second alarm numbers in combination with a preset rule includes:
[0042] According to the plurality of second alarm times, sequentially comparing the first alarm times and the second alarm times to obtain the number of abnormal time periods in the plurality of second specified time periods;
[0043] Calculate the abnormal proportion of the second specified time period according to the number of the abnormal time periods and the total number of the second specified time periods;
[0044] According to the abnormal proportion and the preset abnormal threshold, it is determined whether the alarm of the current preset period is an abnormal alarm.
[0045] Furthermore, the issuing of an alarm according to the alarm level includes:
[0046] Identify target monitoring applications;
[0047] Determine alarm strategies of different alarm levels according to the target monitoring application;
[0048] According to the alarm level, a corresponding alarm strategy is determined to implement an alarm for the target monitoring application.
[0049] Optionally, the alarm strategy includes at least one of the following: email alarm, SMS alarm, voice alarm, and developer alarm.
[0050] On the other hand, the present invention also provides a monitoring device based on a CPU dynamic threshold, the device comprising:
[0051] Historical data acquisition module, used to obtain CPU usage historical data;
[0052] A prediction curve determination module, used to determine a CPU usage prediction curve of the server in the current time period based on the historical data, wherein the prediction curve is fitted by the CPU usage prediction value at each collection moment in the current time period;
[0053] A real data collection module is used to obtain the real data of CPU usage in real time according to a preset period, where each preset period includes multiple collection moments;
[0054] An alarm level determination module, used to determine the alarm level of each preset period according to the real data collected in the preset period and the prediction curve of the corresponding time period;
[0055] The alarm module is used to issue an alarm according to the alarm level.
[0056] On the other hand, this document also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described above when executing the computer program.
[0057] Finally, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.
[0058] By adopting the above-mentioned technical scheme, a monitoring method, device, equipment and storage medium based on CPU dynamic threshold described in this article determine the prediction curve of the current time period through the historical data of server CPU usage, and then collect real data according to the preset period, and combine the prediction curve of the time period corresponding to the preset period to determine the alarm level of each preset period, thereby realizing different alarms for different abnormal situations. This article can dynamically determine the prediction data of the current time period through historical data, thereby improving the accuracy and timeliness of CPU usage monitoring.
[0059] In order to make the above and other purposes, features and advantages of this article more obvious and easy to understand, the following specifically cites preferred embodiments and describes them in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions in the embodiments of this article or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of this article. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0061] Figure 1 A schematic diagram of an implementation environment of the method provided in the embodiments of this article is shown;
[0062] Figure 2 A schematic diagram of the steps of a CPU dynamic threshold monitoring method provided in an embodiment of this invention is shown;
[0063] Figure 3 A schematic diagram of the steps for determining a CPU usage prediction curve in an embodiment of this invention is shown;
[0064] Figure 4 A schematic diagram of the steps for determining the alarm level in the embodiment of this article is shown;
[0065] Figure 5 A schematic diagram of abnormal alarm processing steps in the embodiment of this article is shown;
[0066] Figure 6 A schematic diagram of abnormal alarm determination steps in the embodiment of this article is shown;
[0067] Figure 7 A schematic diagram of the structure of a monitoring device based on a CPU dynamic threshold provided in an embodiment of this invention is shown;
[0068] Figure 8 A schematic diagram of the computer device structure provided in the embodiments of this article is shown.
[0069] Description of the accompanying symbols:
[0070] 10. Server;
[0071] 20. Database;
[0072] 30. Monitoring device;
[0073] 40. Operation and maintenance personnel;
[0074] 100. Historical data acquisition module;
[0075] 200. Prediction curve determination module;
[0076] 300. Real data collection module;
[0077] 400. Alarm level determination module;
[0078] 500, alarm module;
[0079] 802. Computer equipment;
[0080] 804, processor;
[0081] 806. Memory;
[0082] 808, driving mechanism;
[0083] 810, input / output module;
[0084] 812. Input device;
[0085] 814. Output device;
[0086] 816. Presentation equipment;
[0087] 818. Graphical user interface;
[0088] 820, network interface;
[0089] 822, communication link;
[0090] 824. Communication bus. DETAILED DESCRIPTION
[0091] The following will be combined with the drawings in the embodiments of this article to clearly and completely describe the technical solutions in the embodiments of this article. Obviously, the described embodiments are only part of the embodiments of this article, not all of the embodiments. Based on the embodiments of this article, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this article.
[0092] It should be noted that the terms "first", "second", etc. in the specification and claims of this article and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0093] In the prior art, monitoring of CPU usage in server operation and maintenance monitoring has become an increasingly important indicator. Monitoring alarms for CPU usage generally use thresholds set by operation and maintenance personnel based on their experience as the standard for alarm prompts. However, with the increase in open platform applications, the number of deployed servers is also increasing, making server monitoring more difficult and requiring higher accuracy. Therefore, the method of setting through experience cannot meet the monitoring requirements of the open platform, resulting in low alarm timeliness and accuracy.
[0094] In order to solve the above problems, the embodiments of this specification provide a monitoring method based on CPU dynamic threshold, which can improve the timeliness and accuracy of server CPU monitoring alarms. Figure 1As shown, it is a schematic diagram of the implementation environment of the method, which may include a server 10, a database 20, a monitoring device 30 and an operation and maintenance personnel 40, wherein the server 10 is a server to be monitored, and the corresponding functions of the front-end application are realized by interacting with the front-end application. The database 20 can receive and store the CPU working parameters of the server 10, such as the CPU usage rate. In actual work, the CPU usage rate can be collected according to the specified collection period and saved in the database 20. The monitoring device 30 can obtain the historical data of the CPU usage rate of the server 10 from the database 20, and determine the CPU usage rate prediction curve of the current time period (i.e., the time period to be predicted) according to the historical data, so as to obtain the prediction value of the corresponding moment of the current time period, and then the monitoring device 30 can also obtain the real value of the CPU usage rate at the current stage from the server 10 in real time. In this way, in combination with the preset period, the alarm level of each preset period is determined by comparing the real value and the predicted value, so as to realize targeted alarm. Finally, the operation and maintenance personnel 40 can make corresponding result methods according to different alarm prompts, thereby improving the efficiency of solving abnormal problems. This article can dynamically adjust the prediction threshold of CPU usage through historical data, improving the accuracy and timeliness of alarm monitoring.
[0095] The server 10 may be a server deployed in an open system, such as a server based on a distributed network. The realization of an application function at the front end may require the cooperation of multiple servers at the back end. In this way, it is necessary to monitor the performance status of each server, discover potential problems in time, and improve the stability and reliability of the operation of the open system.
[0096] In this embodiment, a monitoring method based on a CPU dynamic threshold is provided, which can improve the timeliness and accuracy of server alarm monitoring. Figure 2 This is a step diagram of a CPU dynamic threshold monitoring method provided in the embodiment of this article. This specification provides method operation steps as described in the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or device product is executed, it can be executed in the order of the method shown in the embodiment or the accompanying drawings or in parallel. Specifically, Figure 2 As shown, the method may include:
[0097] S101: Obtaining historical data of CPU usage;
[0098] S102: determining a CPU usage prediction curve of the server in the current time period according to the historical data, wherein the prediction curve is fitted by the CPU usage prediction values at each collection moment in the current time period;
[0099] S103: acquiring real data of CPU usage in real time according to a preset period, wherein each preset period includes a plurality of collection moments;
[0100] S104: determining the alarm level of each preset period according to the real data collected in the preset period and the prediction curve of the corresponding time period;
[0101] S105: Issue an alarm according to the alarm level.
[0102] It can be understood that the embodiments of this specification predict the reliability of subsequent data through the historical data of server CPU usage, thereby realizing dynamic monitoring of the working stability of the server. Specifically, the CPU usage prediction curve of the current time period is calculated through the historical data of CPU usage, and the prediction data of each collection moment in the current time period is obtained through the prediction curve. In combination with the real data actually collected, the real data and the predicted data are compared with each preset period (i.e., the collection period) as the alarm period, so as to determine the alarm identification and realize targeted abnormal warning. This article can realize the determination of the dynamic threshold of CPU usage, thereby realizing the timeliness and accuracy of the alarm.
[0103] The prediction curve can be understood as a fitting of the predicted CPU usage value at each collection moment in the current time period. For example, if the current time period is this week, the predicted data of all the collection moments of this week can be obtained in advance through the historical data of the previous week, thereby forming a prediction curve for this week. The collection moment can be determined according to the actual collection frequency, such as one collection point per minute, one collection point per five minutes, etc., which is not limited in the embodiments of this specification.
[0104] The preset period is a micro-time period composed of multiple continuous collection moments. Due to the continuity of business operation, the CPU usage rate generally changes continuously rather than suddenly. This can avoid alarming at a single collection moment, which causes false alarms or frequent alarms. Therefore, alarming at a single collection moment reduces the accuracy of the alarm. Taking multiple collection moments within a single preset period as a whole to issue an alarm can improve the effectiveness and reliability of the alarm. The preset period is set according to the actual situation, such as 10 minutes, 10 collection moments are set within 10 minutes, and the corresponding alarm level is determined at the 10th minute to issue an alarm. In some other embodiments, there may be other settings, which are not limited in the embodiments of this specification.
[0105] The prediction curve can be understood as the baseline of the CPU usage, that is, the actual data of the CPU usage in the current time period should be below the baseline. When the collected data at a certain collection moment exceeds the predicted data at that collection moment, it means that the CPU usage at that collection moment may be an abnormal value, that is, it can be processed as abnormal data.
[0106] In the embodiments of this specification, Figure 3 As shown, determining the CPU usage prediction curve of the server in the current time period based on the historical data includes:
[0107] S201: Acquire historical data of a first time period and a second time period, wherein the first time period is the previous historical time period of the time period corresponding to the preset period, and the second time period is multiple historical time periods of the time period corresponding to the preset period;
[0108] S202: Calculate and obtain a predicted value of CPU usage at each collection moment in the current time period according to the historical data of the first time period and the second time period;
[0109] S203: Determine the CPU usage prediction curve according to the CPU usage prediction value at each collection moment in the current time period.
[0110] It can be understood that, by predicting the data of the next time period through the recently generated historical data, the determination of the CPU dynamic threshold (i.e., the predicted data) can be achieved. For example, the data of this week (equivalent to the current time period) is predicted, and the first time period should be the historical data of the previous week, and the data of the corresponding time of last Monday (8:10 am last Monday) is predicted. The data of the corresponding time of this Monday (8:10 am this Monday) is predicted by the data of the corresponding time of last Monday (8:10 am last Monday). The second time period should be the historical data of the past weeks, such as the historical data of the past eight weeks. The historical data of 8:10 am last Monday and the historical data of 8:10 am last Monday are combined to predict the data of 8:10 am this Monday. In this way, the periodic law of business handling can be considered (equivalent to the periodic change of CPU usage), and the baseline of the CPU usage can be dynamically adjusted through the recently generated historical data, thereby improving the timeliness and reliability of alarm monitoring. In some other embodiments, the prediction can also be made in months or years, which is set according to the actual situation and is not limited in this specification.
[0111] For example, as mentioned above, if the prediction value is generated with a week as the calculation cycle, a prediction curve for a week can be generated. The prediction curve for each week can be divided into 7 sub-prediction curves with days as the unit, so that the prediction curve can be accurate to the day. When collecting data, one minute is a collection point, then there are 24*60=1440 collection points in a day. Based on the 1440 collection points, predictions are made to obtain a sub-prediction curve consisting of 1440 prediction values. Accordingly, there is a prediction curve formed by 7*1440 prediction values per week.
[0112] In a further embodiment, the step of calculating the predicted value of CPU usage at each collection moment in the current time period based on the historical data of the first time period and the second time period includes:
[0113] Calculate the standard deviation of the historical data at any corresponding moment in the second time period according to the historical data at the corresponding moment in the second time period;
[0114] The CPU usage prediction value at the corresponding moment in the current time period is calculated based on the standard deviation and combined with the historical data at the corresponding moment in the first time period.
[0115] The standard deviation can be understood as the theoretical maximum deviation value of the data at the corresponding moment. By combining the historical data at the corresponding moment in the first time period with the standard deviation, the upper limit value of the data at the corresponding moment can be obtained. This paper determines the predicted value of CPU usage at each collection moment based on the data distribution rule in the normal distribution principle. For example, in the normal distribution, 68.27% of the data is distributed in the range of (μ-δ, μ+δ), 95.44% of the data is distributed in the range of (μ-2δ, μ+2δ), and 99.73% of the data is distributed in the range of (μ-3δ, μ+3δ). Based on the above statistical model, (where μ represents the data at the same time point last week, and δ is the standard deviation of the data at the same time point in the past 8 weeks), the CPU usage baseline is dynamically calculated with the week as the dimension.
[0116] For example, for server A, the collection time is Tuesday of this week (2020-4-28, 11:00), and the upper limit of its baseline value is (3δ (i.e. the standard deviation of the data at 11:00 on the 8 Tuesdays before today) + the true value at 11:00 last Tuesday) as the predicted value at 11:00 on Tuesday of this week.
[0117] In some other embodiments, in order to improve the sensitivity of the entire monitoring device, a more conservative method can be used to calculate the baseline, such as using μ+2δ as the upper limit of the baseline value. This can improve the sensitivity of the monitoring device and issue an alarm at a higher actual value of the CPU usage, thereby ensuring that the server is always working in a good state.
[0118] It should be noted that the CPU usage prediction value can also be calculated in other ways, such as periodic prediction based on a neural network model. The data of the current time period can be predicted by the change pattern of historical data, so as to monitor the CPU usage. The specific setting method is not limited in the embodiments of this specification.
[0119] It should be noted again that, considering the different business distributions on weekdays, weekends, and holidays, the periodic regular changes in CPU usage may change with the changes in weekdays. In the embodiments of this specification, the holiday table can be set to eliminate holiday factors. If the historical value encountered in the baseline calculation belongs to a special holiday, the baseline calculation is performed by skipping the statutory holiday and moving forward one week. If a weekend make-up class is encountered, the baseline calculation is performed by moving forward three days and taking the working day as the baseline calculation.
[0120] Of course, there may be anomalies or normal high CPU usage in some historical data. In this case, the calculated CPU usage baseline (or predicted value) must also be a high value, so the alarm effect in monitoring is not very large. Therefore, after calculating the predicted CPU usage value at the corresponding moment in the current time period, the following is also included:
[0121] Determine whether the CPU usage prediction value exceeds a preset value;
[0122] If so, the time corresponding to the CPU usage prediction value is determined, and the preset value is determined as the CPU usage prediction value at that time.
[0123] Among them, the preset value can be the critical value of the CPU usage of the server. Exceeding the critical value indicates that the CPU load is too large and a certain load reduction process is required. As an option, the preset value can be 85%. By limiting the maximum value of the CPU usage baseline, the predicted value of the server at any collection time is within a healthy and reasonable level, which can improve the monitoring effect and reliability of the baseline.
[0124] In an open system, as more and more applications are used, more and more backend servers need to be deployed, so the amount of data collected and stored will also increase. For example, the open system has 452 applications and is equipped with 58,902 servers. According to the collection frequency, 1440*58902=84,818,880 data items will be generated every day, and 1440*58902*7=593,732,160 data items will be generated every week. Based on such a large amount of data, when calculating the weekly CPU usage baseline, the data extraction speed will also affect the operating efficiency of the entire monitoring device. Therefore, in the embodiments of this specification, the method of combining library and table division with partitioning can be used to improve data access efficiency. The source data is divided into libraries according to the OS type, the baseline data is divided into seven tables according to the days of the week, and each table is divided into 40 partitions based on the server IP address conversion as the base for calculation, so as to quickly extract the corresponding historical data according to the partitioning rules.
[0125] In actual work, you can set the baseline processing rules in advance and store the processed baseline in the corresponding location. When capturing the baseline according to the baseline processing principles, the efficiency is significantly improved, and the data capture time is in milliseconds. However, due to the large number of servers and nearly 60 million baseline data, the system processing time will greatly reduce the timeliness of the alarm. Therefore, you can also use multi-threaded concurrency to process the alarm data of each application, thereby improving the efficiency of data processing.
[0126] Therefore, as an option, the obtaining of CPU usage history data includes:
[0127] Determine a partition division rule for storing historical data, wherein the partition division is determined based on a database and table division strategy for storing historical data;
[0128] According to the partition division rule, historical data at each moment in the first time period and the second time period are extracted.
[0129] In some other embodiments, there may be other data storage and retrieval methods, which are not limited in the embodiments of this specification.
[0130] In a further embodiment, Figure 4 As shown, the alarm level of each preset period is determined according to the real data collected in the preset period and the prediction curve of the corresponding time period, including:
[0131] S301: Determine CPU usage prediction data at each collection moment according to a plurality of collection moments within the preset period and the prediction curve;
[0132] S302: Determine the number of abnormal collection points within the preset period according to the real data and the predicted data;
[0133] S303: When the number of abnormal collection points exceeds a preset number, an alarm level is determined according to real data within the preset period.
[0134] It can be understood that by setting a preset period as the alarm period, and determining the corresponding alarm level based on the abnormal situation of the real data within the preset period, the real value of each collection moment within the preset period is compared with the corresponding predicted value. When the real value and the predicted value meet the specified conditions, it indicates that the collection moment is an abnormal collection point. The collection moments are compared in turn to determine the number of abnormal collection points within the preset period. When the number of abnormal collection points exceeds the preset number, it indicates that the preset period is an abnormal period, and an alarm prompt can be issued. Then, in order to further improve the pertinence of the alarm, the alarm level can also be determined based on the real data corresponding to all the collection moments within the preset period. Therefore, on the basis of ensuring the timeliness of the alarm, different alarm methods can be selected according to the abnormal verification situation, thereby improving the efficiency and pertinence of subsequent processing.
[0135] In a further embodiment, the specified condition may be that if the actual value exceeds the predicted value, the corresponding collection moment is identified as an abnormal moment, which can improve the efficiency of abnormal moment judgment.
[0136] In some other embodiments, in order to improve the adaptability of the monitoring model, it is difficult to make effective judgments on data near the predicted value (for example, slightly higher or lower) by only using the real value and the predicted value for abnormal judgment, which instead forms a one-size-fits-all judgment result. Therefore, the specified conditions may also include:
[0137] 1) The true value exceeds the predicted value, that is, A>F, where A is the true value and F is the predicted value;
[0138] 2) The difference between the true value and the predicted value is greater than Y 1 , that is, AF>Y 1 , where Y 1 It can be 10%;
[0139] 3) The true value is greater than Y 2 , that is, A>Y 2 , where Y 2 It can be 30%;
[0140] Therefore, when the true value of the collection moment satisfies the above three conditions at the same time, it indicates that the collection moment is an abnormal moment, and then the total number of abnormal moments in a preset period can be judged. When the number of abnormal moments exceeds the preset number, the preset period can be determined to be an abnormal period, and an alarm can be issued. The preset number is set according to the actual situation. When there are 10 collection points in a preset period, the preset number can be 8. In some other embodiments, there may be other settings, which are not limited in the embodiments of this specification.
[0141] In the embodiment of this specification, the alarm level includes the first level, the second level and the third level;
[0142] The determining of the alarm level according to the real data within the preset period includes:
[0143] Determine the number m of collection moments when the real data exceeds a first threshold and the number n of collection moments when the real data exceeds a second threshold, the first threshold being greater than the second threshold;
[0144] When m>x 1 , the alarm level is the first level;
[0145] When m = x 1 And n ≥ x 2 When, or m <x 1 And n ≥ x 3 , the alarm level is the second level;
[0146] When m = x 1 And n <x 2 When, or m <x 1 And n <x 3 When x 1 、x 2 and x 3 Preset thresholds for different alarm levels.
[0147] Among them, the first threshold value can be the critical value of the server CPU usage under normal conditions, and the second threshold value is the ideal value of the server CPU usage under good conditions. The specific values of the first threshold value and the second threshold value are set according to actual conditions. The load state of the current server is determined by comparing the actual value at the collection time within a preset period with the first threshold value and the second threshold value respectively. When it is in a higher load state, a higher alarm level should be adopted so that the operation and maintenance personnel can adopt accurate processing strategies in time, thereby improving the efficiency and ability of exception processing on the basis of ensuring the timeliness of the alarm.
[0148] Exemplarily, the first level may be an ERROR level, the second level may be a WARNING level, the third level may be an INFO level, the first threshold is set to 85%, the second threshold is set to 50%, and different warning levels may be used in the following manner:
[0149] 1) If the true value exceeds 85% for 2 or more times, it is defined as ERROR level;
[0150] 2) If the true value exceeds 85% once and exceeds 50% twice or more, or if the true value does not exceed 85% and exceeds 50% four or more times, it is defined as WARNING level;
[0151] 3) If there is one true value exceeding 85% and less than two true values exceeding 50%, or no true value exceeding 85% and less than four true values exceeding 50%, it is defined as INFO level.
[0152] Of course, in some other embodiments, the CPU usage rate may be abnormally low. Although it will not affect the work of the server itself, it will indicate that the business being processed at this time is in an abnormal state, and an alarm may also be issued. Optionally, it may only be used as a lower level alarm. When judging this type of abnormality, the standard deviation of the actual data that exceeds the set minimum threshold can be calculated. If the standard deviation exceeds 6 (this value is the most suitable value obtained through multiple tests, and generally the data dispersion is already high when the standard deviation exceeds 2), it indicates that the actual data within the preset period is low and the dispersion is large (there are more mutation data), which is defined as the INFO level.
[0153] In actual implementation, you can also directly select specific alarm levels or all alarm levels to automatically forward to the monitoring system, so that you can realize real-time display of alarm levels on the monitoring platform. For example, you can send ERROR-level alarms to the centralized monitoring platform through the syslog upload module, so that operation and maintenance personnel can pay attention to the server usage status in real time.
[0154] In a further embodiment, at a specific time point, there may be concurrent running of applications, resulting in a higher CPU usage at that time point. Through the above judgment process, this time point may be an abnormal moment, but it is actually a normal CPU surge process. Therefore, it is also necessary to cancel the alarm at this moment to avoid false triggering, thereby improving the accuracy of alarm monitoring. As an option, Figure 5 As shown, the alarm level of each preset period is determined according to the real data collected in the preset period and the prediction curve of the corresponding time period, and then it also includes:
[0155] S401: Determine, according to the alarm level of the server in the current preset period, the first alarm number of the same alarm level in the server within a first specified time period;
[0156] S402: Determine a plurality of second designated time periods corresponding to the first designated time period from historical time periods;
[0157] S403: Determine the number of second alarms of the same alarm level in the server in each of the second specified time periods according to the alarm level of the server in the current preset period and the first specified time period;
[0158] S404: judging whether the alarm of the current preset period is an abnormal alarm according to the first alarm number and the plurality of second alarm numbers in combination with a preset rule;
[0159] S405: If the alarm of the current preset period is an abnormal alarm, cancel the alarm.
[0160] It can be understood that the first designated time period is a longer time period including the current preset cycle, which can improve the accuracy of judging non-abnormal surge situations. The first designated time period can be the sum of the same time periods before and after the current preset cycle. That is to say, the first designated time period includes multiple preset cycles. For example, for server A, the current preset cycle is Monday 8:00-8:10, and the alarm level is the second level. Then the first designated time period is Monday 7:00-9:10 this Monday, and a preset cycle is 10 minutes. The first designated time period has 13 preset cycles. The number of first alarms with an alarm level of the second level in the first designated time period is determined through historical alarm records.
[0161] Accordingly, the second designated time period can be understood as having the same corresponding preset period as the first designated time period, and the corresponding second alarm times in each second designated time period are counted to obtain multiple second alarm times. Taking one week as an example, the first designated time period is the 7:00-9:10 time period last Monday, and the second designated time period is the 7:00-9:10 time period every Monday of the previous 8 weeks, thereby obtaining 8 second alarm times. By comparing last week's data (first alarm times) with the historical data of the previous 8 weeks (second alarm times) in turn, it is determined whether the data of the corresponding preset period is a normal surge. That is, if the number of corresponding alarm levels per week is similar, it means that under the preset period, a surge will occur, and the surge amplitude is similar, which means that the preset period is a non-abnormal surge and the alarm can be canceled.
[0162] In a further embodiment, in order to accurately determine whether it is an abnormal alarm, such as Figure 6As shown, judging whether the alarm of the current preset period is an abnormal alarm according to the first alarm number and the plurality of second alarm numbers in combination with a preset rule includes:
[0163] S501: According to a plurality of the second alarm times, sequentially compare the first alarm times and the second alarm times to obtain the number of abnormal time periods in a plurality of the second specified time periods;
[0164] S502: Calculate the abnormal proportion of the second designated time period according to the number of the abnormal time periods and the total number of the second designated time periods;
[0165] S503: Determine whether the alarm of the current preset period is an abnormal alarm according to the abnormal proportion and the preset abnormal threshold.
[0166] It can be understood that, by comparing the first alarm number and the second alarm number, the part of the second specified period that is less different from the first specified period can be determined, so the number of abnormal time periods can be understood as the part that is less different from the first specified period (i.e., the alarm abnormal time period), and the abnormal time period can be determined in the following way:
[0167] Determining an alarm difference according to the first alarm number and the second alarm number;
[0168] If the alarm difference exceeds the preset difference threshold, it indicates that the second specified time period corresponding to the second alarm number is significantly different from the first specified time period, which is not a normal surge phenomenon;
[0169] If the alarm difference does not exceed the preset difference threshold, it indicates that the second specified time period corresponding to the second alarm number is similar to the first specified time period data and can be marked as an abnormal time period.
[0170] The above method can accurately determine the number of abnormal time periods, wherein the preset difference threshold can be set according to actual conditions. For example, when there are 13 preset cycles in the second specified time period, the preset difference threshold can be 3 or other values, which are not limited in the embodiments of this specification.
[0171] The preset abnormal threshold is also set according to actual conditions. For example, when 8 second specified time periods are selected, the preset abnormal threshold may be 3 / 8=0.375. In some other embodiments, there may be other settings, which are not limited in the embodiments of this specification.
[0172] For example, when determining the alarm level in the current preset period, when the alarm is not sent, determine the alarm level and the corresponding server of the current preset period (for example, ten minutes), set the count count, and take the alarm count of the same level of the server in the past two hours as t 1 , take the number of alarms of the same level on the server in the same week and time period in the past sixty days (8 weeks) as t 2 Put it into list list, loop list to get list data t 2 With t 1 Compare, if t 2 <=t 1 +3&&t 2 >=t 1 -3, count count+1, after the loop ends, take count / 8 to get yield. If yield is less than 0.375, the alarm will be canceled and only data will be stored.
[0173] The above steps can improve the ability to identify non-abnormal surges in CPU usage, thereby improving the monitoring capability of the monitoring device and further improving the accuracy of CPU usage monitoring.
[0174] In some other embodiments, the alarm blacklist can also be set directly from the perspective of the front-end application. For example, during operation, there are many alarms that do not require attention because some servers are involved in batch surges or application business adjustments. For this, a blacklist function is provided to manually block alarm time periods or alarm servers that do not require attention, thereby improving the adaptability of alarms.
[0175] In the embodiment of this specification, the step of issuing an alarm according to the alarm level includes:
[0176] Identify target monitoring applications;
[0177] Determine alarm strategies of different alarm levels according to the target monitoring application;
[0178] According to the alarm level, a corresponding alarm strategy is determined to implement an alarm for the target monitoring application.
[0179] It can be understood that the operation of the front-end application depends on the back-end server. An application can ensure the realization of its functions by deploying one or more back-end servers. Therefore, this article can also monitor the application operation status through the monitoring device. By determining the target monitoring application, and then determining the server under the target monitoring application, the CPU usage baseline (i.e., dynamic threshold) for the target monitoring application can be determined. According to the running time period of the target monitoring application, the alarm level of the server within the running time period is determined, and then different alarm strategies are determined according to different alarm levels, so that the application can be monitored in a targeted manner.
[0180] The alarm strategy includes at least one of the following: email alarm, SMS alarm, voice alarm, developer alarm. In actual implementation, the alarm can be issued in a single alarm mode or a combination of multiple alarm modes to achieve different alarm levels, thereby improving the efficiency of the alarm.
[0181] Furthermore, when the application requires support from multiple back-end servers, it means that multiple servers need to be monitored simultaneously. Therefore, different alarm strategies can be set according to different servers, so that the location of the abnormal server can be quickly determined, which is convenient for subsequent adjustments by operation and maintenance personnel. In some other embodiments, a unified alarm level can be determined based on the number of different alarm levels of different servers at the same time point, thereby implementing a single alarm strategy for a single application, such as selecting the alarm level with the largest number of occurrences as the alarm level at that time point, and then sending an alarm indication.
[0182] By implementing personalized monitoring of applications, we can effectively identify the usage of background parameters when the application is in use, and then optimize and adjust the application in a targeted manner, thereby improving the mutual adaptability of front-end applications and back-end servers and the efficiency of the entire system operation.
[0183] Based on the same inventive concept, the embodiment of this specification also provides a monitoring device based on CPU dynamic threshold, such as Figure 7 As shown, the device comprises:
[0184] The historical data acquisition module 100 is used to acquire the historical data of CPU usage;
[0185] A prediction curve determination module 200 is used to determine a CPU usage prediction curve of the server in the current time period based on the historical data, wherein the prediction curve is fitted by the CPU usage prediction values at each collection moment in the current time period;
[0186] The real data collection module 300 is used to obtain the real data of CPU usage in real time according to a preset period, wherein each preset period includes a plurality of collection moments;
[0187] The alarm level determination module 400 is used to determine the alarm level of each preset period according to the real data collected in the preset period and the prediction curve of the corresponding time period;
[0188] The alarm module 500 is used to issue an alarm according to the alarm level.
[0189] The beneficial effects obtained by the above-mentioned device are consistent with the beneficial effects obtained by the above-mentioned method, and will not be described in detail in the embodiments of this specification.
[0190] It should be noted that the monitoring method and device based on CPU dynamic threshold provided in the embodiments of this specification can be used in the server operation and maintenance scenarios in the financial field, and can also be used in any field other than the financial field. The application field of the monitoring method and device based on CPU dynamic threshold provided in the embodiments of this specification is not limited.
[0191] like Figure 8 As shown, a computer device provided in an embodiment of the present invention, the computer device 802 may include one or more processors 804, such as one or more central processing units (CPUs), and each processing unit may implement one or more hardware threads. The computer device 802 may also include any memory 806, which is used to store any kind of information such as code, settings, data, etc. Non-restrictive, for example, the memory 806 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent a fixed or removable component of the computer device 802. In one case, when the processor 804 executes an associated instruction stored in any memory or a combination of memories, the computer device 802 may perform any operation of the associated instruction. The computer device 802 also includes one or more drive mechanisms 808 for interacting with any memory, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.
[0192] The computer device 802 may also include an input / output module 810 (I / O) for receiving various inputs (via input devices 812) and for providing various outputs (via output devices 814). A specific output mechanism may include a presentation device 816 and an associated graphical user interface (GUI) 818. In other embodiments, the input / output module 810 (I / O), the input device 812, and the output device 814 may not be included, and the computer device 802 may be used as a computer device in a network. The computer device 802 may also include one or more network interfaces 820 for exchanging data with other devices via one or more communication links 822. One or more communication buses 824 couple the components described above together.
[0193] The communication link 822 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 822 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.
[0194] Corresponds to Figure 2-Figure 6 The method in this article also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are executed.
[0195] The embodiment of the present invention also provides a computer readable instruction, wherein when the processor executes the instruction, the program therein causes the processor to execute the following Figures 2 to 6 The method shown.
[0196] It should be understood that in the various embodiments of this document, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.
[0197] It should also be understood that in the embodiments of this article, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0198] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this article.
[0199] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0200] In the several embodiments provided herein, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other forms of connection.
[0201] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this article.
[0202] In addition, each functional unit in each embodiment of this invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
[0203] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this article is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this article. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0204] Specific embodiments are used in this article to illustrate the principles and implementation methods of this article. The description of the above embodiments is only used to help understand the methods and core ideas of this article. At the same time, for general technicians in this field, according to the ideas of this article, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on this article.
Claims
1. A monitoring method based on CPU dynamic threshold, characterized in that: The method includes: Obtaining historical CPU usage data; According to the historical data, determining a predicted CPU usage curve for the server in the current time period, where the predicted curve is fitted by predicted CPU usage values at each collection moment within the current time period; Obtaining real-time CPU usage real data at a preset period, where each preset period includes multiple collection moments; According to the real data collected in the preset period and the predicted curve for the corresponding time period, determining the alarm level for each preset period; Issuing an alarm according to the alarm level; Wherein determining the predicted CPU usage curve for the server in the current time period according to the historical data includes: Obtaining historical data for the first time period and the second time period, where the first time period is the previous historical time period corresponding to the preset period, and the second time period is multiple historical time periods corresponding to the preset period; Calculating predicted CPU usage values at each collection moment within the current time period according to the historical data of the first time period and the second time period; Determining the predicted CPU usage curve according to the predicted CPU usage values at each collection moment within the current time period; Determining the alarm level for each preset period according to the real data collected in the preset period and the predicted curve for the corresponding time period includes: Determining predicted CPU usage data at each collection moment according to the multiple collection moments within the preset period and the predicted curve; Determining the number of abnormal collection points within the preset period according to the real data and the predicted data; When the number of abnormal collection points exceeds a preset number, determining the alarm level according to the real data within the preset period; wherein the alarm level includes a first level, a second level, and a third level; Determining the alarm level according to the real data within the preset period includes: Determining the number m of collection moments when the real data exceeds a first threshold and the number n of collection moments when the real data exceeds a second threshold, where the first threshold is greater than the second threshold; When m > x1, the alarm level is the first level; When m = x1 and n ≥ x2, or m < x1 and n ≥ x3, the alarm level is the second level; When m = x1 and n < x2, or m < x1 and n < x3, the alarm level is the third level, where x1, x2, and x3 are preset threshold values for different alarm levels; Issuing an alarm according to the alarm level includes: Determining the target monitoring application; According to the target monitoring application, determining alarm strategies for different alarm levels; According to the alarm level, determining the corresponding alarm strategy to implement an alarm for the target monitoring application.
2. The method according to claim 1, characterized in that: Calculating predicted CPU usage values at each collection moment within the current time period according to the historical data of the first time period and the second time period includes: Calculating the standard deviation of the historical data at the corresponding moment within the second time period according to the historical data at any corresponding moment within the second time period; The CPU usage prediction value at the corresponding moment in the current time period is calculated based on the standard deviation and combined with the historical data at the corresponding moment in the first time period.
3. The method according to claim 2, characterized in that After the calculation obtains the predicted value of CPU usage at the corresponding moment in the current time period, the method further includes: Determine whether the CPU usage prediction value exceeds a preset value; If so, the time corresponding to the CPU usage prediction value is determined, and the preset value is determined as the CPU usage prediction value at that time.
4. The method according to claim 1, characterized in that: The obtaining of CPU usage history data includes: Determine a partition division rule for storing historical data, wherein the partition division is determined based on a database and table division strategy for storing historical data; According to the partition division rule, historical data at each moment in the first time period and the second time period are extracted.
5. The method according to claim 1, characterized in that The method further comprises: determining the alarm level of each preset period according to the real data collected in the preset period and the prediction curve in the corresponding time period; and then: According to the alarm level of the server in the current preset period, determine the first alarm number of the same alarm level in the server within the first specified time period; determining a plurality of second designated time periods corresponding to the first designated time period from the historical time periods; According to the alarm level of the server in the current preset period and the first specified time period, determine the number of second alarms of the same alarm level in the server in each of the second specified time periods; According to the first alarm number and the plurality of second alarm numbers, in combination with a preset rule, determining whether an alarm in a current preset period is an abnormal alarm; If the alarm of the current preset period is an abnormal alarm, the alarm is cancelled.
6. The method according to claim 5, characterized in that The determining, based on the first alarm number and the plurality of second alarm numbers and in combination with a preset rule, whether an alarm in a current preset period is an abnormal alarm includes: According to the plurality of second alarm times, sequentially comparing the first alarm times and the second alarm times to obtain the number of abnormal time periods in the plurality of second specified time periods; Calculate the abnormal proportion of the second specified time period according to the number of the abnormal time periods and the total number of the second specified time periods; According to the abnormal proportion and the preset abnormal threshold, it is determined whether the alarm of the current preset period is an abnormal alarm.
7. The method according to claim 1, characterized in that The alarm strategy includes at least one of the following: email alarm, SMS alarm, voice alarm, and developer alarm.
8. A monitoring device based on CPU dynamic threshold, characterized in that: The device comprises: Historical data acquisition module, used to obtain CPU usage historical data; A prediction curve determination module, used to determine a CPU usage prediction curve of the server in the current time period based on the historical data, wherein the prediction curve is fitted by the CPU usage prediction value at each collection moment in the current time period; A real data collection module is used to obtain the real data of CPU usage in real time according to a preset period, where each preset period includes multiple collection moments; An alarm level determination module, used to determine the alarm level of each preset period according to the real data collected in the preset period and the prediction curve of the corresponding time period; An alarm module, used for issuing an alarm according to the alarm level; Among them, determining the CPU usage prediction curve of the server in the current time period according to the historical data includes: Obtaining the historical data of the first time period and the second time period, where the first time period is the previous historical time period corresponding to the corresponding time period of the preset cycle, and the second time period is multiple historical time periods corresponding to the corresponding time period of the preset cycle; Calculating the predicted CPU usage value at each collection moment in the current time period according to the historical data of the first time period and the second time period; Determining the CPU usage prediction curve according to the predicted CPU usage value at each collection moment in the current time period; Determining the alarm level of each preset cycle according to the real data collected according to the preset cycle and the prediction curve of the corresponding time period, including: Determining the predicted CPU usage data at each collection moment according to the multiple collection moments within the preset cycle and the prediction curve; Determining the number of abnormal collection points within the preset cycle according to the real data and the predicted data; When the number of abnormal collection points exceeds the preset number, the alarm level is determined according to the real data within the preset cycle; where the alarm level includes the first level, the second level, and the third level; Determining the alarm level according to the real data within the preset cycle includes: Determining the number of collection moments m when the real data exceeds the first threshold and the number of collection moments n when the real data exceeds the second threshold, where the first threshold is greater than the second threshold; When m > x1, the alarm level is the first level; When m = x1 and n ≥ x2, or m < x1 and n ≥ x3, the alarm level is the second level; When m = x1 and n < x2, or m < x1 and n < x3, the alarm level is the third level, where x1, x2, and x3 are preset threshold values for different alarm levels; Issuing an alarm according to the alarm level includes: Determining the target monitoring application; Determining the alarm strategies for different alarm levels according to the target monitoring application; Determining the corresponding alarm strategy according to the alarm level to implement the alarm for the target monitoring application.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the method described in any one of claims 1 to 7 is implemented.
