Cloud host monitoring method, device, equipment and medium
Through custom acquisition strategies and SNMP protocol, automated cloud host monitoring is realized, solving the problems of inefficient monitoring efficiency and insufficient data accuracy in the existing technology, and improving the flexibility and accuracy of monitoring.
Patent Information
- Application Number
- CN202510186648.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-05-27
AI Technical Summary
The existing cloud host monitoring methods are inefficient, difficult to achieve automated operation and maintenance and personalized monitoring requirements, and insufficient data accuracy.
By receiving monitoring instructions, we determine the custom acquisition strategy and target cloud host, establish communication connections using Simple Network Management Protocol (SNMP), generate acquisition tasks and assign them to load balancing nodes, perform acquisition tasks and store performance indicator data, use custom analysis algorithms for statistical analysis, and generate monitoring reports.
It realizes automated cloud host monitoring, improves data accuracy and monitoring flexibility, reduces manual intervention, and meets personalized monitoring needs.
Smart Images

Figure CN120045433A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cloud computing, and particularly to a cloud host monitoring method, device, equipment and medium. Background Art
[0002] With the popularization of cloud computing technology, Linux (a computer operating system) cloud hosts in private cloud environments are increasingly widely used in enterprises. Among them, monitoring the performance metrics of cloud hosts is of great significance for ensuring service quality and system stability. However, existing monitoring methods often require installing complex monitoring software or writing a large number of scripts, making it difficult to perform batch management and automated operation and maintenance. Moreover, complex manual operations are required during monitoring, which may result in data errors caused by manual operations or different collection tools, leading to low monitoring efficiency. At the same time, since the monitoring operations are implemented through monitoring software or scripts, if new monitoring policies need to be added, a relatively long waiting period is required, and the flexibility is low, making it difficult to meet personalized monitoring requirements.
[0003] In summary, how to achieve automated cloud host monitoring and improve the accuracy of data to solve the problems of low cloud host monitoring efficiency and difficulty in meeting personalized monitoring requirements is an urgent problem to be solved at present. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a cloud host monitoring method, device, equipment and medium, which can achieve automated cloud host monitoring and improve the accuracy of data to solve the problems of low cloud host monitoring efficiency and difficulty in meeting personalized monitoring requirements. The specific solutions are as follows:
[0005] In a first aspect, the present application provides a cloud host monitoring method, including:
[0006] Determining a corresponding custom collection policy and a target cloud host based on a received monitoring instruction, and establishing a communication connection with the target cloud host through the Simple Network Management Protocol;
[0007] Generating a corresponding collection task according to the custom collection policy, and allocating the collection task to a load balancing node to execute the collection task through the load balancing node based on a preset task scheduling method, and storing the performance metric data collected from the target cloud host in a database;
[0008] Extracting target metric data to be analyzed from the database, and statistically analyzing the target metric data using a custom analysis algorithm to generate a corresponding cloud host monitoring report based on the obtained analysis result and a custom report template.
[0009] Optionally, the establishing a communication connection with the target cloud host through the Simple Network Management Protocol includes:
[0010] Detect whether the protocol service of the Simple Network Management Protocol has been installed in the target cloud host to obtain a corresponding detection result;
[0011] If the detection result indicates that the protocol service has been installed, establish a communication connection with the target cloud host through the Simple Network Management Protocol;
[0012] If the detection result indicates that the protocol service has not been installed, perform corresponding feedback notification for the detection result, so as to install the protocol service in the target cloud host based on the received service installation instruction, and configure the protocol service to establish a communication connection with the target cloud host through the Simple Network Management Protocol.
[0013] Optionally, in the process of executing the collection task by the load balancing node, it includes:
[0014] When it is detected that any node in the load balancing node fails, re - allocate the target collection task on the failed balancing node, so as to execute the target collection task through the target balancing node; the target balancing node is the non - failed node in the load balancing node except the failed balancing node and is assigned the target collection task.
[0015] Optionally, in the process of executing the collection task by the load balancing node, it further includes:
[0016] Determine the task to be paused in the collection task based on the received task pause instruction, and pause the execution of the task to be paused;
[0017] Or, determine the task to be resumed in the collection task based on the received task resume instruction, and resume the execution of the task to be resumed;
[0018] Or, determine the task to be scheduled in the collection task based on the received task scheduling instruction, and reschedule the task to be scheduled.
[0019] Optionally, storing the performance metric data collected from the target cloud host into the database includes:
[0020] Compress and deduplicate the performance metric data collected from the target cloud host to obtain processed data;
[0021] Fragment the processed data, and store the fragmented processed data into the database based on the data cold - hot separation technology.
[0022] Optionally, using the custom analysis algorithm to perform statistical analysis on the target metric data includes:
[0023] Clean and standardize the target metric data, and use a preset data mining technique to mine the processed target data to extract key information from the processed target data;
[0024] Perform statistical analysis on the processed target data based on the key information and a custom analysis algorithm, and determine whether the processed target data exceeds a preset alarm threshold according to the obtained analysis result;
[0025] If the processed target data exceeds the preset alarm threshold, trigger an alarm operation for the target cloud host.
[0026] Optionally, after generating a corresponding cloud host monitoring report based on the obtained analysis result and a custom report template, it further includes:
[0027] Determine the monitoring metrics corresponding to the cloud host monitoring report based on a preset refresh frequency, and use the custom collection strategy to collect new data related to the monitoring metrics from the target cloud host to update the database based on the new data to obtain an updated database;
[0028] Extract the data to be analyzed related to the monitoring metrics from the updated database, and use a custom analysis algorithm to perform statistical analysis on the data to be analyzed to update the cloud host monitoring report based on the obtained analysis result.
[0029] In a second aspect, the present application provides a cloud host monitoring device, including:
[0030] A communication establishment module, configured to determine a corresponding custom collection strategy and a target cloud host based on a received monitoring instruction, and establish a communication connection with the target cloud host through the Simple Network Management Protocol;
[0031] A task allocation module, configured to generate a corresponding collection task according to the custom collection strategy, and allocate the collection task to a load balancing node, so as to execute the collection task through the load balancing node based on a preset task scheduling method, and store the performance metric data collected from the target cloud host in a database;
[0032] A statistical analysis module, configured to extract target metric data to be analyzed from the database, and use a custom analysis algorithm to perform statistical analysis on the target metric data, so as to generate a corresponding cloud host monitoring report based on the obtained analysis result and a custom report template.
[0033] In a third aspect, the present application provides an electronic device, including:
[0034] A memory for storing a computer program;
[0035] A processor for executing the computer program to implement the foregoing cloud host monitoring method.
[0036] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the foregoing cloud host monitoring method is implemented.
[0037] In this embodiment, a corresponding custom collection policy and a target cloud host are determined based on the received monitoring instruction, and a communication connection is established with the target cloud host through the Simple Network Management Protocol; a corresponding collection task is generated according to the custom collection policy, and the collection task is assigned to a load balancing node to execute the collection task through the load balancing node based on a preset task scheduling method, and the performance index data collected from the target cloud host is stored in a database; target index data to be analyzed is extracted from the database, and the target index data is statistically analyzed using a custom analysis algorithm, so as to generate a corresponding cloud host monitoring report based on the obtained analysis result and a custom report template. As can be seen from the above, the present application first determines a corresponding custom collection policy and a target cloud host based on the received monitoring instruction, establishes a communication connection with the target cloud host through the Simple Network Management Protocol, generates a collection task according to the custom collection policy, and assigns the collection task to a load balancing node to execute the collection task through the load balancing node based on a preset task scheduling method, and stores the collected performance index data in a database, so as to extract target index data from the database and statistically analyze the target index data using a custom analysis algorithm, so as to generate a corresponding cloud host monitoring report based on the obtained analysis result and a custom report template. In this way, through the above process of the present application, custom collection policies and custom analysis algorithms are supported, the flexibility of cloud host monitoring is improved, the performance index data of the target cloud host is collected through the Simple Network Management Protocol, the accuracy of the data is improved, and the overall cloud host monitoring process only requires the user to initiate a monitoring instruction, reducing the process of manual intervention, thereby realizing automated cloud host monitoring and improving the accuracy of the data to solve the problems of low efficiency of cloud host monitoring and difficulty in meeting personalized monitoring requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to the provided drawings.
[0039] Figure 1 Flowchart of a cloud host monitoring method disclosed in this application;
[0040] Figure 2 Schematic diagram of the architecture of a cloud host monitoring method disclosed in this application;
[0041] Figure 3 Schematic diagram of the structural flow of a cloud host monitoring method disclosed in this application;
[0042] Figure 4 Schematic diagram of the structure of a cloud host monitoring device disclosed in this application;
[0043] Figure 5 Structural diagram of an electronic device disclosed in this application. Specific implementation manners
[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0045] Monitoring the performance indicators of cloud hosts is of great significance for ensuring service quality and system stability. However, existing monitoring methods often require installing complex monitoring software or writing a large number of scripts, which are difficult to manage in batches and perform automated operation and maintenance. Moreover, complex manual operations are required during monitoring, and there may be data errors caused by manual operations or different collection tools, resulting in low monitoring efficiency. At the same time, since the monitoring operations are implemented through monitoring software or scripts, if new monitoring policies need to be added, the waiting period is relatively long, the flexibility is low, and it is difficult to meet personalized monitoring requirements.
[0046] To overcome the above technical problems, this application provides a cloud host monitoring method to achieve automated cloud host monitoring and improve the accuracy of data, so as to solve the problems of low cloud host monitoring efficiency and difficulty in meeting personalized monitoring requirements.
[0047] See Figure 1 As shown, the embodiments of the present invention disclose a cloud host monitoring method, including:
[0048] Step S11: Determine the corresponding custom collection policy and the target cloud host based on the received monitoring instruction, and establish a communication connection with the target cloud host through the Simple Network Management Protocol.
[0049] In this embodiment, after receiving the monitoring instruction, determine the corresponding custom collection policy and the target cloud host to be monitored according to the monitoring instruction, and establish a communication connection with the target cloud host through the Simple Network Management Protocol (i.e., Simple Network Management Protocol, SNMP). Among them, the monitoring instruction is an instruction initiated by the user based on their own cloud host monitoring requirements, including the custom collection policy configured by the user, the specified target cloud host to be monitored, etc.; the target cloud host can be a Linux (a computer operating system) cloud host in various scale cloud computing environments such as public cloud, private cloud, and hybrid cloud architectures; the custom collection policy includes the configured collection frequency, collection metrics, etc.
[0050] It should be noted that since the cloud host monitoring method of this application collects performance metrics of the target cloud host through the SNMP protocol, it is necessary to install the SNMP service in the target cloud host. That is, in this embodiment, the step of establishing a communication connection with the target cloud host through the Simple Network Management Protocol also needs to determine whether the SNMP service is installed on the target cloud host. The processing flow is as follows: Detect whether the protocol service of the Simple Network Management Protocol has been installed in the target cloud host to obtain a corresponding detection result; if the detection result indicates that the protocol service has been installed, establish a communication connection with the target cloud host through the Simple Network Management Protocol; if the detection result indicates that the protocol service has not been installed, make a corresponding feedback notification for the detection result, so as to install the protocol service in the target cloud host based on the received service installation instruction and configure the protocol service to establish a communication connection with the target cloud host through the Simple Network Management Protocol. Among them, the step of configuring the protocol service includes but is not limited to setting the community name, access control, alarm reception, etc. That is, detect the target cloud host to determine whether the protocol service of SNMP has been installed in the target cloud host, and establish a communication connection with the target cloud host through SNMP after determining that the protocol service has been installed. After determining that the protocol service has not been installed, make a corresponding feedback notification for the detection result to inform the user of the current situation and remind the user that the SNMP service needs to be installed to receive the service installation instruction initiated by the user. Install the protocol service in the target cloud host based on the service installation instruction, configure the protocol service, create an SNMP MIB library (i.e., Management Information Base), define the metrics to be collected, and establish a communication connection with the target cloud host to collect performance metric data of the target cloud host and realize cloud host monitoring.
[0051] It should be noted that, as Figure 2 shown in the schematic diagram of the architecture of a cloud host monitoring method provided by this application, as Figure 3The following is a schematic structural flowchart of a cloud host monitoring method provided by this application. That is to say, the cloud host monitoring method of this application mainly includes three parts: a management service, an SNMP collector, and data storage. Among them, the management service part is mainly used to maintain modules such as a distributed scheduling engine, a report engine, an algorithm engine, as well as metric definition, task management, data storage, and data analysis; the SNMP collector part is mainly used to report data through the distributed task scheduling engine in the management service and collect performance metric data in the cloud host; the data storage part is mainly used to save the performance metric data collected from the target cloud host. It should be noted that, in order to achieve load balancing and horizontal expansion of data collection, in this embodiment, the SNMP collector part is deployed on multiple load balancing nodes to serve as proxy nodes for collection. In addition, this embodiment also supports multiple versions such as SNMP v1, v2c, and v3 to adapt to different security requirements. It should be further noted that the collection metrics in the metric definition include resource metrics and performance metrics. Among them, the resource metrics include, but are not limited to, device ip (i.e., Intellectual Property, Internet Protocol), device name, cpu (i.e., Central Processing Unit) core count, total memory (GB), hard disk capacity (GB), number of ports, etc., and the performance metrics include, but are not limited to, cpu usage rate, available memory size (M), memory usage rate (%), total memory space (M), available memory (M), memory usage rate (%), total disk size (M), available disk size (M), disk usage rate (%), management status, total traffic (Mb), total received traffic (Mb), total sent traffic (Mb), number of received packets per second (packets / s), received traffic (Kbit / s), received packet error rate (%), received packet loss rate (%), sent packet error rate (%), sent packet loss rate (%), number of sent packets per second (packets / s), sent traffic (Kbit / s), broadcast packets (packets / second), status, process memory occupancy (Mb), cpu core count (number), number of disks, number of currently running processes, CLOSE_WAIT (a connection state of a protocol) (number), number of network cards (number), number of disks (number), ESTABLISHED (a connection state of a protocol) (number), LISTENING (a connection state of a protocol) (number), SYN_SENT (a connection state of a protocol) (number), TIME_WAIT (a connection state of a protocol) (number), etc.In this way, this embodiment automatically detects whether the SNMP service is installed in the target cloud host, and gives corresponding feedback prompts to the user in time after detecting that it is not installed, improving the efficiency of cloud host monitoring; at the same time, the collector part is deployed in the load balancing node, realizing the horizontal expansion of load balancing and data collection; supporting multiple SNMP versions and being able to adapt to different security requirements.
[0052] Step S12: Generate corresponding collection tasks according to the custom collection policy, and allocate the collection tasks to the load balancing nodes, so as to execute the collection tasks through the load balancing nodes based on a preset task scheduling method, and store the performance index data collected from the target cloud host into the database.
[0053] In this embodiment, first generate corresponding collection tasks according to the custom collection policy, and allocate the collection tasks to the load balancing nodes, so as to execute the collection tasks through the load balancing nodes based on a preset task scheduling method, and store the performance index data collected from the target cloud host into the database. Among them, the task scheduling method includes but is not limited to polling, concurrency, asynchronous and other scheduling methods, which can be determined by the monitoring instruction initiated by the user, that is, the method selected by the user according to the monitoring requirements when initiating the monitoring instruction; the database includes but is not limited to databases such as MySQL (a relational database management system) and MongoDB (a document database management system).
[0054] It should be noted that in this embodiment, multi-threaded technology is adopted for concurrent acquisition to improve the acquisition efficiency. That is, acquisition tasks are generated according to the custom acquisition strategy set by the user and stored in the form of a list, so as to execute the acquisition tasks in the form of the task scheduling method according to the list for the acquisition of performance index data. It can be understood that, in order to ensure the reliability of data acquisition, this embodiment can add a failure retry mechanism to continuously monitor the execution status of the task and provide real-time feedback on the task progress, so as to perform retry operations in a timely manner when it is monitored that the acquisition task fails to execute or there are problems with data acquisition. In addition, this embodiment also supports the automatic failover function of the acquisition agent, and its processing flow is as follows: when any node in the load balancing node is detected to fail, the target acquisition task on the failed balancing node is reallocated so that the target acquisition task is executed through the target balancing node; the target balancing node is an unfailed node in the load balancing node that is assigned the target acquisition task except the failed balancing node. That is, continuously monitor the status of the load balancing node. When a failed balancing node appears in the load balancing node, reallocate the target acquisition task on the failed balancing node so that the target acquisition task is executed through the unfailed node assigned the target acquisition task, ensuring that other nodes can automatically take over the target acquisition task and improving the execution efficiency of the acquisition task. It should be further noted that this embodiment also supports the manual pause, resume, and rescheduling of acquisition tasks, and its processing flow is as follows: determine the task to be paused in the acquisition task based on the received task pause instruction and pause the execution of the task to be paused; or, determine the task to be resumed in the acquisition task based on the received task resume instruction and resume the execution of the task to be resumed; or, determine the task to be scheduled in the acquisition task based on the received task scheduling instruction and reschedule the task to be scheduled. That is, when the user needs to specify that a certain acquisition task in the acquisition task list is paused, a task pause instruction will be initiated through a preset interface. After receiving the task pause instruction, this embodiment will determine the task to be paused that the user needs to pause through the task pause instruction and pause the task to be paused; when the user needs to specify that a certain paused or suspended acquisition task is to resume execution, a task resume instruction will be initiated through the preset interface. After receiving the task resume instruction, this embodiment will determine the task to be resumed that the user needs to resume and resume the execution of the task to be resumed; when the user needs to specify that a certain acquisition task is to be rescheduled, a task scheduling instruction will be initiated through the preset interface. After receiving the task scheduling instruction, this embodiment will determine the task to be scheduled and reschedule the task to be scheduled.By supporting the functions of manually pausing, resuming, and rescheduling the collection tasks, it is possible to ensure that users can control the collection tasks in the collection task list according to their own needs during the execution of the collection tasks, thereby improving the flexibility of the cloud host monitoring process.
[0055] It should be noted that the processing flow of storing the performance index data collected from the target cloud host into the database is as follows: compress and deduplicate the performance index data collected from the target cloud host to obtain processed data; fragment the processed data, and store the fragmented processed data into the database based on the data cold and hot separation technology. That is, after collecting the performance index data from the target cloud host, first compress and deduplicate the performance index data to obtain processed data, optimize the utilization rate of the storage space, ensure the data transmission efficiency, and then fragment the processed data. Store the frequently accessed fragmented data on high-speed storage devices, and migrate the infrequently accessed fragmented data to low-cost storage devices to achieve data cold and hot separation. In addition, in this embodiment, the performance index data can also be encrypted before being stored in the database to ensure data security, and a reasonable database table structure can be designed for the database to provide a data query interface for subsequent data query and analysis; at the same time, in addition to being able to perform fragmentation processing on data, data replica sets can also be supported to improve the availability and reliability of data storage. It can be understood that, in order to avoid data loss caused by reasons such as system instability, this embodiment can regularly back up the performance index data in the database and provide a corresponding data recovery function to ensure data integrity. In this way, when this embodiment detects the failure of an agent node, it automatically assigns its tasks to other nodes without manual intervention, improving the execution efficiency of the collection tasks; supporting the functions of manually pausing, resuming, and rescheduling the collection tasks can ensure that users can control the collection tasks in the collection task list according to their own needs during the execution of the collection tasks, improving the flexibility of the cloud host monitoring process; regularly backing up the performance index data in the database and providing a corresponding data recovery function to ensure data integrity and avoid data loss caused by reasons such as system instability.
[0056] Step S13: Extract the target index data to be analyzed from the database, and use a custom analysis algorithm to statistically analyze the target index data, so as to generate a corresponding cloud host monitoring report based on the obtained analysis results and the custom report template.
[0057] In this embodiment, target metric data to be analyzed is extracted from the database, and a custom analysis algorithm is used to perform statistical analysis on the target metric data, so as to generate a corresponding cloud host monitoring report based on the obtained analysis results and a custom report template. Among them, the target metric data can be determined through the monitoring instruction; the output formats of the cloud host monitoring report include but are not limited to PDF (i.e., Portable Document Format), Excel (a spreadsheet format), HTML (i.e., HyperText Markup Language), etc.; the custom analysis algorithm can be a big data analysis technology, which includes a variety of statistical analysis methods, including but not limited to average value, maximum value, minimum value, trend analysis, etc. The following Table 1 shows a formula display table of a custom analysis algorithm provided by this application.
[0058] Table 1
[0059]
[0060] It should be noted that the processing flow of using the custom analysis algorithm to perform statistical analysis on the target metric data is as follows: cleaning and standardizing the target metric data, and using a preset data mining technology to mine the processed target data to extract key information in the processed target data; performing statistical analysis on the processed target data based on the key information and the custom analysis algorithm, and determining whether the processed target data exceeds a preset alarm threshold according to the obtained analysis results; if the processed target data exceeds the preset alarm threshold, an alarm operation for the target cloud host is triggered. That is, cleaning and standardizing the target metric data to be analyzed, such as removing invalid data, filling in missing values, and standardizing the data format, and using a preset data mining technology to mine the processed target data to extract valuable information from the massive performance metric data, that is, the key information therein, and performing statistical analysis on the processed target data based on the key information and the custom analysis algorithm, and determining whether the processed target data exceeds the preset alarm threshold according to the obtained analysis results. When it exceeds the preset alarm threshold, it indicates a performance anomaly, and an alarm operation for the target cloud host is triggered. It should be further noted that the custom analysis algorithm is saved in a plug-in form, and users can add and modify the custom analysis algorithm according to their own needs, and at the same time support complex data calculations, including but not limited to aggregation functions, conditional expressions, etc.
[0061] It should be noted that this embodiment supports users to customize the format and content of the custom report template, provides multiple preset report templates, and users can select indicators, layouts, and chart types through drag-and-drop operations to edit and design the selected template. At the same time, in order to reduce manual intervention and improve the report generation efficiency, this embodiment can generate the cloud host monitoring report in batches and distribute it automatically. In addition, before generating the cloud host monitoring report, this embodiment also needs to convert the target indicator data into the format required for the cloud host monitoring report, including but not limited to percentages, averages, etc. It can be understood that in order to meet the cloud host monitoring needs of users to a greater extent, this embodiment also supports the generation of real-time reports and scheduled reports. Among them, if the generated report is a real-time report, the subsequent processing flow is as follows: Determine the monitoring indicators corresponding to the cloud host monitoring report based on a preset refresh frequency, and use the custom collection strategy to collect new data related to the monitoring indicators from the target cloud host to update the database based on the new data, obtaining an updated database; Extract the data to be analyzed related to the monitoring indicators from the updated database, and use a custom analysis algorithm to perform statistical analysis on the data to be analyzed, and update the cloud host monitoring report based on the obtained analysis results. Among them, the preset refresh frequency can be the report refresh frequency defined by the user when initiating the monitoring instruction. That is, determine the monitoring indicators corresponding to the cloud host monitoring report based on a preset refresh frequency, and use the custom collection strategy to collect new data related to the monitoring indicators in the target cloud host to update the database, obtaining an updated database, so as to extract the data to be analyzed from the updated database, and use a custom analysis algorithm to perform statistical analysis on the data to be analyzed, and update the cloud host monitoring report based on the obtained analysis results to realize the maintenance of the real-time report. In addition, in order to reduce the repeated query operations on the target cloud host and reduce the running load, this embodiment can provide a report storage service, that is, save the generated cloud host monitoring report to a preset database or file system, and continuously record the modification history of each cloud host monitoring report for subsequent tracking and auditing. When the user needs to view a certain cloud host monitoring report generated in the past, this embodiment can quickly find it from the preset database or file system storing the report according to the conditions such as time and type provided by the user.
[0062] It can be understood that the generated cloud host monitoring report is displayed in the system operation interface, and the system operation interface adopts a B / S architecture (browser / server architecture), which is convenient for users to access remotely. In addition to being able to display the cloud host monitoring report, the system operation interface also supports functions such as system configuration, task management, and data query for users. When users need to monitor cloud hosts, they can access through browsers or mobile devices such as mobile phones and tablets, and export data according to their own needs for backup and sharing. In addition, to ensure the security of the system and avoid data information leakage, this embodiment can also perform permission management on the system operation interface and support multi-language interfaces to meet the operation needs of users in different languages. In this way, this embodiment saves the custom analysis algorithm in the form of a plug-in, allowing users to add and modify it, improving the flexibility of data analysis; providing multiple report generation modes, which can meet the cloud host monitoring needs of users to a greater extent.
[0063] As can be seen from the above, in the embodiment of the present application, first, a corresponding custom collection policy and a target cloud host are determined based on the received monitoring instruction, a communication connection is established with the target cloud host through the Simple Network Management Protocol (SNMP), a collection task is generated according to the custom collection policy, and the collection task is assigned to a load balancing node, so as to execute the collection task through the load balancing node based on a preset task scheduling method, and store the collected performance index data in a database, so as to extract target index data from the database, and perform statistical analysis on the target index data by using a custom analysis algorithm, so as to generate a corresponding cloud host monitoring report based on the obtained analysis result and a custom report template. In this way, through the above process of the embodiment of the present application, on the one hand, it can automatically detect whether the SNMP service is installed in the target cloud host, and give a corresponding feedback prompt to the user in time after detecting that it is not installed, improving the efficiency of cloud host monitoring; on the one hand, the collector part is deployed in the load balancing node, realizing the horizontal expansion of load balancing and data collection; on the one hand, it supports multiple versions of SNMP and can adapt to different security requirements; on the one hand, when it detects that a proxy node fails, it automatically assigns its task to other nodes without manual intervention, improving the execution efficiency of the collection task; on the one hand, it supports the functions of manually pausing, resuming, and rescheduling the collection task, and can ensure that the user can control the collection tasks in the collection task list according to their own needs during the execution of the collection task, improving the flexibility of the cloud host monitoring process; on the one hand, it regularly backs up the performance index data in the database and provides a corresponding data recovery function to ensure the integrity of the data and avoid data loss caused by reasons such as system instability; on the one hand, the custom analysis algorithm is saved in a plug-in form, allowing users to add and modify it, improving the flexibility of data analysis; on the one hand, it provides multiple report generation modes, which can meet the cloud host monitoring needs of users to a greater extent; on the one hand, it collects the performance index data of the target cloud host through the Simple Network Management Protocol, improving the accuracy of the data; on the other hand, the overall cloud host monitoring process only requires the user to initiate a monitoring instruction, reducing the process of manual intervention, and thus realizing automated cloud host monitoring and improving the accuracy of the data, so as to solve the problems of low efficiency of cloud host monitoring and difficulty in meeting personalized monitoring needs.
[0064] Correspondingly, as shown in Figure 4 the following, the embodiment of the present application further provides a cloud host monitoring device, including:
[0065] A communication establishment module 11, configured to determine a corresponding custom collection policy and a target cloud host based on the received monitoring instruction, and establish a communication connection with the target cloud host through the Simple Network Management Protocol;
[0066] The task allocation module 12 is configured to generate corresponding collection tasks according to the custom collection policy, and allocate the collection tasks to the load balancing nodes, so as to execute the collection tasks through the load balancing nodes based on a preset task scheduling method, and store the performance index data collected from the target cloud host into the database;
[0067] The statistical analysis module 13 is configured to extract target index data to be analyzed from the database, and perform statistical analysis on the target index data by using a custom analysis algorithm, so as to generate a corresponding cloud host monitoring report based on the obtained analysis result and a custom report template.
[0068] As can be seen from the above, in the embodiment of the present application, first, a corresponding custom collection policy and a target cloud host are determined based on the received monitoring instruction, a communication connection is established with the target cloud host through the Simple Network Management Protocol, collection tasks are generated according to the custom collection policy, and the collection tasks are allocated to the load balancing nodes, so as to execute the collection tasks through the load balancing nodes based on a preset task scheduling method, and the collected performance index data is stored into the database, so as to extract target index data from the database, and perform statistical analysis on the target index data by using a custom analysis algorithm, so as to generate a corresponding cloud host monitoring report based on the obtained analysis result and a custom report template. In this way, through the above process of the embodiment of the present application, custom collection policies and custom analysis algorithms are supported, the flexibility of cloud host monitoring is improved, the performance index data of the target cloud host is collected through the Simple Network Management Protocol, the accuracy of the data is improved, and at the same time, the overall cloud host monitoring process only requires the user to initiate a monitoring instruction, reducing the process of manual intervention, thereby realizing automated cloud host monitoring and improving the accuracy of the data, so as to solve the problems of low efficiency of cloud host monitoring and difficulty in meeting personalized monitoring requirements.
[0069] In some specific embodiments, the communication establishment module 11 may specifically include:
[0070] The service detection unit is configured to detect whether the protocol service of the Simple Network Management Protocol has been installed in the target cloud host to obtain a corresponding detection result;
[0071] The connection establishment unit is configured to, if the detection result indicates that the protocol service has been installed, establish a communication connection with the target cloud host through the Simple Network Management Protocol;
[0072] A feedback notification unit, configured to, if the detection result indicates that the protocol service is not installed, perform corresponding feedback notification for the detection result, so as to install the protocol service in the target cloud host based on the received service installation instruction, and configure the protocol service to establish a communication connection with the target cloud host through the Simple Network Management Protocol.
[0073] In some specific embodiments, the task allocation module 12 may specifically include:
[0074] A task allocation unit, configured to, when it is detected that any node in the load balancing nodes fails, re-allocate the target collection task on the failed balancing node, so that the target collection task is executed by a target balancing node; the target balancing node is a non-failed node in the load balancing nodes that is allocated the target collection task except the failed balancing node.
[0075] In some specific embodiments, the cloud host monitoring device may further include:
[0076] A task suspension unit, configured to determine a task to be suspended in the collection task based on the received task suspension instruction, and suspend the execution of the task to be suspended;
[0077] Or, a task resume unit, configured to determine a task to be resumed in the collection task based on the received task resume instruction, and resume the execution of the task to be resumed;
[0078] Or, a task scheduling unit, configured to determine a task to be scheduled in the collection task based on the received task scheduling instruction, and re-schedule the task to be scheduled.
[0079] In some specific embodiments, the task allocation module 12 may specifically include:
[0080] A data processing unit, configured to compress and deduplicate the performance metric data collected from the target cloud host to obtain processed data;
[0081] A data storage unit, configured to slice the processed data, and store the sliced processed data in a database based on the data cold and hot separation technology.
[0082] In some specific embodiments, the statistical analysis module 13 may specifically include:
[0083] A data mining unit, configured to clean and standardize the target metric data, and mine the processed target data using a preset data mining technology to extract key information from the processed target data;
[0084] A condition judgment unit, configured to perform statistical analysis on the processed target data based on the key information and a custom analysis algorithm, and determine whether the processed target data exceeds a preset alarm threshold according to the obtained analysis result;
[0085] An operation trigger unit, configured to trigger an alarm operation for the target cloud host if the processed target data exceeds the preset alarm threshold.
[0086] In some specific embodiments, the cloud host monitoring device may further include:
[0087] A data acquisition unit, configured to determine monitoring metrics corresponding to the cloud host monitoring report based on a preset refresh frequency, and use the custom acquisition strategy to collect new data related to the monitoring metrics from the target cloud host, so as to update the database based on the new data to obtain an updated database;
[0088] A statistical analysis unit, configured to extract data to be analyzed related to the monitoring metrics from the updated database, and perform statistical analysis on the data to be analyzed using a custom analysis algorithm, so as to update the cloud host monitoring report based on the obtained analysis result.
[0089] Furthermore, an embodiment of the present application also discloses an electronic device, Figure 5 which is a structural diagram of an electronic device 20 shown according to an exemplary embodiment. The content in the figure should not be considered as any limitation to the scope of use of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the cloud host monitoring method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0090] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows is any communication protocol applicable to the technical solution of the present application, and no specific limitation is imposed on it here; the input / output interface 25 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application needs, and no specific limitation is made here.
[0091] In addition, as a carrier for storing resources, the memory 22 can be a read-only memory, a random access memory, a magnetic disk, an optical disc, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc. The storage method can be temporary storage or permanent storage.
[0092] Among them, the operating system 221 is used to manage and control each hardware device and the computer program 222 on the electronic device 20, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the cloud host monitoring method executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks.
[0093] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the cloud host monitoring method disclosed above is implemented. For the specific steps of this method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be elaborated herein.
[0094] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and reference can be made to the description of the method part for related parts.
[0095] Those skilled in the art can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0096] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of the two. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0097] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0098] The technical solutions provided in this application have been introduced in detail above. Specific examples are used in this text to elaborate on the principles and implementation manners of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to this application.
Claims
1. A cloud host monitoring method, characterized in that: include: Determine a corresponding custom collection strategy and a target cloud host based on the received monitoring instruction, and establish a communication connection with the target cloud host through a simple network management protocol; Generate corresponding collection tasks according to the custom collection strategy, and assign the collection tasks to the load balancing node, execute the collection tasks through the load balancing node based on a preset task scheduling method, and store the performance indicator data collected from the target cloud host in a database; The target indicator data to be analyzed is extracted from the database, and a custom analysis algorithm is used to perform statistical analysis on the target indicator data, so as to generate a corresponding cloud host monitoring report based on the obtained analysis results and the custom report template.
2. The cloud host monitoring method according to claim 1, characterized in that: The establishing a communication connection with the target cloud host through the simple network management protocol includes: Detecting whether a protocol service of the Simple Network Management Protocol has been installed in the target cloud host to obtain a corresponding detection result; If the detection result indicates that the protocol service has been installed, establishing a communication connection with the target cloud host through the simple network management protocol; If the detection result indicates that the protocol service is not installed, a corresponding feedback notification is made for the detection result so as to install the protocol service in the target cloud host based on the received service installation instruction, and configure the protocol service to establish a communication connection with the target cloud host through the simple network management protocol.
3. The cloud host monitoring method according to claim 1, characterized in that: The process of executing the collection task through the load balancing node includes: When it is detected that any node in the load balancing node fails, the target acquisition task on the failed balancing node is reallocated to execute the target acquisition task through the target balancing node; the target balancing node is a non-failed node in the load balancing node except the failed balancing node that is assigned to the target acquisition task.
4. The cloud host monitoring method according to claim 1, characterized in that: The process of executing the collection task through the load balancing node also includes: Determine the task to be suspended in the acquisition task based on the received task suspension instruction, and suspend the execution of the task to be suspended; or, determining the task to be restored in the acquisition task based on the received task restoration instruction, and restoring the execution of the task to be restored; Or, based on the received task scheduling instruction, determine the tasks to be scheduled in the acquisition task, and reschedule the tasks to be scheduled.
5. The cloud host monitoring method according to claim 1, characterized in that: The storing of the performance indicator data collected from the target cloud host into the database includes: Compressing and deduplicating the performance indicator data collected from the target cloud host to obtain processed data; The processed data is sharded, and based on the data hot and cold separation technology, the sharded processed data is stored in a database.
6. The cloud host monitoring method according to claim 1, characterized in that: The using of a custom analysis algorithm to perform statistical analysis on the target indicator data includes: Cleaning and standardizing the target indicator data, and mining the processed target data using a preset data mining technology to extract key information from the processed target data; Performing statistical analysis on the processed target data based on the key information and a custom analysis algorithm, and determining whether the processed target data exceeds a preset alarm threshold according to the obtained analysis results; If the processed target data exceeds the preset alarm threshold, an alarm operation for the target cloud host is triggered.
7. The cloud host monitoring method according to any one of claims 1 to 6, characterized in that: After generating the corresponding cloud host monitoring report based on the obtained analysis results and the custom report template, it also includes: Determine the monitoring indicator corresponding to the cloud host monitoring report based on a preset refresh frequency, and use the custom collection strategy to collect new data related to the monitoring indicator from the target cloud host, so as to update the database based on the new data to obtain an updated database; The data to be analyzed related to the monitoring index is extracted from the updated database, and a custom analysis algorithm is used to perform statistical analysis on the data to be analyzed, so as to update the cloud host monitoring report based on the obtained analysis results.
8. A cloud host monitoring device, characterized in that: include: A communication establishment module, used to determine the corresponding custom collection strategy and the target cloud host based on the received monitoring instruction, and establish a communication connection with the target cloud host through a simple network management protocol; A task allocation module is used to generate corresponding collection tasks according to the custom collection strategy, and allocate the collection tasks to the load balancing node, execute the collection tasks through the load balancing node based on a preset task scheduling method, and store the performance indicator data collected from the target cloud host in a database; The statistical analysis module is used to extract the target indicator data to be analyzed from the database, and use a custom analysis algorithm to perform statistical analysis on the target indicator data, so as to generate a corresponding cloud host monitoring report based on the obtained analysis results and a custom report template.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the cloud host monitoring method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the cloud host monitoring method according to any one of claims 1 to 7 is implemented.