CN115514624A - Monitoring method, monitoring device, electronic equipment and storage medium - Google Patents

Monitoring method, monitoring device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115514624A
CN115514624A CN202211151848.5A CN202211151848A CN115514624A CN 115514624 A CN115514624 A CN 115514624A CN 202211151848 A CN202211151848 A CN 202211151848A CN 115514624 A CN115514624 A CN 115514624A
Authority
CN
China
Prior art keywords
monitoring
state
monitoring agent
agent
agents
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211151848.5A
Other languages
Chinese (zh)
Other versions
CN115514624B (en
Inventor
刘伟
张旭春
张国军
尚锟
赵轩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202211151848.5A priority Critical patent/CN115514624B/en
Publication of CN115514624A publication Critical patent/CN115514624A/en
Application granted granted Critical
Publication of CN115514624B publication Critical patent/CN115514624B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)
  • Hardware Redundancy (AREA)

Abstract

The application provides a monitoring method, a monitoring device, electronic equipment and a storage medium. The method comprises the following steps: acquiring the state of each monitoring agent corresponding to an object to be monitored according to a monitoring request, wherein the monitoring request comprises the object to be monitored and a monitoring task; distributing the monitoring task to a monitoring agent in an idle state to execute, and updating the state of the monitoring agent to be a working state; if the first monitoring agent which is switched from the working state to the fault upgrading state is detected to exist, a second monitoring agent is determined from the monitoring agents which are in the idle state at present, and the tasks which need to be executed by the first monitoring agent are distributed to the second monitoring agent to be executed until the monitoring tasks are completed, so that the monitoring data returned by each monitoring agent are obtained. According to the scheme, when the monitoring agent breaks down or is upgraded, real-time and effective monitoring of the object to be monitored can be still achieved, and the reliability of monitoring is improved.

Description

Monitoring method, monitoring device, electronic equipment and storage medium
Technical Field
The present application relates to big data technologies, and in particular, to a monitoring method and apparatus, an electronic device, and a storage medium.
Background
With the progress of science and technology and the coming of big data era, higher requirements are put forward on the operation and maintenance system of enterprises. The operation and maintenance monitoring is used as an important step of business operation and maintenance, and the real-time effective monitoring can ensure the continuous, stable and safe operation of the operation and maintenance system.
Currently, each object to be monitored is monitored and managed by a special monitoring agent. In practical application, when a monitoring agent fails, the corresponding object to be monitored cannot be effectively monitored in real time, the server cannot know the state of the object to be monitored, and the monitoring reliability is low.
Disclosure of Invention
The application provides a monitoring method, a monitoring device, electronic equipment and a storage medium, which are used for solving the problem of low reliability of the existing monitoring scheme.
In a first aspect, the present application provides a monitoring method, including: acquiring the state of each monitoring agent corresponding to an object to be monitored according to a monitoring request, wherein the monitoring request comprises the object to be monitored and a monitoring task; distributing the monitoring task to a monitoring agent in an idle state to execute, and updating the state of the monitoring agent to be a working state; if the first monitoring agent which is switched from the working state to the fault upgrading state is detected to exist, a second monitoring agent is determined from the monitoring agents which are in the idle state at present, and the tasks which need to be executed by the first monitoring agent are distributed to the second monitoring agent to be executed until the monitoring tasks are completed, so that the monitoring data returned by each monitoring agent are obtained.
In a possible embodiment, the allocating the monitoring task to the monitoring agent currently in the idle state for execution includes: dividing the monitoring task into a plurality of subtasks according to the task type; selecting a plurality of monitoring agents with the same number as the plurality of subtasks from the monitoring agents in the idle state at present, wherein the plurality of monitoring agents correspond to the plurality of subtasks one to one; and distributing each subtask to a monitoring agent corresponding to the subtask for execution.
In a possible embodiment, the allocating the monitoring task to the monitoring agent currently in the idle state for execution includes: selecting a plurality of monitoring agents from the monitoring agents in the idle state at present; and distributing the monitoring task to each monitoring agent in the plurality of monitoring agents to execute.
In one possible embodiment, the method further comprises: and carrying out duplicate removal processing on the monitoring data returned by each monitoring agent.
In a possible implementation manner, if it is detected that there is a first monitoring agent that is switched from the operating state to the fault upgrading state, determining a second monitoring agent from among the monitoring agents currently in the idle state includes: if the first monitoring agent which is switched from the working state to the fault upgrading state exists, detecting whether a monitoring agent which is currently in an idle state exists in all monitoring agents corresponding to the object to be monitored; if the monitoring agent exists, determining a second monitoring agent from the monitoring agents in the idle state at present; if not, executing the registration of the monitoring agent, and setting the state of the monitoring agent obtained by the registration as an idle state; a second monitoring agent is determined from the monitoring agents currently in an idle state.
In a possible embodiment, after allocating the monitoring task to the monitoring agent currently in the idle state for execution and updating the state of the monitoring agent to the working state, the method further includes: and if any monitoring agent in the working state is detected, and no monitoring data is returned within a preset time, updating the state of the monitoring agent to be a fault upgrading state.
In one possible embodiment, the method further comprises: determining a monitoring agent needing to be upgraded and an upgrading time period according to the received upgrading task; when the upgrading time interval comes, switching the state of the monitoring agent to be upgraded into a fault upgrading state, and executing the upgrading task; and switching the state of the monitoring agent to be upgraded to an idle state until the upgrade is completed.
In one possible embodiment, the method further comprises: monitoring the number of monitoring agents in an idle state at present; if the number is smaller than a preset first threshold value, executing the registration of the monitoring agents, and setting the state of the monitoring agents obtained by the registration as an idle state; and if the number is larger than a preset second threshold value, selecting a corresponding number of monitoring agents from the monitoring agents in the idle state and/or the fault upgrading state for unloading, wherein the first threshold value is not larger than the second threshold value.
In a first aspect, the present application provides a monitoring device comprising: the system comprises an acquisition module, a monitoring module and a processing module, wherein the acquisition module is used for acquiring the state of each monitoring agent corresponding to an object to be monitored according to a monitoring request, and the monitoring request comprises the object to be monitored and a monitoring task; the distribution module is used for distributing the monitoring task to the monitoring agent in the idle state to execute and updating the state of the monitoring agent to be a working state; and the processing module is used for determining a second monitoring agent from the monitoring agents in the idle state if detecting that the first monitoring agent switched from the working state to the fault upgrading state exists, distributing the tasks to be executed by the first monitoring agent to the second monitoring agent for execution until the monitoring tasks are completed, and acquiring the monitoring data returned by each monitoring agent.
In a possible implementation, the allocation module is specifically configured to: dividing the monitoring task into a plurality of subtasks according to the task type; selecting a plurality of monitoring agents with the same number as the plurality of subtasks from the monitoring agents in the idle state at present, wherein the plurality of monitoring agents are in one-to-one correspondence with the plurality of subtasks; and distributing each subtask to a monitoring agent corresponding to the subtask for execution.
In a possible implementation, the allocation module is specifically configured to: selecting a plurality of monitoring agents from the monitoring agents in the idle state at present; and distributing the monitoring task to each monitoring agent in the plurality of monitoring agents to execute.
In a possible embodiment, the apparatus further comprises: and the duplicate removal module is used for carrying out duplicate removal processing on the monitoring data returned by each monitoring agent.
In a possible implementation, the processing module is specifically configured to: if detecting that a first monitoring agent which is switched from a working state to a fault upgrading state exists, detecting whether a monitoring agent which is currently in an idle state exists in each monitoring agent corresponding to the object to be monitored; if the monitoring agent exists, determining a second monitoring agent from the monitoring agents in the idle state at present; if not, executing the registration of the monitoring agent, and setting the state of the monitoring agent obtained by the registration as an idle state; a second monitoring agent is determined from the monitoring agents currently in an idle state.
In a possible embodiment, the apparatus further comprises: and the state updating module is used for updating the state of any monitoring agent in the working state into a fault upgrading state if the monitoring agent is detected not to return monitoring data within a preset time.
In a possible embodiment, the apparatus further comprises: the receiving module is used for determining a monitoring agent to be upgraded and an upgrading time period according to the received upgrading task; the upgrading module is used for switching the state of the monitoring agent to be upgraded into a fault upgrading state when the upgrading time period comes, and executing the upgrading task; and switching the state of the monitoring agent to be upgraded to an idle state until the upgrade is completed.
In a possible embodiment, the apparatus further comprises: the monitoring module is used for monitoring the number of monitoring agents in an idle state at present; the registration module is used for executing the registration of the monitoring agent if the number is smaller than a preset first threshold value, and setting the state of the monitoring agent obtained by the registration as an idle state; and the unloading module is used for selecting a corresponding number of monitoring agents from the monitoring agents in the idle state and/or the fault upgrading state for unloading if the number is larger than a preset second threshold, wherein the first threshold is not larger than the second threshold.
In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively coupled to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored by the memory to implement the method as previously described.
In a fourth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions for implementing the method as described above when executed by a processor.
In the monitoring method, the monitoring device, the electronic equipment and the storage medium, the states of the monitoring agents corresponding to the object to be monitored are obtained according to the monitoring request, wherein the monitoring request comprises the object to be monitored and the monitoring task; distributing the monitoring task to the monitoring agent in the idle state to execute, and updating the state of the monitoring agent to be the working state; if the first monitoring agent which is switched from the working state to the fault upgrading state is detected to exist, determining a second monitoring agent from the monitoring agents which are in the idle state at present, distributing the tasks which need to be executed by the first monitoring agent to the second monitoring agent to execute until the monitoring tasks are completed, and obtaining the monitoring data returned by each monitoring agent. In the scheme of the application, a plurality of monitoring agents are configured for each object to be monitored, the states of the monitoring agents are maintained and managed in time in the execution process of the monitoring tasks, if a certain monitoring agent fails or is upgraded, the corresponding monitoring task of the object to be monitored can be executed by other monitoring agents of the object to be monitored, and therefore when the monitoring agents fail or are upgraded, real-time and effective monitoring of the object to be monitored can still be achieved, and monitoring reliability is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
FIG. 1 is a schematic view of a monitoring scenario provided herein;
fig. 2 is a schematic flowchart of a monitoring method according to an embodiment of the present disclosure;
fig. 3 is a schematic deployment diagram of a monitoring agent according to an embodiment of the present application;
fig. 4 is a schematic view illustrating an upgrade flow of a monitoring agent according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a monitoring method according to a second embodiment of the present application;
fig. 6 is a schematic flowchart of a monitoring method according to a third embodiment of the present application;
fig. 7 is a schematic flowchart of deduplication processing provided in the third embodiment of the present application;
fig. 8 is a schematic structural diagram of a monitoring device according to a fourth embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
It should be noted that the brief descriptions of the terms in the present application are only for convenience of understanding of the embodiments described below, and are not intended to limit the embodiments of the present application. These terms should be understood in their ordinary and customary meaning unless otherwise indicated.
The terms "first," "second," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between similar or analogous objects or entities and are not necessarily intended to limit the order or sequence Unless otherwise indicated. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application are, for example, capable of operation in sequences other than those illustrated or otherwise described herein.
Furthermore, the terms "comprises" and "comprising," as well as any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or device that comprises a list of elements is not necessarily limited to those elements explicitly listed, but may include other elements not expressly listed or inherent to such product or device. The term module, as used herein, refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware or/and software code that is capable of performing the functionality associated with that element.
The term "monitoring Agent (Agent)" used in the embodiments of the present application refers to Agent software that is deployed at an object to be monitored, and is used to monitor an object to be monitored and to implement acquisition and management of monitoring data.
The technical means of the present application and the technical means of the present application will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. In the description of the present application, unless otherwise explicitly specified and defined, each term should be understood broadly in the art. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a scene schematic diagram of monitoring provided in the present application. As shown in fig. 1, the object to be monitored 103 corresponds to only one monitoring agent, and the monitoring agent 102 monitors the object to be monitored 103 and transmits monitoring data to the server 101.
In practical application, the monitoring scene of the application can be an operation and maintenance monitoring scene, the operation and maintenance monitoring is an important step in a service operation and maintenance process, and the real-time and effective operation and maintenance monitoring can ensure continuous and stable operation of a service. The object 103 to be monitored may be a terminal device, such as a server, a computer, a notebook computer, a mobile terminal, and the like. The object to be monitored 103 may also be a software application, e.g. an application, a database, a network, etc.
In combination with the actual scene, the server 101 can realize timely learning of the working state of the object to be monitored 103 through the monitoring agent 102, which is convenient for the server 101 to manage the object to be monitored 103. When the monitoring agent 102 fails, the monitoring of the object to be monitored 103 cannot be realized, the server 101 cannot know the condition of the object to be monitored 103, and when the object to be monitored fails, the server 101 cannot timely find and process the object to be monitored, so that the monitoring system cannot safely and reliably operate.
In the embodiment of the application, if the first monitoring agent switched from the working state to the fault upgrading state is detected to exist, the second monitoring agent is determined from the monitoring agents in the idle state at present, the tasks to be executed by the first monitoring agent are distributed to the second monitoring agent for execution until the monitoring tasks are completed, and the monitoring data returned by each monitoring agent is obtained, so that when the monitoring agents are in fault or are upgraded, real-time and effective monitoring on the object to be monitored can be still realized, and the monitoring reliability is improved.
Example one
Fig. 2 is a schematic flowchart of a monitoring method provided in an embodiment of the present application, where an implementation subject of the embodiment may be a monitoring device, and as shown in fig. 2, the method includes:
s201, acquiring the states of the monitoring agents corresponding to the object to be monitored according to the monitoring request.
The monitoring request comprises an object to be monitored and a monitoring task, and the monitoring request represents a request for executing the corresponding monitoring task on the object to be monitored. The monitoring task refers to a monitoring instruction of the monitoring agent to the object to be monitored, and optionally, the monitoring task includes: the time at which the monitoring is performed, the type of monitoring, etc. For example, the monitoring task is to collect the CPU utilization of the object to be monitored once at an interval of 5 seconds.
In this embodiment, the monitoring agent status includes: a working state, an idle state, and a fault upgrade state. The working state refers to a state that the monitoring agent is allocated with a monitoring task and is preparing to execute the monitoring task or a state that the monitoring task is being executed; the idle state refers to a state in which the monitoring agent can be used for executing the monitoring task and is not allocated with the monitoring task; the fail-up state refers to a state in which the monitoring agent cannot be used to perform the monitoring task.
S202, distributing the monitoring tasks to the monitoring agents in the idle state to execute, and updating the states of the monitoring agents to be working states.
S203, if the first monitoring agent switched from the working state to the fault upgrading state is detected to exist, determining a second monitoring agent from the monitoring agents in the idle state, distributing the tasks to be executed by the first monitoring agent to the second monitoring agent to execute until the monitoring tasks are completed, and obtaining the monitoring data returned by each monitoring agent.
In practical application, the monitoring agent completes the monitoring task and updates the state of the monitoring agent from the working state to the idle state after returning the monitoring data. Optionally, the monitoring agent in the working state is detected, the remaining time of the current monitoring task is completed, and whether to allocate a new monitoring task to the monitoring agent is dynamically determined according to the remaining time.
According to a possible mode, after the monitoring data returned by each monitoring agent is obtained, whether the monitoring data meets the working data range of the object to be monitored is judged. If the monitoring data meets the working data range of the object to be monitored, storing the monitoring data; and if the monitoring data does not meet the working data range of the object to be monitored, generating alarm information and sending the alarm information to the object end to be monitored. Optionally, the obtained monitoring data may be visually displayed.
For better understanding of the scheme, an example is performed in combination with a deployment diagram of a monitoring agent, and fig. 3 is a deployment diagram of the monitoring agent provided in an embodiment of the present application. As shown in fig. 3, the object to be monitored 35 is disposed with a monitoring agent 32, a monitoring agent 33, and a monitoring agent 34.
By way of example, monitoring agent 32 is in an operational state for performing monitoring tasks; the monitoring agent 33 is in an idle state; the monitoring agent 34 is in a fail-over state. If it is detected that monitoring agent 32 is switched from the working state to the failure upgrade state, the monitoring tasks to be executed by monitoring agent 32 are distributed to monitoring agent 33, and the state of monitoring agent 33 is updated from the idle state to the working state. The monitoring agent 33 performs a monitoring task and transmits the monitoring data to the server 31.
It should be understood that, in order to ensure that the monitoring task is completed, it is required to ensure that when the state of the first monitoring agent is switched from the working state to the fault upgrading state, the second monitoring agent in the idle state executes the monitoring task that the first monitoring agent needs to execute.
Therefore, regarding the determination of the second monitoring agent, in a possible implementation manner, if it is detected in S203 that there is a first monitoring agent that is switched from the working state to the fault upgrade state, the determining of the second monitoring agent from the monitoring agents currently in the idle state specifically includes:
if detecting that a first monitoring agent which is switched from a working state to a fault upgrading state exists, detecting whether a monitoring agent which is currently in an idle state exists in each monitoring agent corresponding to the object to be monitored;
if the monitoring agent exists, determining a second monitoring agent from the monitoring agents in the idle state at present;
if the monitoring agent does not exist, the registration of the monitoring agent is executed, and the state of the monitoring agent obtained by the registration is set to be an idle state; a second monitoring agent is determined from the monitoring agents currently in an idle state.
In practical application, monitoring agents with the number more than that of the first monitoring agents can be registered, and the state of the monitoring agents obtained through registration is set to be in an idle state; a second monitoring agent is determined from the monitoring agents currently in an idle state. Optionally, monitoring agents corresponding to the number of the first monitoring agents may be registered according to the number of the first monitoring agents, and the registered monitoring agents are directly used as second monitoring agents.
Further, regarding the determination of the status of the monitoring agent' S fault upgrade, in a possible implementation, after S202, the method further includes:
and if any monitoring agent in the working state is detected, and no monitoring data is returned within a preset time, updating the state of the monitoring agent to be a fault upgrading state.
In practical application, the monitoring agent in the fault upgrading state can be directly uninstalled. Optionally, the monitoring agent in the fault upgrade state may be repaired, the state of the monitoring agent that has completed repair is updated from the fault upgrade state to an idle state, and the monitoring agent that has not completed repair is uninstalled.
In the embodiment, whether the monitoring agent has a fault is dynamically judged by detecting whether the monitoring data is returned within the preset time of the monitoring agent, so that when the monitoring agent has the fault, the monitoring task is distributed to other monitoring agents, and the real-time and effective monitoring of the object to be monitored is realized.
Further, with respect to the upgrade of the monitoring agent, in one possible embodiment, the method further comprises:
determining a monitoring agent and an upgrading time period which need to be upgraded according to the received upgrading task;
when the upgrading time interval comes, switching the state of the monitoring agent to be upgraded into a fault upgrading state, and executing the upgrading task; and switching the state of the monitoring agent to be upgraded to an idle state until the upgrade is completed.
In practical application, the monitoring agent which is not upgraded is selected in advance to be used as the monitoring agent which needs to be upgraded. When the upgrading time period comes, the monitoring agent needing to be upgraded is in a working state, and the monitoring task of the monitoring agent needing to be upgraded can be distributed to the monitoring agent in an idle state to be executed; and switching the state of the monitoring agent to be upgraded into a fault upgrading state, and executing the upgrading task. When the upgrading time interval comes, the monitoring agent needing to be upgraded is in an idle state, the state of the monitoring agent needing to be upgraded is switched to a fault upgrading state, and the upgrading task is executed.
Optionally, the monitoring agents corresponding to the monitoring objects are upgraded in turn, and the monitoring agents which are not upgraded are set to be in an idle state; and distributing the monitoring task to the monitoring agent which is in the idle state and finishes upgrading to execute, and updating the state of the monitoring agent to be the working state. When the upgrading time period comes, the monitoring agent which is in the idle state and is not upgraded is determined to be the monitoring agent which needs to be upgraded, the state is switched to the fault upgrading state, and the upgrading task is executed.
To better understand the solution, an example is performed by combining an upgrade flow of a monitoring agent corresponding to a single object to be monitored, and fig. 4 is a schematic view of an upgrade flow of a monitoring agent provided in an embodiment of the present application. As shown in fig. 4, the upgrade process of the monitoring agent includes:
s401, receiving an upgrading task, and determining a monitoring agent needing to be upgraded and an upgrading time period;
s402, an upgrading time interval comes;
s403, judging whether upgrading is finished; if the upgrade is completed, executing S407;
s404, if the upgrade is not finished, selecting a monitoring agent which does not finish the upgrade;
s405, updating the state of the selected monitoring agent into a fault upgrading state, and executing an upgrading task;
and S406, the selected monitoring agents complete the monitoring task, and the step of executing S403 is returned until all the monitoring agents corresponding to the monitoring to be completed upgrading.
In the embodiment, when the upgrading time period comes, the monitoring agent needing to be upgraded executes the upgrading task, and meanwhile, the real-time and effective monitoring of the object to be monitored is realized.
Further, with respect to registration and offloading of monitoring agents, in one possible embodiment, the method further comprises:
monitoring the number of monitoring agents in an idle state at present;
if the number of the monitoring agents is smaller than a preset first threshold value, executing the registration of the monitoring agents, and setting the state of the monitoring agents obtained through the registration as an idle state;
and if the number of the monitoring agents is larger than a preset second threshold value, selecting a corresponding number of monitoring agents from the monitoring agents currently in the idle state and/or the fault upgrading state for unloading, wherein the first threshold value is not larger than the second threshold value.
The first threshold value is an upper limit value of the monitoring agent, and the second threshold value is a lower limit value of the monitoring agent. In practical application, the first threshold value and the second threshold value can be dynamically set according to the number of monitoring tasks of the object to be monitored, the daily workload of the object to be monitored, and the like. For example, the first threshold and the second threshold of the monitoring agent may be dynamically set according to the working states of the object to be monitored in different time periods. For example, if the object to be monitored is in the working state from 8 o 'clock to 17 o' clock, the object to be monitored is in the standby state from 17 o 'clock to the next day 8 o' clock; the first threshold of the 8 o 'clock to 17 o' clock monitoring agent may be set to 3 and the second threshold to 7, and the first threshold of the 17 o 'clock to the next day 8 o' clock monitoring agent may be set to 1 and the second threshold to 3.
It is understood that when the number of monitoring agents is greater than the predetermined second threshold, the number of monitoring agents exceeding the second threshold is calculated, and the monitoring agents in the fault upgrading state are preferentially unloaded. After all the monitoring agents in the fault upgrading state are unloaded, if the number of the monitoring agents is still larger than the second threshold value, selecting a corresponding number of the monitoring agents in the idle state for unloading.
In this embodiment, when the number of monitoring agents is smaller than the first threshold, the registration of the monitoring agents is executed; and when the number of the monitoring agents is larger than a second threshold value, selecting a corresponding number of monitoring agents from the monitoring agents currently in the idle state and/or the fault upgrading state for unloading. According to the embodiment, the number of the monitoring agents is controlled within a reasonable range, and reasonable utilization of resources is realized while effective execution of monitoring tasks is guaranteed.
In the monitoring method provided by this embodiment, the states of the monitoring agents corresponding to the object to be monitored are obtained according to a monitoring request, where the monitoring request includes the object to be monitored and a monitoring task; distributing the monitoring task to the monitoring agent in the idle state to execute, and updating the state of the monitoring agent to be the working state; if the first monitoring agent which is switched from the working state to the fault upgrading state is detected to exist, determining a second monitoring agent from the monitoring agents which are in the idle state at present, distributing the tasks which need to be executed by the first monitoring agent to the second monitoring agent to execute until the monitoring tasks are completed, and obtaining the monitoring data returned by each monitoring agent. In this embodiment, a plurality of monitoring agents are configured for each object to be monitored, and the states of the monitoring agents are maintained and managed in time during the execution process of the monitoring tasks, and if a certain monitoring agent fails or is upgraded, the corresponding monitoring task of the object to be monitored can be executed by other monitoring agents of the object to be monitored, so that when the monitoring agent fails or is upgraded, real-time and effective monitoring of the object to be monitored can be still achieved, and the monitoring reliability is improved.
Example two
Fig. 5 is a schematic flowchart of a monitoring method provided in the second embodiment of the present application, and as shown in fig. 5, S202 specifically includes:
s501, dividing the monitoring task into a plurality of subtasks according to the task type;
s502, selecting a plurality of monitoring agents with the same number as a plurality of subtasks from the monitoring agents in the idle state at present, wherein the plurality of monitoring agents correspond to the plurality of subtasks one by one;
s503, distributing each subtask to the monitoring agent corresponding to the subtask to execute, and updating the state of the monitoring agent corresponding to the subtask to be a working state.
Each subtask corresponds to a task type, for example, when the object to be monitored is a computer, the monitoring task may include: CPU utilization rate, memory utilization rate and IO interface utilization rate. The monitoring task can be divided into 3 subtasks, which are respectively: monitoring the utilization rate of a CPU, monitoring the utilization rate of a memory and monitoring the utilization rate of an IO interface.
Specifically, a plurality of monitoring agents with the same number as the plurality of subtasks are selected from the monitoring agents in the idle state at present, and the plurality of monitoring agents correspond to the plurality of subtasks one to one. For example, the monitoring task includes 3 sub-tasks: subtask 1, subtask 2 and subtask 3, select 3 monitoring agents to be: monitoring agents 1, 2 and 3; subtask 1 corresponds to monitoring agent 1, subtask 2 corresponds to monitoring agent 2, and subtask 3 corresponds to monitoring agent 3. Correspondingly, each subtask is distributed to the monitoring agent corresponding to the subtask to be executed. For example, subtask 1 is allocated to the monitoring agent 1 for execution, subtask 2 is allocated to the monitoring agent 2 for execution, and subtask 3 is allocated to the monitoring agent 3 for execution.
It can be understood that, when the first monitoring agent is used to execute the subtask, S203 specifically includes: if the first monitoring agent which is switched from the working state to the fault upgrading state is detected to exist, determining a second monitoring agent from the monitoring agents which are in the idle state at present, distributing subtasks which need to be executed by the first monitoring agent to the second monitoring agent to be executed until the monitoring tasks are completed, and obtaining monitoring data returned by each monitoring agent.
In the monitoring method provided by this embodiment, a monitoring task is divided into a plurality of subtasks according to the task type; selecting a plurality of monitoring agents with the same number as a plurality of subtasks from the monitoring agents in the idle state at present, wherein the plurality of monitoring agents correspond to the plurality of subtasks one to one; and distributing each subtask to the monitoring agent corresponding to the subtask for execution. In the embodiment, the monitoring task is divided into a plurality of subtasks, and the plurality of subtasks are distributed to a plurality of monitoring agents to be executed.
EXAMPLE III
Fig. 6 is a schematic flowchart of a monitoring method provided in the third embodiment of the present application, and as shown in fig. 6, S202 specifically includes:
s601, selecting a plurality of monitoring agents from the monitoring agents in the idle state at present;
s602, distributing the monitoring tasks to each monitoring agent of the plurality of monitoring agents to execute, and updating the states of the plurality of monitoring agents to be working states.
In this embodiment, the monitoring tasks assigned to each of the plurality of monitoring agents are the same. It can be understood that the monitoring task is distributed to each monitoring agent in the plurality of monitoring agents, and when the monitoring agent in the plurality of monitoring agents fails to complete the monitoring task, the monitoring agent in a working state can still execute the monitoring task.
Furthermore, for the processing of the monitoring data, in a possible implementation, the method further comprises:
and carrying out duplicate removal processing on the monitoring data returned by each monitoring agent.
In the present embodiment, the deduplication processing includes: time stamp comparison and information comparison. To better understand the solution, an example is performed in combination with a flow of the deduplication processing, and fig. 7 is a schematic flow diagram of the deduplication processing provided in the third embodiment of the present application. As shown in fig. 7, the deduplication processing flow includes:
and S701, acquiring monitoring data returned by the monitoring agent.
S702, comparing the timestamps of the obtained monitoring data; the timestamp comparison refers to comparing the time of the monitoring data returned by each monitoring agent, and keeping the monitoring data returned by each monitoring agent firstly.
S703, comparing the obtained monitoring data;
s704, judging whether the information is repeated; s705, if the information is repeated, deleting the repeated information; and S706, if the information is not repeated, the information is reserved.
In practical application, the information comparison refers to comparing the monitoring data returned by each monitoring agent, and deleting the monitoring data which is not in the normal range and the monitoring data with a larger difference from other monitoring data.
It can be understood that, in the case that the monitoring task is distributed to a plurality of monitoring agents to be executed, the deduplication processing can be executed when the monitoring data of the monitoring agents is received, so that the accuracy and reliability of monitoring can be ensured, and the data can be prevented from being processed repeatedly. It should be noted that, a first monitoring agent that switches from the working state to the failure upgrade state may exist in the multiple monitoring agents, and therefore, not all monitoring agents can return monitoring data necessarily, and the embodiment does not limit the monitoring agents that actually return monitoring data.
In the monitoring method provided by this embodiment, a plurality of monitoring agents are selected from the monitoring agents currently in an idle state; and allocating the monitoring task to each monitoring agent in the plurality of monitoring agents to execute. In this embodiment, the monitoring task is allocated to each monitoring agent of the multiple monitoring agents to be executed, so that it can be ensured that the monitoring data returned by the monitoring agents can still be obtained when the monitoring agents are in failure or are upgraded, real-time and effective monitoring of the object to be monitored is realized, and the monitoring reliability is improved.
Example four
Fig. 8 is a schematic structural diagram of a monitoring device according to a fourth embodiment of the present application, and as shown in fig. 8, the monitoring device includes:
the obtaining module 81 is configured to obtain, according to the monitoring request, states of the monitoring agents corresponding to the object to be monitored.
The monitoring request comprises an object to be monitored and a monitoring task, and the monitoring request represents a request for executing the corresponding monitoring task on the object to be monitored. The monitoring task refers to a monitoring instruction of the monitoring agent to the object to be monitored, and optionally, the monitoring task includes: the time at which the monitoring is performed, the type of monitoring, etc.
In this embodiment, the state of the monitoring agent is divided into: a working state, an idle state, and a fault upgrade state. The working state refers to a state that the monitoring agent is allocated with a monitoring task and is preparing to execute the monitoring task or a state that the monitoring task is being executed; the idle state refers to a state in which the monitoring agent can be used for executing the monitoring task and is not allocated with the monitoring task; the fail-over state refers to a state in which the monitoring agent cannot be used to perform the monitoring task.
And the allocating module 82 is configured to allocate the monitoring task to the monitoring agent currently in the idle state for execution, and update the state of the monitoring agent to the working state.
In one possible implementation, the assignment module 82 is specifically configured to:
dividing the monitoring task into a plurality of subtasks according to the task type;
selecting a plurality of monitoring agents with the same number as a plurality of subtasks from the monitoring agents in the idle state at present, wherein the plurality of monitoring agents correspond to the plurality of subtasks one to one;
and distributing each subtask to the monitoring agent corresponding to the subtask to execute, and updating the state of the monitoring agent corresponding to the subtask to be a working state.
Wherein each subtask corresponds to a task type. In this embodiment, the allocation module divides the monitoring task into multiple subtasks, and allocates the multiple subtasks to multiple monitoring agents for execution, which can ensure that monitoring data returned by each monitoring agent can still be obtained when the monitoring agent fails, compared with allocating the monitoring task to a single monitoring agent, thereby implementing real-time and effective monitoring of the object to be monitored.
In this embodiment, the distribution module divides the monitoring task into a plurality of subtasks, and distributes the plurality of subtasks to a plurality of monitoring agents for execution, and compared with distributing the monitoring task to a single monitoring agent, the distribution module can ensure that monitoring data returned by each monitoring agent can still be obtained when the monitoring agent fails, so that real-time and effective monitoring of the object to be monitored is realized, and the reliability of monitoring is improved.
Moreover, in a possible implementation, the assignment module 82 is specifically configured to:
selecting a plurality of monitoring agents from the monitoring agents in the idle state at present;
and allocating the monitoring task to each monitoring agent in the plurality of monitoring agents to execute, and updating the states of the plurality of monitoring agents to working states.
In this embodiment, the monitoring tasks assigned to each of the plurality of monitoring agents are the same. It can be understood that the monitoring task is distributed to each monitoring agent in the plurality of monitoring agents, and when the monitoring agent in the plurality of monitoring agents fails to complete the monitoring task, the monitoring agent in the working state can still execute the monitoring task.
In the embodiment, the distribution module distributes the monitoring task to each monitoring agent of the plurality of monitoring agents to execute, so that the monitoring data returned by the monitoring agents can be still obtained when the monitoring agents break down, real-time and effective monitoring of the object to be monitored is realized, and the monitoring reliability is improved.
Furthermore, for the processing of the monitoring data, in a possible embodiment, the apparatus further comprises:
and the duplication eliminating module is used for carrying out duplication eliminating processing on the monitoring data returned by each monitoring agent.
In this embodiment, the deduplication process includes: time stamp comparison and information comparison. The timestamp comparison refers to comparing the time of the monitoring data returned by each monitoring agent, and reserving the monitoring data returned by each monitoring agent firstly; the information comparison refers to comparing the monitoring data returned by each monitoring agent, and deleting the monitoring data which is not in the normal range and the monitoring data with larger difference with other monitoring data.
It can be understood that, in the case that the monitoring task is distributed to a plurality of monitoring agents to be executed, the deduplication processing can be executed when the monitoring data of the monitoring agents is received, so that the accuracy and reliability of monitoring can be ensured, and the data can be prevented from being processed repeatedly. It should be noted that there may be a first monitoring agent that is switched from the operating state to the fault upgrading state among the multiple monitoring agents, and therefore, not all monitoring agents can return monitoring data, and the embodiment does not limit the monitoring agents that actually return monitoring data.
And the processing module 83 is configured to determine a second monitoring agent from the monitoring agents currently in the idle state if it is detected that a first monitoring agent switched from the working state to the fault upgrading state exists, allocate a task to be executed by the first monitoring agent to the second monitoring agent, execute the task until the monitoring task is completed, and obtain monitoring data returned by each monitoring agent.
In practical application, the monitoring agent completes the monitoring task and updates the state of the monitoring agent from a working state to an idle state after returning the monitoring data. Optionally, the monitoring agent in the working state is detected, the remaining time of the current monitoring task is completed, and whether to allocate a new monitoring task to the monitoring agent is dynamically determined according to the remaining time.
According to a possible mode, after the monitoring data returned by each monitoring agent is obtained, whether the monitoring data meets the working data range of the object to be monitored or not is judged. If the monitoring data meets the working data range of the object to be monitored, storing the monitoring data; and if the monitoring data does not meet the working data range of the object to be monitored, generating alarm information and sending the alarm information to the object end to be monitored. Optionally, the obtained monitoring data may be visually displayed.
It should be understood that, in order to ensure that the monitoring task is completed, it is required to ensure that when the state of the first monitoring agent is switched from the working state to the fault upgrading state, the second monitoring agent in the idle state executes the monitoring task that the first monitoring agent needs to execute.
Thus, regarding the determination of the second monitoring agent, in a possible implementation, the processing module 83 is specifically configured to:
if detecting that a first monitoring agent which is switched from a working state to a fault upgrading state exists, detecting whether a monitoring agent which is currently in an idle state exists in each monitoring agent corresponding to the object to be monitored;
if the monitoring agent exists, determining a second monitoring agent from the monitoring agents in the idle state at present;
if the monitoring agent does not exist, the registration of the monitoring agent is executed, and the state of the monitoring agent obtained by the registration is set to be an idle state; a second monitoring agent is determined from the monitoring agents currently in an idle state.
In practical application, monitoring agents with the number more than that of the first monitoring agents can be registered, and the states of the monitoring agents obtained through registration are set to be idle states; a second monitoring agent is determined from the monitoring agents currently in an idle state. Optionally, monitoring agents corresponding to the number of the first monitoring agents may be registered according to the number of the first monitoring agents, and the registered monitoring agents are directly used as second monitoring agents.
Further, with respect to the determination of the monitoring agent fault upgrade status, in one possible embodiment, the apparatus further comprises:
and the state updating module is used for updating the state of the monitoring agent to a fault upgrading state if any monitoring agent in the working state is detected and no monitoring data is returned within a preset time.
In practical application, the monitoring agent in the failure upgrading state can be directly uninstalled. Optionally, the monitoring agent in the fault upgrade state may be repaired, the state of the monitoring agent that has completed repair is updated from the fault upgrade state to an idle state, and the monitoring agent that has not completed repair is uninstalled.
In this embodiment, the state updating module dynamically determines whether the monitoring agent fails by detecting whether monitoring data is returned within a predetermined time period of the monitoring agent, so that when the monitoring agent fails, the monitoring task is distributed to other monitoring agents, and real-time and effective monitoring of the object to be monitored is realized.
Furthermore, with respect to the upgrade of the monitoring agent, in one possible embodiment, the apparatus further comprises:
the receiving module is used for determining a monitoring agent to be upgraded and an upgrading time period according to the received upgrading task;
the upgrading module is used for switching the state of the monitoring agent to be upgraded into a fault upgrading state when the upgrading time interval comes, and executing the upgrading task; and switching the state of the monitoring agent to be upgraded to an idle state until the upgrade is completed.
In practical application, the monitoring agent which is not upgraded is selected in advance to serve as the monitoring agent which needs to be upgraded. When the upgrading time comes, the monitoring agent needing to be upgraded is in a working state, and the monitoring task of the monitoring agent needing to be upgraded can be distributed to the monitoring agent in an idle state to be executed; and switching the state of the monitoring agent to be upgraded into a fault upgrading state, and executing the upgrading task. When the upgrading time interval comes, the monitoring agent needing to be upgraded is in an idle state, the state of the monitoring agent needing to be upgraded is switched to a fault upgrading state, and the upgrading task is executed.
Optionally, the monitoring agents corresponding to the monitoring objects are upgraded in turn, and the monitoring agents which are not upgraded are set to be in an idle state; and distributing the monitoring task to the monitoring agent which is in the idle state and finishes upgrading to execute, and updating the state of the monitoring agent to be the working state. When the upgrading time interval comes, the monitoring agent which is in the idle state and is not upgraded is determined as the monitoring agent which needs to be upgraded, the state is switched to the fault upgrading state, and the upgrading task is executed.
In the embodiment, when the upgrading time period comes, the monitoring agent needing to be upgraded executes the upgrading task, and meanwhile, the real-time and effective monitoring of the object to be monitored is realized.
Further, with respect to registration and offloading of monitoring agents, in one possible embodiment, the apparatus further comprises:
the monitoring module is used for monitoring the number of monitoring agents in an idle state at present;
the registration module is used for executing the registration of the monitoring agents if the number of the monitoring agents is smaller than a preset first threshold value, and setting the state of the monitoring agents obtained through the registration as an idle state;
and the unloading module is used for selecting a corresponding number of monitoring agents from the monitoring agents in the idle state and/or the fault upgrading state for unloading if the number of the monitoring agents is larger than a preset second threshold, wherein the first threshold is not larger than the second threshold.
The first threshold value is an upper limit value of the monitoring agent, and the second threshold value is a lower limit value of the monitoring agent. In practical application, the first threshold value and the second threshold value can be dynamically set according to the number of monitoring tasks of the object to be monitored, the daily workload of the object to be monitored and the like. For example, the first threshold and the second threshold of the monitoring agent may be dynamically set according to the working states of the object to be monitored in different time periods.
It is understood that when the number of monitoring agents is greater than the predetermined second threshold, the number of monitoring agents exceeding the second threshold is calculated, and the monitoring agents in the failure upgrade state are preferentially uninstalled. After all the monitoring agents in the fault upgrading state are unloaded, if the number of the monitoring agents is still larger than the second threshold value, selecting a corresponding number of the monitoring agents in the idle state for unloading.
According to the embodiment, the number of the monitoring agents is controlled within a reasonable range, so that the monitoring tasks are effectively executed, and reasonable utilization of resources is realized.
In the monitoring device provided in this embodiment, the obtaining module obtains the states of the monitoring agents corresponding to the object to be monitored according to the monitoring request, where the monitoring request includes the object to be monitored and the monitoring task; the distribution module distributes the monitoring tasks to the monitoring agents in the idle state to execute, and updates the states of the monitoring agents to be working states; if the processing module detects that a first monitoring agent which is switched from a working state to a fault upgrading state exists, a second monitoring agent is determined from the monitoring agents which are in the idle state at present, the tasks which need to be executed by the first monitoring agent are distributed to the second monitoring agent to be executed until the monitoring tasks are completed, and monitoring data returned by each monitoring agent are obtained. In this embodiment, a plurality of monitoring agents are configured for each object to be monitored, and the states of the monitoring agents are maintained and managed in time during the execution process of the monitoring tasks, and if a certain monitoring agent fails or is upgraded, the corresponding monitoring task of the object to be monitored can be executed by other monitoring agents of the object to be monitored, so that when the monitoring agent fails or is upgraded, real-time and effective monitoring of the object to be monitored can be still achieved, and the monitoring reliability is improved.
EXAMPLE five
Fig. 9 is a schematic structural diagram of an electronic device provided in a fifth embodiment of the present application, and as shown in fig. 9, the electronic device includes:
a processor (processor) 91, the electronic device further comprising a memory (memory) 92; a Communication Interface 93 and a bus 94 may also be included. The processor 91, the storage 92, and the communication interface 93 may communicate with each other through a bus 94. Communication interface 93 may be used for information transfer. Processor 91 may call logic instructions in storage 94 to perform the methods of the embodiments described above.
Furthermore, the logic instructions in the memory 92 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product.
The memory 92 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, such as program instructions/modules corresponding to the methods in the embodiments of the present application. The processor 91 executes the software programs, instructions and modules stored in the memory 92 to execute functional applications and data processing, i.e. to implement the methods in the above-described method embodiments.
The memory 92 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, memory 92 may include high speed random access memory and may also include non-volatile memory.
The present application provides a non-transitory computer-readable storage medium, in which computer-executable instructions are stored, and when executed by a processor, the computer-executable instructions are used to implement the method according to the foregoing embodiments.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method of monitoring, comprising:
acquiring the state of each monitoring agent corresponding to an object to be monitored according to a monitoring request, wherein the monitoring request comprises the object to be monitored and a monitoring task;
distributing the monitoring task to a monitoring agent in an idle state to execute, and updating the state of the monitoring agent to be a working state;
if the first monitoring agent which is switched from the working state to the fault upgrading state is detected to exist, a second monitoring agent is determined from the monitoring agents in the idle state at present, and the tasks which need to be executed by the first monitoring agent are distributed to the second monitoring agent to be executed until the monitoring tasks are completed, so that the monitoring data returned by each monitoring agent are obtained.
2. The method of claim 1, wherein assigning the monitoring task to a monitoring agent currently in an idle state comprises:
dividing the monitoring task into a plurality of subtasks according to the task type;
selecting a plurality of monitoring agents with the same number as the plurality of subtasks from the monitoring agents in the idle state at present, wherein the plurality of monitoring agents correspond to the plurality of subtasks one to one;
and distributing each subtask to a monitoring agent corresponding to the subtask for execution.
3. The method of claim 1, wherein assigning the monitoring task to a monitoring agent currently in an idle state comprises:
selecting a plurality of monitoring agents from the monitoring agents in the idle state at present;
and distributing the monitoring task to each monitoring agent in the plurality of monitoring agents to execute.
4. The method of claim 3, further comprising:
and carrying out duplicate removal processing on the monitoring data returned by each monitoring agent.
5. The method of claim 1, wherein determining a second monitoring agent from the monitoring agents currently in the idle state if the presence of the first monitoring agent is detected to switch from the working state to the failure upgrade state comprises:
if detecting that a first monitoring agent which is switched from a working state to a fault upgrading state exists, detecting whether a monitoring agent which is currently in an idle state exists in each monitoring agent corresponding to the object to be monitored;
if the monitoring agent exists, determining a second monitoring agent from the monitoring agents in the idle state at present;
if the monitoring agent does not exist, the registration of the monitoring agent is executed, and the state of the monitoring agent obtained by the registration is set to be an idle state; a second monitoring agent is determined from the monitoring agents currently in an idle state.
6. The method according to claims 1-5, wherein after allocating the monitoring task to the monitoring agent currently in the idle state for execution and updating the state of the monitoring agent to the working state, the method further comprises:
and if any monitoring agent in the working state is detected, and no monitoring data is returned within a preset time, updating the state of the monitoring agent to be a fault upgrading state.
7. The method of claims 1-5, further comprising:
determining a monitoring agent and an upgrading time period which need to be upgraded according to the received upgrading task;
when the upgrading time interval comes, switching the state of the monitoring agent to be upgraded into a fault upgrading state, and executing the upgrading task; and switching the state of the monitoring agent to be upgraded to an idle state until the upgrade is completed.
8. The method according to any one of claims 1-5, further comprising:
monitoring the number of monitoring agents in an idle state at present;
if the number is smaller than a preset first threshold value, executing the registration of the monitoring agents, and setting the state of the monitoring agents obtained through the registration as an idle state;
and if the number is larger than a preset second threshold value, selecting a corresponding number of monitoring agents from the monitoring agents in the idle state and/or the fault upgrading state for unloading, wherein the first threshold value is not larger than the second threshold value.
9. A monitoring device, comprising:
the system comprises an acquisition module, a monitoring module and a processing module, wherein the acquisition module is used for acquiring the state of each monitoring agent corresponding to an object to be monitored according to a monitoring request, and the monitoring request comprises the object to be monitored and a monitoring task;
the distribution module is used for distributing the monitoring task to the monitoring agent in the idle state to execute, and updating the state of the monitoring agent to be a working state;
and the processing module is used for determining a second monitoring agent from the monitoring agents in the idle state at present and distributing the tasks to be executed by the first monitoring agent to the second monitoring agent for execution until the monitoring tasks are completed and acquiring the monitoring data returned by each monitoring agent if the first monitoring agent switched from the working state to the fault upgrading state is detected to exist.
10. The apparatus of claim 9, wherein the processing module is specifically configured to:
if detecting that a first monitoring agent which is switched from a working state to a fault upgrading state exists, detecting whether a monitoring agent which is currently in an idle state exists in each monitoring agent corresponding to the object to be monitored;
if the monitoring agent exists, determining a second monitoring agent from the monitoring agents in the idle state at present;
if the monitoring agent does not exist, the registration of the monitoring agent is executed, and the state of the monitoring agent obtained by the registration is set to be an idle state; a second monitoring agent is determined from the monitoring agents currently in an idle state.
CN202211151848.5A 2022-09-21 2022-09-21 Monitoring method, monitoring device, electronic equipment and storage medium Active CN115514624B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211151848.5A CN115514624B (en) 2022-09-21 2022-09-21 Monitoring method, monitoring device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211151848.5A CN115514624B (en) 2022-09-21 2022-09-21 Monitoring method, monitoring device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115514624A true CN115514624A (en) 2022-12-23
CN115514624B CN115514624B (en) 2024-04-30

Family

ID=84504477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211151848.5A Active CN115514624B (en) 2022-09-21 2022-09-21 Monitoring method, monitoring device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115514624B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102856971A (en) * 2011-06-28 2013-01-02 中兴通讯股份有限公司 Direct-current power supply system and method for implementing multi-machine monitoring
CN104991821A (en) * 2015-06-29 2015-10-21 北京奇虎科技有限公司 Monitor task batch processing method and apparatus
CN106657212A (en) * 2016-09-07 2017-05-10 深圳怡化电脑股份有限公司 Self-service terminal state monitoring method and system
CN109343939A (en) * 2018-07-31 2019-02-15 国家电网有限公司 A kind of distributed type assemblies and parallel computation method for scheduling task
CN110321265A (en) * 2019-05-09 2019-10-11 苏州浪潮智能科技有限公司 A kind of server monitoring managing device, method and system
CN114201449A (en) * 2021-12-13 2022-03-18 网易(杭州)网络有限公司 Log monitoring method and device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102856971A (en) * 2011-06-28 2013-01-02 中兴通讯股份有限公司 Direct-current power supply system and method for implementing multi-machine monitoring
CN104991821A (en) * 2015-06-29 2015-10-21 北京奇虎科技有限公司 Monitor task batch processing method and apparatus
CN106657212A (en) * 2016-09-07 2017-05-10 深圳怡化电脑股份有限公司 Self-service terminal state monitoring method and system
CN109343939A (en) * 2018-07-31 2019-02-15 国家电网有限公司 A kind of distributed type assemblies and parallel computation method for scheduling task
CN110321265A (en) * 2019-05-09 2019-10-11 苏州浪潮智能科技有限公司 A kind of server monitoring managing device, method and system
CN114201449A (en) * 2021-12-13 2022-03-18 网易(杭州)网络有限公司 Log monitoring method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN115514624B (en) 2024-04-30

Similar Documents

Publication Publication Date Title
CN106789362B (en) Equipment management method and network management system
CN109669762B (en) Cloud computing resource management method, device, equipment and computer readable storage medium
US8191069B2 (en) Method of monitoring performance of virtual computer and apparatus using the method
CN108717379B (en) Electronic device, distributed task scheduling method and storage medium
US20100058342A1 (en) Provisioning system, method, and program
CN111274033B (en) Resource deployment method, device, server and storage medium
CN106790092B (en) Remote procedure call server control system and method
CN103685459A (en) Distributed system, server computer, distributed management server, and failure prevention method
CN107168777B (en) Method and device for scheduling resources in distributed system
CN111045811A (en) Task allocation method and device, electronic equipment and storage medium
CN110971480A (en) Computer network condition monitoring method and device, computer equipment and storage medium
CN115509676A (en) Container set deployment method and device
CN107645396B (en) Cluster capacity expansion method and device
CN111784185A (en) Distributed power distribution communication network timed task scheduling system
CN115514624B (en) Monitoring method, monitoring device, electronic equipment and storage medium
CN113783712A (en) Default gateway management method, gateway manager, server and storage medium
CN115794306A (en) Resource allocation method and device based on preemption instance, electronic equipment and medium
CN112035579A (en) Graph management method, data storage method, data query method, device and storage medium
CN103139066B (en) A kind of changing method of resource, main control device and node device
CN115438021A (en) Resource allocation method and device for database server
CN103914339A (en) Server management system and server management method
CN114172903A (en) Node capacity expansion method, device, equipment and medium of slarm scheduling system
CN110809130B (en) Method and apparatus for allocating storage devices
KR102405933B1 (en) Platform system and method for managing execution of machine learning based on learning
CN116302456B (en) Meta universe computing resource scheduling system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant