A resource recycling monitoring method and device, a storage medium and an electronic device
By monitoring resource recycling methods, information on monitored resources is acquired and categorized, solving the problem of resource waste after monitoring ends, realizing automatic resource recycling and reuse, and improving monitoring efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA CONSTRUCTION BANK
- Filing Date
- 2021-12-27
- Publication Date
- 2026-06-16
AI Technical Summary
In existing technologies, monitoring data is often cleaned up after server monitoring ends, resulting in wasted resources.
A method for monitoring resource recycling is provided, which obtains information about the monitored resources by responding to resource recycling instructions, classifies and stores them, so as to realize the recycling of the monitored resources.
It enables automatic recycling of monitoring resources, avoids resource waste, and improves the deployment efficiency and effectiveness of monitoring configurations.
Smart Images

Figure CN114238034B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method and apparatus for monitoring resource recycling, a storage medium, and an electronic device. Background Technology
[0002] With the development of science and technology, servers are being used more and more widely in various fields. In some application scenarios, servers are used to perform business operations. Therefore, it is necessary to monitor the status of the server and the status of the business running on the server in order to ensure the stability of business operations.
[0003] In some cases, such as when the server's business operations have finished, monitoring of the server will be stopped. After stopping monitoring, the monitoring data is usually cleaned up, resulting in the waste of monitoring data. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a monitoring resource recycling method that can avoid the waste of monitoring resource data.
[0005] The present invention also provides a monitoring resource recycling device to ensure the implementation and application of the above method in practice.
[0006] According to a first aspect of the present invention, a method for monitoring resource reclamation is provided, comprising:
[0007] In response to a resource reclamation command, determine the monitoring resources corresponding to the resource reclamation command;
[0008] Obtain resource information for each of the monitored resources, wherein the resource information includes at least one of monitoring type, alarm events, monitoring metrics, and number of monitoring timeouts;
[0009] Each monitoring resource is classified according to its resource information to obtain a classification result for each monitoring resource.
[0010] The monitoring resources and their classification results are stored to complete the recycling of each monitoring resource.
[0011] Optionally, in the above method, determining the monitoring resources corresponding to the resource reclamation instruction includes:
[0012] Determine the remaining monitoring time for each preset monitoring node's monitoring configuration;
[0013] Based on the remaining monitoring time of each monitoring configuration, detect whether each monitoring configuration is in a pending offline state;
[0014] For each of the monitoring configurations, if the remaining monitoring time of the monitoring configuration is less than a preset duration threshold, then the monitoring configuration is determined to be in a state of waiting to be taken offline.
[0015] The monitoring resources collected by the monitoring configurations that are in various pending offline states are identified as the monitoring resources corresponding to the resource reclamation command.
[0016] Optionally, after determining the remaining monitoring time for the monitoring configuration of each monitoring node, the above method further includes:
[0017] If the remaining monitoring time of the monitoring configuration is zero, determine whether the monitoring resources collected by the monitoring configuration have been stored.
[0018] If the monitoring resources collected by the monitoring configuration have already been stored, the monitoring configuration shall be taken offline.
[0019] Optionally, after obtaining the classification results of each of the monitored resources, the above method further includes:
[0020] Based on the classification results of each monitoring resource, each monitoring resource is analyzed to obtain the monitoring analysis results corresponding to each monitoring resource; the monitoring analysis results include one or more of the following: the performance status of the monitoring node, the status of the monitoring indicator values, the sampling status of the monitoring indicator, and the standardization status of the monitoring resource.
[0021] Optionally, after obtaining the monitoring analysis results corresponding to each of the above-described monitoring resources, the method further includes:
[0022] The monitoring and analysis results are displayed on a preset display interface.
[0023] Optionally, after obtaining the monitoring analysis results corresponding to each of the above-described monitoring resources, the method further includes:
[0024] When a monitoring configuration deployment instruction is received, the first target monitoring node corresponding to the monitoring configuration deployment instruction is determined;
[0025] Among the various monitoring nodes, a second target monitoring node that matches the type of the first target monitoring node is determined;
[0026] Based on the analysis results, the monitoring configuration of the second target monitoring node is restored to obtain the monitoring configuration to be deployed for the second target monitoring node.
[0027] The monitoring configuration to be deployed is optimized, and the optimized monitoring configuration is deployed to the first target monitoring node.
[0028] According to a second aspect of the present invention, a monitoring resource recycling device is provided, comprising:
[0029] A determining unit is used to respond to a resource reclamation command and determine the monitoring resources corresponding to the resource reclamation command.
[0030] The acquisition unit is used to acquire resource information for each of the monitored resources, the resource information including at least one of monitoring type, alarm event, monitoring index and number of monitoring timeouts;
[0031] A classification unit is used to classify each of the monitoring resources according to the resource information of each monitoring resource, and obtain the classification result of each monitoring resource;
[0032] The recycling unit is used to store each of the monitoring resources and the classification results of each monitoring resource, so as to complete the recycling of each of the monitoring resources.
[0033] Optionally, the determining unit in the aforementioned apparatus includes:
[0034] The first determining subunit is used to determine the remaining monitoring time of the monitoring configuration of each preset monitoring node;
[0035] The detection subunit is used to detect whether each monitoring configuration is in a pending offline state based on the remaining monitoring time of each monitoring configuration.
[0036] The second determining subunit is used to determine that the monitoring configuration is in a pending offline state if the remaining monitoring time of each monitoring configuration is less than a preset duration threshold.
[0037] The third determining subunit is used to determine the monitoring resources collected by the monitoring configurations in each pending offline state as the monitoring resources corresponding to the resource reclamation instruction.
[0038] According to a third aspect of the present invention, a storage medium is provided, the storage medium including storage instructions, wherein, when the instructions are executed, the device in which the storage medium is located is controlled to perform the monitoring resource reclamation method provided in the first or second aspect described above.
[0039] According to a fourth aspect of the present invention, an electronic device is provided, including a memory and one or more instructions, wherein one or more instructions are stored in the memory and configured to be executed by one or more processors as described in the first or second aspect above.
[0040] Compared with the prior art, the present invention has the following advantages:
[0041] This invention provides a method, apparatus, storage medium, and electronic device for monitoring resource recycling. The method includes: responding to a resource recycling command, determining each monitoring resource corresponding to the resource recycling command; acquiring resource information for each monitoring resource, the resource information including at least one of monitoring type, alarm events, monitoring indicators, and monitoring timeout counts; classifying each monitoring resource according to its resource information to obtain a classification result for each monitoring resource; and storing each monitoring resource and its classification result to complete the recycling of each monitoring resource. Applying the method provided by this invention enables automatic recycling of monitoring resources, avoiding waste of monitoring resources. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0043] Figure 1 This invention provides a flowchart of a method for monitoring resource recycling.
[0044] Figure 2 A flowchart of the process for determining each monitored resource corresponding to a resource recycling instruction is provided by the present invention;
[0045] Figure 3 A flowchart of a resource monitoring process is provided for this invention;
[0046] Figure 4 An example diagram illustrating a process for monitoring real-time data resources provided by this invention;
[0047] Figure 5 A structural example diagram of a monitoring resource classification management application system provided by the present invention;
[0048] Figure 6 A schematic diagram illustrating a monitoring resource recycling process provided by the present invention;
[0049] Figure 7 This is a schematic diagram illustrating a process for monitoring resource reuse provided by the present invention.
[0050] Figure 8 This invention provides an example diagram of a monitoring configuration inheritance process;
[0051] Figure 9 This is a schematic diagram of the structure of a monitoring resource recycling device provided by the present invention;
[0052] Figure 10 This is a schematic diagram of the structure of an electronic device provided by the present invention. Detailed Implementation
[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0054] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0055] This invention provides a method for monitoring resource recycling, which can be applied to electronic devices. The flowchart of the method is shown below. Figure 1 As shown, it specifically includes:
[0056] S101: In response to a resource reclamation command, determine the monitoring resources corresponding to the resource reclamation command.
[0057] In this embodiment, the monitoring resources are monitoring data collected by the monitoring nodes based on the monitoring configuration.
[0058] Optionally, the monitoring resources can be obtained in real time through the monitoring node, or they can be obtained from the monitoring node when the monitoring configuration of the monitoring node is detected to be in a state of waiting to be taken offline, that is, the monitoring configuration of the monitoring node to which the monitoring resource belongs is in a state of waiting to be taken offline.
[0059] The monitoring nodes can be various types of devices, such as host servers.
[0060] S102: Obtain resource information for each of the monitored resources, wherein the resource information includes at least one of monitoring type, alarm event, monitoring metric, and number of monitoring timeouts.
[0061] In this embodiment, the monitoring metrics can be the monitoring metrics used by the monitoring configuration of the monitoring node, and the number of monitoring timeouts can be the number of ping monitoring timeouts during the monitoring period.
[0062] S103: Classify each monitoring resource according to its resource information to obtain the classification result of each monitoring resource.
[0063] In this embodiment, the classification result of each monitoring resource can characterize the category to which each monitoring resource belongs.
[0064] S104: Store each of the monitoring resources and the classification results of each monitoring resource to complete the recycling of each monitoring resource.
[0065] In this embodiment, the monitoring resources and the classification results of each monitoring resource can be stored in a preset database, and the classification results of each monitoring resource can be displayed on a preset monitoring resource classification management page.
[0066] By applying the method provided in the embodiments of the present invention, the automatic recycling of monitoring resources can be achieved, thus avoiding the waste of monitoring resources.
[0067] In this embodiment of the invention, based on the above implementation process, optionally, the process of determining each monitored resource corresponding to the resource reclamation instruction is as follows: Figure 2 As shown, it specifically includes:
[0068] S201: Determine the remaining monitoring time for the monitoring configuration of each preset monitoring node.
[0069] In this embodiment, the remaining monitoring time can be the remaining duration for the monitoring node to collect monitoring data according to the monitoring configuration.
[0070] In this embodiment, the remaining monitoring time of the monitoring configuration can be determined based on the configuration information of the monitoring configuration.
[0071] S202: Based on the remaining monitoring time of each monitoring configuration, detect whether each monitoring configuration is in a pending offline state.
[0072] In this embodiment, the remaining monitoring time of each monitoring configuration can be used to detect whether each monitoring configuration is in a state of waiting to be taken offline. If the remaining monitoring time of the monitoring configuration is greater than or equal to a preset duration threshold, it is determined that the monitoring configuration is not in a state of waiting to be taken offline.
[0073] S203: For each of the monitoring configurations, if the remaining monitoring time of the monitoring configuration is less than a preset duration threshold, then the monitoring configuration is determined to be in a state of waiting to be taken offline.
[0074] In this embodiment, the remaining monitoring time of the monitoring configuration is compared with a preset duration threshold. If the remaining monitoring time is less than the duration threshold, the monitoring configuration is determined to be in a pending offline state.
[0075] S204: The monitoring resources collected by the monitoring configurations that are in various offline states are identified as the monitoring resources corresponding to the resource reclamation command.
[0076] By applying the method provided in this embodiment of the invention, the monitoring resources collected by the monitoring configuration can be obtained before the monitoring configuration is taken offline, and the monitoring resources can be recycled.
[0077] In this embodiment of the invention, based on the above implementation process, optionally, after determining the remaining monitoring time of the monitoring configuration of each monitoring node, the method further includes:
[0078] If the remaining monitoring time of the monitoring configuration is zero, determine whether the monitoring resources collected by the monitoring configuration have been stored.
[0079] If the monitoring resources collected by the monitoring configuration have already been stored, the monitoring configuration shall be taken offline.
[0080] In this embodiment, if the remaining monitoring time of the monitoring configuration is zero and the monitoring resources of the monitoring configuration have not yet been stored, the monitoring resources are backed up and stored, and the monitoring configuration is taken offline, so that the monitoring resources can be recycled before the monitoring configuration is taken offline.
[0081] In this embodiment of the invention, based on the above implementation process, optionally, after obtaining the classification results of each of the monitored resources, the method further includes:
[0082] Based on the classification results of each monitoring resource, each monitoring resource is analyzed to obtain the monitoring analysis results corresponding to each monitoring resource; the monitoring analysis results include one or more of the following: the performance status of the monitoring node, the status of the monitoring indicator values, the sampling status of the monitoring indicator, and the standardization status of the monitoring resource.
[0083] In this embodiment, by analyzing each monitoring resource, we can obtain the overall performance status of the monitoring node during the monitoring period, the normal value of the overall monitoring indicators, the overall data acquisition performance and stability of the acquired data, and whether the collected monitoring resource data is standardized.
[0084] In this embodiment of the invention, based on the above implementation process, optionally, after obtaining the monitoring analysis results corresponding to each of the monitoring resources, the method further includes:
[0085] The monitoring and analysis results are displayed on a preset display interface.
[0086] In this embodiment, the monitoring and analysis results are displayed in a preset display interface, thereby showing the monitoring and analysis results to the user and allowing the user to intuitively understand the monitoring and analysis results.
[0087] In this embodiment of the invention, based on the above implementation process, optionally, after obtaining the monitoring analysis results corresponding to each of the monitoring resources, the method further includes:
[0088] When a monitoring configuration deployment instruction is received, the first target monitoring node corresponding to the monitoring configuration deployment instruction is determined;
[0089] Among the various monitoring nodes, a second target monitoring node that matches the type of the first target monitoring node is determined;
[0090] Based on the analysis results, the monitoring configuration of the second target monitoring node is restored to obtain the monitoring configuration to be deployed for the second target monitoring node.
[0091] The monitoring configuration to be deployed is optimized, and the optimized monitoring configuration is deployed to the first target monitoring node.
[0092] In this embodiment, the first target monitoring node is the node whose type matches that of the other monitoring nodes. That is, the type of the first target monitoring node matches the type of the second target monitoring node. The type of the monitoring node can represent the model of the monitoring node, the type of service it performs, etc.
[0093] By applying the method provided in this embodiment of the invention, the monitoring configuration of the second target monitoring node can be restored, the restored monitoring configuration can be optimized, and the optimized monitoring configuration can be deployed to the first target monitoring node that matches the type of the second target monitoring node, thereby improving the deployment efficiency of the monitoring configuration of the first target monitoring node and enhancing the monitoring effect of the first target monitoring node.
[0094] In this embodiment, based on the above implementation process, optionally, after obtaining the monitoring analysis results corresponding to each of the monitoring resources, the method further includes:
[0095] Based on the analysis results, the monitoring configuration of each monitoring node is restored to obtain the monitoring configuration to be deployed for each monitoring node.
[0096] The monitoring configuration to be deployed for each monitoring node is optimized, and the optimized monitoring configuration to be deployed for each monitoring node is deployed to that monitoring node.
[0097] By applying the method provided in this embodiment of the invention, the monitoring configuration can be quickly restored and optimized, thereby improving the monitoring effect of the monitoring node.
[0098] In some embodiments, such as Figure 3 The diagram shows a flowchart of a monitoring resource processing procedure provided by an embodiment of the present invention. This process, encompassing monitoring resource storage, classification, analysis, recycling, and reuse, enables the standardized and sustainable recycling and reuse of monitoring resources after host resource shutdown. Utilizing monitoring deployment, application clusters, data analysis systems, and automated operation and maintenance systems, the recycling and reuse of monitoring resources can be achieved. Server monitoring resources are collected, and their monitoring type, host alarm events during the monitoring period, monitoring metrics used during the monitoring period, ping monitoring timeouts, and other real-time monitoring information resources are classified based on the monitoring resource information. Data analysis of the classified monitoring resources yields the overall performance status of the server during the monitoring period, the normal values of overall monitoring metrics, the overall data collection performance and stability of the deployed monitoring metrics, and whether the collected monitoring resource data is standardized. After data analysis, monitoring resource backups are performed. Specifically, this can include automated tool-assisted backups from the server monitoring period until the moment the monitoring deployment is taken offline, backups of alarm information during server monitoring, backups of information collection during server monitoring, and backups of key keyword monitoring logs during the monitoring period. By analyzing and backing up the data, we can restore the monitoring configuration and deployment of similar server devices (AI devices) in the future, provide resource references before host deployment, avoid performance obstacles before monitoring deployment, detect and warn of sudden anomalies, and enable deep learning and reuse of AI devices.
[0099] In some embodiments, such as Figure 4 The diagram shown is an example of a process for monitoring real-time data resources according to an embodiment of the present invention. The data acquisition node can receive the monitoring resources transmitted by the monitored host node client and provide the interface services corresponding to the monitoring resources.
[0100] In some embodiments, such as Figure 5 The diagram shown is a structural example of a monitoring resource classification management application system provided in an embodiment of the present invention. The monitoring resource classification management system includes multiple object-relational database management systems (PostgreSQL), multiple remote dictionary service modules (Redis), multiple monitoring resource classification management applications, and a display module. The monitoring resource classification management application system classifies the monitoring resources stored in the database using the monitoring resource classification management applications, and displays the classified resources in a preset display interface using the display module.
[0101] In this embodiment, the monitoring resource data sent through the acquisition interface will be integrated with the monitoring resource classification management system to achieve the purpose of monitoring resource classification.
[0102] Optionally, the monitoring resource classification management application system is used to: classify real-time monitoring information resources such as the monitoring type of monitoring resources, host alarm events during the monitoring period, monitoring indicators used during the monitoring period, and ping monitoring timeouts during the monitoring period; perform data analysis on the classified monitoring resources to obtain the overall performance status of the server during the monitoring period, the normal value of the overall monitoring indicators, the overall data collection performance and stability of the deployed monitoring indicators, and whether the collected monitoring resource data is standardized, and display this data centrally on a page.
[0103] In some embodiments, such as Figure 6 The diagram shown is a schematic of a monitoring resource recycling process provided in an embodiment of the present invention. The process can initiate a resource recycling process to call automated tools to back up monitoring resources, thereby backing up the monitoring resource backup information. The monitoring tools can also be used to take the monitoring configuration offline, so that the monitoring resource classification management application system marks the servers with the offline monitoring configurations.
[0104] In this embodiment, the monitoring resource data backup system refers to automated tool-assisted backups from the time the server is monitored until the moment the monitoring deployment is taken offline, including backups of alarm information, information collection, and key monitoring logs.
[0105] Optionally, batch backups can be performed on the target host by calling the monitoring tool's backup command through automated operation and maintenance tools.
[0106] In some embodiments, such as Figure 7 The diagram illustrates a process for reusing monitoring resources according to an embodiment of the present invention. It can obtain the classification results in the monitoring resource classification management application system and the backed-up monitoring resources in the monitoring resource backup system, and analyze the monitoring resources and classification results. This enables processes such as monitoring configuration deployment restoration, resource reference before host deployment, performance obstacle avoidance before monitoring deployment, monitoring sudden anomalies and early warnings, and deep learning and inheritance reuse.
[0107] In embodiments of the present invention, such as Figure 8 The diagram shown is an example of a monitoring configuration inheritance process provided by an embodiment of the present invention. The monitoring resource recycling and reuse system can be used to restore the monitoring configuration deployment, inherit monitoring attributes and perform deep learning, optimize host performance, and optimize the new target server in the form of a template, so that the target server inherits the monitoring configuration and deepens the configuration, thereby achieving the regeneration and sustainable use of monitoring resources.
[0108] and Figure 1 Corresponding to the method described above, this embodiment of the invention also provides a monitoring resource recycling device for monitoring... Figure 1The specific implementation of the method, the monitoring resource recycling device provided in this embodiment of the invention, can be applied to electronic devices, and its structural schematic diagram is shown below. Figure 9 As shown, it specifically includes:
[0109] The determining unit 901 is used to respond to a resource reclamation command and determine the monitoring resources corresponding to the resource reclamation command.
[0110] The acquisition unit 902 is used to acquire resource information for each of the monitored resources, the resource information including at least one of monitoring type, alarm event, monitoring index and number of monitoring timeouts;
[0111] The classification unit 903 is used to classify each of the monitoring resources according to the resource information of each monitoring resource, and obtain the classification result of each monitoring resource;
[0112] The recycling unit 904 is used to store each of the monitoring resources and the classification results of each monitoring resource in order to complete the recycling of each of the monitoring resources.
[0113] In this embodiment of the invention, based on the above-described solution, optionally, the determining unit 901 includes:
[0114] The first determining subunit is used to determine the remaining monitoring time of the monitoring configuration of each preset monitoring node;
[0115] The detection subunit is used to detect whether each monitoring configuration is in a pending offline state based on the remaining monitoring time of each monitoring configuration.
[0116] The second determining subunit is used to determine that the monitoring configuration is in a pending offline state if the remaining monitoring time of each monitoring configuration is less than a preset duration threshold.
[0117] The third determining subunit is used to determine the monitoring resources collected by the monitoring configurations in each pending offline state as the monitoring resources corresponding to the resource reclamation instruction.
[0118] In this embodiment of the invention, based on the above solution, optionally, the monitoring resource recycling device further includes:
[0119] The first execution unit is used to determine whether the monitoring resources collected by the monitoring configuration have been stored when the remaining monitoring time of the monitoring configuration is zero.
[0120] The second execution unit is used to take the monitoring configuration offline if the monitoring resources collected by the monitoring configuration have been stored.
[0121] In this embodiment of the invention, based on the above solution, optionally, the monitoring resource recycling device further includes:
[0122] The analysis unit is used to analyze each of the monitoring resources according to the classification results of each monitoring resource, and obtain the monitoring analysis results corresponding to each monitoring resource; the monitoring analysis results include one or more of the following: the performance status of the monitoring node, the status of the monitoring indicator values, the sampling status of the monitoring indicator, and the standardization status of the monitoring resource.
[0123] In this embodiment of the invention, based on the above solution, optionally, the monitoring resource recycling device further includes:
[0124] The display unit is used to display the monitoring and analysis results on a preset display interface.
[0125] In this embodiment of the invention, based on the above solution, optionally, the monitoring resource recycling device further includes:
[0126] The third execution unit is used to determine the first target monitoring node corresponding to the monitoring configuration deployment instruction when a monitoring configuration deployment instruction is received.
[0127] The fourth execution unit is used to determine, among the various monitoring nodes, a second target monitoring node that matches the type of the first target monitoring node;
[0128] The fifth execution unit is used to restore the monitoring configuration of the second target monitoring node based on the analysis results, and obtain the monitoring configuration to be deployed corresponding to the second target monitoring node;
[0129] The sixth execution unit is used to optimize the monitoring configuration to be deployed and deploy the optimized monitoring configuration to the first target monitoring node.
[0130] The specific principles and execution processes of each unit and module in the monitoring resource recovery device disclosed in the above embodiments of the present invention are the same as those of the monitoring resource recovery method disclosed in the above embodiments of the present invention. Please refer to the corresponding parts of the monitoring resource recovery method provided in the above embodiments of the present invention, and they will not be repeated here.
[0131] This invention also provides a storage medium that includes stored instructions, wherein the execution of the instructions controls the device where the storage medium is located to perform the above-described monitoring resource reclamation method.
[0132] This invention also provides an electronic device, the structural schematic of which is shown below. Figure 10As shown, it specifically includes a memory 1001 and one or more instructions 1002, wherein one or more instructions 1002 are stored in the memory 1001 and configured to be executed by one or more processors 1003 to perform the following operations:
[0133] In response to a resource reclamation command, determine the monitoring resources corresponding to the resource reclamation command;
[0134] Obtain resource information for each of the monitored resources, wherein the resource information includes at least one of monitoring type, alarm events, monitoring metrics, and number of monitoring timeouts;
[0135] Each monitoring resource is classified according to its resource information to obtain a classification result for each monitoring resource.
[0136] The monitoring resources and their classification results are stored to complete the recycling of each monitoring resource.
[0137] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0138] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0139] For ease of description, the above apparatus is described by dividing it into various functional units. Of course, in implementing this invention, the functions of each unit can be implemented in one or more software and / or hardware components.
[0140] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.
[0141] The above provides a detailed description of a monitoring and resource recycling method provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for monitoring resource recycling, characterized in that, include: In response to a resource reclamation command, determine the monitoring resources corresponding to the resource reclamation command; Obtain resource information for each of the monitored resources, wherein the resource information includes at least one of monitoring type, alarm events, monitoring metrics, and number of monitoring timeouts; Each monitoring resource is classified according to its resource information to obtain a classification result for each monitoring resource. The monitoring resources and their classification results are stored to complete the recycling of each monitoring resource. The step of determining the monitoring resources corresponding to the resource reclamation instruction includes: Determine the remaining monitoring time for each preset monitoring node's monitoring configuration; Based on the remaining monitoring time of each monitoring configuration, detect whether each monitoring configuration is in a pending offline state; For each of the monitoring configurations, if the remaining monitoring time of the monitoring configuration is less than a preset duration threshold, then the monitoring configuration is determined to be in a state of waiting to be taken offline. The monitoring resources collected by the monitoring configurations that are in various pending offline states are identified as the monitoring resources corresponding to the resource reclamation command.
2. The method according to claim 1, characterized in that, After determining the remaining monitoring time for the monitoring configuration of each monitoring node, the process also includes: If the remaining monitoring time of the monitoring configuration is zero, determine whether the monitoring resources collected by the monitoring configuration have been stored. If the monitoring resources collected by the monitoring configuration have already been stored, the monitoring configuration shall be taken offline.
3. The method according to claim 1, characterized in that, After obtaining the classification results of each of the monitored resources, the process further includes: Based on the classification results of each monitoring resource, each monitoring resource is analyzed to obtain the monitoring analysis results corresponding to each monitoring resource; the monitoring analysis results include one or more of the following: the performance status of the monitoring node, the status of the monitoring indicator values, the sampling status of the monitoring indicator, and the standardization status of the monitoring resource.
4. The method according to claim 3, characterized in that, After obtaining the monitoring analysis results corresponding to each of the monitoring resources, the method further includes: The monitoring and analysis results are displayed on a preset display interface.
5. The method according to claim 3, characterized in that, After obtaining the monitoring analysis results corresponding to each of the monitoring resources, the method further includes: When a monitoring configuration deployment instruction is received, the first target monitoring node corresponding to the monitoring configuration deployment instruction is determined; Among the various monitoring nodes, a second target monitoring node that matches the type of the first target monitoring node is determined; Based on the analysis results, the monitoring configuration of the second target monitoring node is restored to obtain the monitoring configuration to be deployed for the second target monitoring node. The monitoring configuration to be deployed is optimized, and the optimized monitoring configuration is deployed to the first target monitoring node.
6. A monitoring resource recycling device, characterized in that, include: A determining unit is used to respond to a resource reclamation command and determine the monitoring resources corresponding to the resource reclamation command. The acquisition unit is used to acquire resource information for each of the monitored resources, the resource information including at least one of monitoring type, alarm event, monitoring index and number of monitoring timeouts; A classification unit is used to classify each of the monitoring resources according to the resource information of each monitoring resource, and obtain the classification result of each monitoring resource; The recycling unit is used to store each of the monitoring resources and the classification results of each monitoring resource, so as to complete the recycling of each of the monitoring resources; The determining unit includes: The first determining subunit is used to determine the remaining monitoring time of the monitoring configuration of each preset monitoring node; The detection subunit is used to detect whether each monitoring configuration is in a pending offline state based on the remaining monitoring time of each monitoring configuration. The second determining subunit is used to determine that the monitoring configuration is in a pending offline state if the remaining monitoring time of each monitoring configuration is less than a preset duration threshold. The third determining subunit is used to determine the monitoring resources collected by the monitoring configurations in each pending offline state as the monitoring resources corresponding to the resource reclamation instruction.
7. A storage medium, characterized in that, The storage medium includes storage instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to perform the monitoring resource reclamation method as described in any one of claims 1 to 5.
8. An electronic device, characterized in that, It includes a memory, and one or more instructions, wherein one or more instructions are stored in the memory and configured to be executed by one or more processors as described in any one of claims 1 to 5.