CN111506480A - State detection method, device and system for components in cluster - Google Patents

State detection method, device and system for components in cluster Download PDF

Info

Publication number
CN111506480A
CN111506480A CN202010327466.8A CN202010327466A CN111506480A CN 111506480 A CN111506480 A CN 111506480A CN 202010327466 A CN202010327466 A CN 202010327466A CN 111506480 A CN111506480 A CN 111506480A
Authority
CN
China
Prior art keywords
component
monitored
monitoring tool
cluster
identifier
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
CN202010327466.8A
Other languages
Chinese (zh)
Other versions
CN111506480B (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.)
Shanghai Dameng Database Co Ltd
Original Assignee
Shanghai Dameng Database Co Ltd
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 Shanghai Dameng Database Co Ltd filed Critical Shanghai Dameng Database Co Ltd
Priority to CN202010327466.8A priority Critical patent/CN111506480B/en
Publication of CN111506480A publication Critical patent/CN111506480A/en
Application granted granted Critical
Publication of CN111506480B publication Critical patent/CN111506480B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The embodiment of the invention discloses a method, a device and a system for detecting the state of a component in a cluster. The method comprises the following steps: the method comprises the steps that a main monitoring tool obtains component identification of a component to be monitored in a cluster; and the master monitoring tool controls a slave monitoring tool to detect the running state of the component to be monitored based on the component identifier, and the slave monitoring tool and the component to be monitored are installed in the same node of the cluster. By adopting the technical scheme, the operation state of the component to be monitored is detected by the slave monitoring tool which is arranged in the same node with the component to be monitored, and the operation state of the component to be monitored does not need to be detected by the component to be monitored, so that the load of the component to be monitored can be reduced, the operation speed of the component to be monitored is increased, the response speed of the component to be monitored is increased, and the waiting time of a user is shortened.

Description

State detection method, device and system for components in cluster
Technical Field
The present invention relates to the field of cluster monitoring technologies, and in particular, to a method, an apparatus, and a system for detecting a state of a component in a cluster.
Background
When a multi-node cluster is used for providing services, components installed on each node of the multi-node cluster need to be monitored.
When monitoring each component, it is necessary to acquire the operating state information of each component. In the prior art, when obtaining the running state information of each component, each component is usually required to collect the running state information of itself and send the collected running state information to a central component in a multi-node cluster, so that a monitoring tool can obtain the running state information of each component from the central component.
However, in the conventional method for acquiring the running state information, each component needs to additionally implement a function of collecting the running state information required by the monitoring tool in addition to implementing the related functions of the multi-node cluster, which increases the burden of each component, and thus the running speed of each component is reduced when the component implements its own function, and it takes a long time to implement the function of each component itself.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, and a system for detecting a state of a component in a cluster, so as to reduce a load of each component in a multi-node cluster and improve an operation speed of each component when implementing a function of the component.
In a first aspect, an embodiment of the present invention provides a method for detecting a state of a component in a cluster, where the method includes:
the method comprises the steps that a main monitoring tool obtains component identification of a component to be monitored in a cluster;
and the master monitoring tool controls a slave monitoring tool to detect the running state of the component to be monitored based on the component identifier, and the slave monitoring tool and the component to be monitored are installed in the same node of the cluster.
Further, the acquiring, by the master monitoring tool, the component identifier of the component to be monitored in the cluster includes: the main monitoring tool sends an identification query request to a central component of the cluster; and when receiving the identifier query request, the central component acquires the component identifier of the component to be monitored, which is stored in the central node provided with the central component, and sends the component identifier to the main monitoring tool, so that the main monitoring tool acquires the component identifier.
Further, the method for detecting the state of the component in the cluster further includes: after the components to be monitored in the cluster are started, the component identifiers of the components are obtained and sent to the central component for storage.
Further, the controlling, by the master monitoring tool, the slave monitoring tool to detect the operating state of the component to be monitored based on the component identifier includes: the master monitoring tool determines the IP address of a node to be monitored, on which the component to be monitored is installed, according to the component identifier, and sends a state detection instruction to a slave monitoring tool installed on the node to be monitored based on the IP address, wherein the state detection instruction carries the component identifier; and the slave monitoring tool acquires the running state information of the component to be monitored according to the component identifier and sends the running state information to the main monitoring tool, so that the main monitoring tool determines the running state of the component to be monitored.
Further, after the master monitoring tool controls the slave monitoring tool to detect the operating state of the component to be monitored based on the component identifier, the method further includes: and the main monitoring tool controls the component to be monitored according to the running state.
In a second aspect, an embodiment of the present invention provides a device for detecting a state of a component in a cluster, where the device includes:
the identification acquisition module is used for acquiring the component identification of the component to be monitored in the cluster;
and the component control module is used for controlling a slave monitoring tool to detect the running state of the component to be monitored based on the component identifier, and the slave monitoring tool and the component to be monitored are installed in the same node of the cluster.
Further, the identification acquisition module comprises: a request sending unit, configured to send an identifier query request to a central component of a cluster; and the identification acquisition unit is used for acquiring the component identification of the component to be monitored, which is stored in the central node provided with the central component, when the identification query request is received, and sending the component identification to a main monitoring tool so that the main monitoring tool acquires the component identification.
Further, the apparatus for detecting the state of the components in the cluster further includes: and the identification sending module is used for acquiring the component identification of the component after the component to be monitored is started, and sending the component identification to the central component for storage.
Further, the component control module includes: the instruction sending unit is used for determining the IP address of the node to be monitored, on which the component to be monitored is installed, according to the component identifier, and sending a state detection instruction to a slave monitoring tool installed on the node to be monitored based on the IP address, wherein the state detection instruction carries the component identifier; and the information acquisition unit is used for acquiring the running state information of the component to be monitored according to the component identifier and sending the running state information to a main monitoring tool so that the main monitoring tool determines the running state of the component to be monitored.
Further, the apparatus for detecting the state of the components in the cluster further includes: and the component control module is used for controlling the component to be monitored according to the running state after the master monitoring tool controls the slave monitoring tool to detect the running state of the component to be monitored based on the component identifier.
In a third aspect, an embodiment of the present invention further provides a system for detecting a state of a component in a cluster, where the system includes a monitoring device and a multi-node cluster, the monitoring device is provided with a main monitoring tool, the multi-node cluster includes at least one node to be monitored, and the node to be monitored is provided with at least one component to be monitored, where the monitoring device is connected to the node to be monitored, and is configured to obtain a component identifier of the component to be monitored, and control the node to be monitored to detect an operating state of the component to be monitored based on the component identifier.
In the above technical solution for detecting the state of the component in the cluster, the master monitoring tool obtains the component identifier of the component to be monitored in the cluster, and controls the slave monitoring tool to detect the operating state of the component to be monitored according to the component identifier. By adopting the technical scheme, the operation state of the component to be monitored is detected by the slave monitoring tool which is arranged in the same node with the component to be monitored, and the operation state of the component to be monitored does not need to be detected by the component to be monitored, so that the load of the component to be monitored can be reduced, the operation speed of the component to be monitored is increased, the response speed of the component to be monitored is increased, and the waiting time of a user is shortened.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 is a schematic flowchart of a method for detecting a state of a component in a cluster according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for detecting a state of a component in a cluster according to a second embodiment of the present invention;
fig. 3 is a data flow chart of a method for detecting a state of a component in a cluster according to a second embodiment of the present invention;
fig. 4 is a block diagram of a structure of a device for detecting states of components in a cluster according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a state detection system for components in a cluster according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings. In addition, the embodiments and features of the embodiments of the present invention may be combined with each other without conflict
Example one
The embodiment of the invention provides a method for detecting the state of a component in a cluster. The method may be performed by a state detection apparatus of a component in a cluster, which may be implemented by software and/or hardware, and may be generally integrated in a state detection system of a component in a cluster. Fig. 1 is a schematic flowchart of a method for detecting a state of a component in a cluster according to an embodiment of the present invention, where as shown in fig. 1, the method includes:
s110, the main monitoring tool obtains the component identification of the component to be monitored in the cluster.
In this step, the master monitoring tool may obtain the component identification of the component to be monitored from the central component of the cluster, the component to be monitored, or from the monitoring tool. The master monitoring tool may be specifically understood as a program for monitoring a component to be monitored in a cluster, and may be installed on a monitoring device, where the monitoring device may be a node in the cluster (i.e., a device in the cluster) or may be another device independent of the cluster. The component to be monitored can be understood as a component to be monitored in the cluster, the component may specifically be a program installed on each node in the cluster, and the component to be monitored of the cluster may include all or part of the components in the cluster, that is, the main monitoring tool may monitor the operating states of all the components in the cluster, or may monitor only the operating states of part of the components marked as the component to be monitored in the cluster, and may specifically be set by a worker. The component identifier of the component to be monitored may be specifically understood as identification information capable of uniquely determining the component to be monitored, and may be a process ID of an operating process of an operating system corresponding to the component to be monitored, or a service name of a service provided by the component to be monitored, and the like, which is not limited in this embodiment.
For example, after the component to be monitored in the cluster is started, the component identifier of the component to be monitored can be actively sent to the central component in the cluster; the central component receives and records the component identifier sent by the component to be monitored, and actively sends the component identifier to the main monitoring tool, or the main monitoring tool sends an identifier query request to the central component, and the central component sends the component identifier of the component to be monitored to the main monitoring tool after receiving the identifier query request sent by the main monitoring tool. Or after the component to be monitored is started, the IP address of the monitoring device provided with the main monitoring tool can be acquired, and the component to be monitored actively sends the component identifier of the component to the main monitoring device by communicating with the monitoring device according to the IP address. Or, the slave monitoring tool may periodically detect whether a new component to be monitored is started on the node, and when detecting that a new node to be monitored is started on the node, obtain a component identifier of the newly started component to be monitored, and send the component identifier to the master monitoring tool according to the IP address of the monitoring device.
And S120, the master monitoring tool controls a slave monitoring tool to detect the running state of the component to be monitored based on the component identifier, and the slave monitoring tool and the component to be monitored are installed in the same node of the cluster.
In this embodiment, the slave monitoring tool may specifically be understood as a program for detecting an operating state of a component to be monitored on the node, and may be an auxiliary tool corresponding to the master monitoring tool, or may also be a third-party tool installed on the node, that is, in this embodiment, the master monitoring tool may detect the operating state of the component to be monitored through the auxiliary tool corresponding to the master monitoring tool, and may also be compatible with other third-party tools having a monitoring function, and detect the operating state of the component to be monitored by calling the third-party tool installed on the node and having the monitoring function.
For example, when the operating state of the component to be monitored needs to be detected, the master monitoring tool may generate a state detection instruction carrying a component identifier of the component to be monitored, whose operating state needs to be detected at this time, for indicating the detection of the slave monitoring tool or periodically detecting the operating state of the component to be monitored, and send the state detection instruction to the slave monitoring tool; correspondingly, the slave monitoring tool determines the component to be monitored, which needs to detect the running state of the component, in the installed node according to the component identifier carried in the state detection instruction, detects the running state of the component to be monitored, namely, obtains the running state information of the component to be monitored, and sends the running state information to the master monitoring tool, so that the master monitoring tool can determine the running state of the component to be monitored according to the running state information sent by the slave monitoring tool. Wherein the slave monitoring tool can be installed on each node of the cluster; the operation state information may include a performance index of the component to be monitored and/or state information of the component to be monitored, the performance index may include a CPU, a memory, and/or a disk and the like occupied by the component to be monitored, and the state information includes start-up and shut-down of the component to be monitored.
In a preferred implementation manner of this embodiment, after the master monitoring tool controls the slave monitoring tool to detect the operating state of the component to be monitored based on the component identifier, the method further includes: and the main monitoring tool controls the component to be monitored according to the running state. Specifically, after determining the running state of the component to be monitored, the main monitoring tool can further control the component to be monitored according to the running state of the component to be monitored, and if the running state of the component to be monitored is an abnormal state, the main monitoring tool gives an alarm and closes the component to be monitored; for another example, whether each performance index of the component to be monitored is within a normal range is determined, and when it is determined that the performance index is not within the normal range, the component to be monitored is correspondingly controlled, for example, when the component occupies too much certain resource (such as a CPU, a memory, or a disk) and the utilization rate of the resource reaches a maximum utilization rate threshold, the occupation of the component to be monitored on the corresponding resource is reduced or the unimportant component to be monitored is closed, or when the component to be monitored is already in a closed state, the occupation of each of the above resources by the component to be monitored is released, and the like, which can be specifically set according to needs.
In the method for detecting the state of the component in the cluster provided by the embodiment of the invention, the master monitoring tool acquires the component identifier of the component to be monitored in the cluster, and controls the slave monitoring tool to detect the running state of the component to be monitored according to the component identifier. By adopting the technical scheme, the operation state of the component to be monitored is detected by the slave monitoring tool which is installed in the same node with the component to be monitored, the operation state of the component to be monitored does not need to be detected by the component to be monitored, the burden of the component to be monitored can be reduced, the operation speed of the component to be monitored is increased, the response speed of the component to be monitored is increased, and the waiting time of a user is shortened.
Example two
Fig. 2 is a schematic flowchart of a cluster gradual state detection method according to a second embodiment of the present invention. On the basis of the foregoing embodiment, this embodiment optimizes "the main monitoring tool obtains the component identifier of the component to be monitored in the cluster" to: the main monitoring tool sends an identification query request to a central component of the cluster; and when receiving the identifier query request, the central component acquires the component identifier of the component to be monitored, which is stored in the central node provided with the central component, and sends the component identifier to the main monitoring tool, so that the main monitoring tool receives the component identifier.
Further, the method for detecting the state of the component in the cluster provided by this embodiment further includes: after the components to be monitored in the cluster are started, the component identifiers of the components are obtained and sent to the central component for storage.
Further, "the master monitoring tool controls the slave monitoring tool to detect the operating state of the component to be monitored based on the component identifier" may be optimized to "the master monitoring tool determines, according to the component identifier, an IP address of a node to be monitored on which the component to be monitored is installed, and sends a state detection instruction to the slave monitoring tool installed on the node to be monitored based on the IP address, where the state detection instruction carries the component identifier; the slave monitoring tool acquires the running state information of the component to be monitored according to the component identifier and sends the running state information to the master monitoring tool, so that the master monitoring tool determines the running state of the component to be monitored "
Correspondingly, as shown in fig. 2, the method for detecting the state of the component in the cluster provided by this embodiment includes:
s210, after the components to be monitored in the cluster are started, the component identifiers of the components are obtained and sent to the central component for storage.
In this embodiment, taking the component identifier of the component to be monitored as the process ID of the process run by the operating system corresponding to the component to be monitored as an example, after the component to be monitored in the cluster is started, the process corresponding to the component to be monitored may be first located according to the correspondence between each component and each process recorded in the node to be monitored where the component to be monitored is installed, and the process ID of the process is obtained as the component identifier of the process itself; then, according to the IP address of the central node and/or the identification of the central component, which is recorded in the cluster of the nodes to be monitored, of the central component, the communication connection is established with the central component on the central node, and the identification of the central component is sent to the central component based on the communication connection. Therefore, after receiving the component identifier sent by the component to be monitored, the central component can store the component identifier in the central node so as to be acquired by the main monitoring tool.
S220, the main monitoring tool sends an identification query request to the central component of the cluster.
And S230, when receiving the identifier query request, the central component acquires the component identifier of the component to be monitored, which is stored in the central node provided with the central component, and sends the component identifier to the main monitoring tool, so that the main monitoring tool receives the component identifier.
For example, the monitoring device installed with the main monitoring tool may locally store an IP address of a central node in the cluster, and when the main monitoring tool needs to detect the operating state of the component to be monitored, the main monitoring tool generates an identifier query request, establishes communication connection with the central node according to the IP address of the central node, and sends the generated identifier query request to the central node; correspondingly, after receiving the identifier query request sent by the main monitoring tool, the central component can acquire the component identifier of each component to be monitored, which is stored in the central node, generate response information carrying the component identifier of each component to be monitored, and send the response information to the main monitoring tool through the communication connection established between the central component and the monitoring equipment; therefore, the main monitoring tool analyzes the received response information, and the component identification of the component to be monitored in the cluster can be obtained. The identification query request can be used for acquiring the component identifications of all components to be monitored in the cluster.
S240, the main monitoring tool determines the IP address of the node to be monitored, on which the component to be monitored is installed, according to the component identifier, and sends a state detection instruction to a secondary monitoring tool installed on the node to be monitored based on the IP address, wherein the state detection instruction carries the component identifier.
And S250, the slave monitoring tool acquires the running state information of the component to be monitored according to the component identifier and sends the running state information to the main monitoring tool, so that the main monitoring tool determines the running state of the component to be monitored.
Illustratively, a master monitoring tool acquires an IP address of a node to be monitored, on which a component to be monitored is installed, according to a component identifier of the component to be monitored, establishes communication connection with the node to be monitored according to the IP address of the node to be monitored, generates a state detection instruction carrying the component identifier of the component to be monitored, and sends the state detection instruction to a slave monitoring tool installed on the node to be monitored through the established communication connection; correspondingly, after receiving the state detection instruction sent by the master monitoring tool, the slave monitoring tool analyzes the received state detection instruction to obtain the component identifier of the component to be monitored, obtains the running state information of the component to be monitored corresponding to the component identifier, and sends the obtained running state information to the master monitoring tool through the established communication connection, so that the master monitoring tool determines the running state of the component to be monitored according to the running state information sent by the slave monitoring tool.
The method for acquiring the running state information of the component to be monitored can be selected as required, for example, the slave monitoring tool can firstly determine the process ID of the process corresponding to the component to be monitored in the operating system of the node to be monitored according to the component identifier of the component to be monitored, and then query the process information of the process corresponding to the component to be monitored by using the process monitoring command of the operating system of the node to be monitored, such as the ps command of the linux system, so as to obtain the running state information of the monitoring component.
Taking a third-party tool installed in each node of the cluster as a slave monitoring tool as an example, please refer to fig. 3 (only one component to be monitored on a node to be monitored is shown in the figure), a data flow process of the method for detecting the state of the component in the cluster provided in this embodiment may be: when the component to be monitored is started, positioning the process corresponding to the operating system, and sending the process identifier of the process as the component identifier of the process to the central component for storage; the main monitoring tool queries the component identifier of the component to be monitored in the cluster through the central component, namely the central component sends the component identifier of the component to be monitored, which is stored in the central node, to the main monitoring tool when the main monitoring tool queries the identifier; when the main monitoring tool needs to detect the running state of the component to be monitored, the main monitoring tool sends the component identification of the component to be monitored to a third-party tool; correspondingly, after receiving the component identifier sent by the main monitoring tool, the third-party tool acquires the running state information of the component to be monitored corresponding to the received component identifier, and sends the running state information to the main monitoring tool.
In the method for detecting the state of the component in the cluster provided by the second embodiment of the present invention, after the component to be monitored in the cluster is started, the component identifier of the component to be monitored is obtained and sent to the central component for storage; the main monitoring tool sends an identification query request to the central component; when receiving an identification query request sent by a main monitoring tool, the central component sends a stored component identification of the component to be monitored to the main monitoring tool; the method comprises the steps that a main monitoring tool determines the IP address of a node to be monitored, which is provided with a component to be monitored, according to a component identifier of the component to be monitored, and sends a state detection instruction carrying the component identifier of the component to be monitored to a secondary monitoring tool on the node to be monitored based on the IP address; and the slave monitoring tool on the equipment to be monitored acquires the running state information of the component to be monitored according to the component identifier carried in the state detection instruction, and sends the running state information to the master monitoring tool. By adopting the technical scheme, the component identifier of the component to be monitored is sent to the central node when the component to be monitored is started, so that the main monitoring tool can accurately position the component to be monitored without inputting information such as the operation mode, the operation parameters and the like of the component to be monitored by a user, manpower consumed in the component state detection process in a cluster can be reduced, and the state detection speed of the component to be monitored is further improved.
EXAMPLE III
The third embodiment of the invention provides a state detection device for components in a cluster. The device can be realized by software and/or hardware, can be generally integrated in a state detection system of the components in the cluster, and can detect the running state of the components in the cluster by executing a state detection method of the components in the cluster. Fig. 4 is a block diagram of a structure of a device for detecting states of components in a cluster according to a third embodiment of the present invention, and as shown in fig. 4, the device includes an identifier obtaining module 301 and a component control module 302, where,
an identifier obtaining module 301, configured to obtain a component identifier of a component to be monitored in a cluster;
a component control module 302, configured to control a slave monitoring tool to detect an operating state of the component to be monitored based on the component identifier, where the slave monitoring tool and the component to be monitored are installed in a same node of the cluster.
In the state detection apparatus for a component in a cluster provided in the third embodiment of the present invention, the identifier obtaining module obtains the identifier of the component to be monitored in the cluster, and the component control module controls the slave monitoring tool to detect the operating state of the component to be monitored according to the identifier of the component. By adopting the technical scheme, the operation state of the component to be monitored is detected by the slave monitoring tool which is installed in the same node with the component to be monitored, the operation state of the component to be monitored does not need to be detected by the component to be monitored, the burden of the component to be monitored can be reduced, the operation speed of the component to be monitored is increased, the response speed of the component to be monitored is increased, and the waiting time of a user is shortened.
In the foregoing solution, the identifier obtaining module 301 may include: a request sending unit, configured to send an identifier query request to a central component of a cluster; and the identification acquisition unit is used for acquiring the component identification of the component to be monitored, which is stored in the central node provided with the central component, when the identification query request is received, and sending the component identification to a main monitoring tool so that the main monitoring tool acquires the component identification.
Further, the apparatus for detecting the state of the components in the cluster may further include: and the identification sending module is used for acquiring the component identification of the component after the component to be monitored is started, and sending the component identification to the central component for storage.
In the above solution, the component control module 302 may include: the instruction sending unit is used for determining the IP address of the node to be monitored, on which the component to be monitored is installed, according to the component identifier, and sending a state detection instruction to a slave monitoring tool installed on the node to be monitored based on the IP address, wherein the state detection instruction carries the component identifier; and the information acquisition unit is used for acquiring the running state information of the component to be monitored according to the component identifier and sending the running state information to a main monitoring tool so that the main monitoring tool determines the running state of the component to be monitored.
Further, the apparatus for detecting the state of the components in the cluster may further include: and the component control module is used for controlling the component to be monitored according to the running state after the master monitoring tool controls the slave monitoring tool to detect the running state of the component to be monitored based on the component identifier.
The device for detecting the state of the component in the cluster provided by the third embodiment of the invention can execute the method for detecting the state of the component in the cluster provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the method for detecting the state of the component in the cluster. For details of the technique not described in detail in this embodiment, reference may be made to a method for detecting a state of a component in a cluster according to any embodiment of the present invention.
Example four
The fourth embodiment of the invention provides a state detection system for components in a cluster. The system may be used to detect the operational status of components in a cluster. Fig. 5 is a block diagram of a state detection system for components in a cluster according to a fourth embodiment of the present invention, and as shown in fig. 5, the system includes a monitoring device 1 and a multi-node cluster 2, a main monitoring tool is installed on the monitoring device 1, the multi-node cluster 2 includes at least one node 21 to be monitored, at least one component to be monitored is installed on the node 21 to be monitored, where,
the monitoring device 1 is connected to the node to be monitored 21, and is configured to acquire a component identifier of the component to be monitored, and control the node to be monitored 21 to detect an operating state of the component to be monitored based on the component identifier.
Preferably, the multi-node cluster may further include a central node 22, where the central node 22 is connected to the monitoring device 1, and is configured to, when receiving an identifier query request sent by the monitoring device 1, obtain a component identifier of a component to be monitored, which is stored in the node, and send the component identifier to the monitoring device 1, so that the monitoring device 1 obtains the component identifier; accordingly, the monitoring device 1 is configured to send an identification query request to the central node 22 of the cluster.
Preferably, the node to be monitored 21 may also be configured to obtain a component identifier of the component to be monitored after the component to be monitored installed in the node is started, and send the component identifier to the central node 22 for storage.
Preferably, the monitoring device 1 may be specifically configured to determine, according to the component identifier, an IP address of a node 21 to be monitored, where the component to be monitored is installed, and send a state detection instruction to a slave monitoring tool installed on the node 21 to be monitored based on the IP address, where the state detection instruction carries the component identifier; correspondingly, the node to be monitored 21 may be specifically configured to obtain the running state information of the component to be monitored according to the component identifier, and send the running state information to the monitoring device 1, so that the monitoring device 1 determines the running state of the component to be monitored.
Preferably, the monitoring device 1 may be further configured to control the component to be monitored according to the operating state.
In the state detection system for the components in the cluster provided by the fourth embodiment of the present invention, the slave monitoring tool installed in the same node as the component to be monitored detects the operating state of the component to be monitored, and the component to be monitored does not need to detect the operating state of the component itself, so that the load of the component to be monitored can be reduced, the operating speed of the component to be monitored can be increased, the response speed of the component to be monitored can be increased, and the waiting time of a user can be reduced.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for detecting the state of a component in a cluster is characterized by comprising the following steps:
the method comprises the steps that a main monitoring tool obtains component identification of a component to be monitored in a cluster;
and the master monitoring tool controls a slave monitoring tool to detect the running state of the component to be monitored based on the component identifier, and the slave monitoring tool and the component to be monitored are installed in the same node of the cluster.
2. The method of claim 1, wherein the acquiring, by the master monitoring tool, the component identifier of the component to be monitored in the cluster comprises:
the main monitoring tool sends an identification query request to a central component of the cluster;
and when receiving the identifier query request, the central component acquires the component identifier of the component to be monitored, which is stored in the central node provided with the central component, and sends the component identifier to the main monitoring tool, so that the main monitoring tool acquires the component identifier.
3. The method of claim 2, further comprising:
after the components to be monitored in the cluster are started, the component identifiers of the components are obtained and sent to the central component for storage.
4. The method of claim 1, wherein the master monitoring tool controls a slave monitoring tool to detect the operating state of the component to be monitored based on the component identification, comprising:
the master monitoring tool determines the IP address of a node to be monitored, on which the component to be monitored is installed, according to the component identifier, and sends a state detection instruction to a slave monitoring tool installed on the node to be monitored based on the IP address, wherein the state detection instruction carries the component identifier;
and the slave monitoring tool acquires the running state information of the component to be monitored according to the component identifier and sends the running state information to the main monitoring tool, so that the main monitoring tool determines the running state of the component to be monitored.
5. The method according to any one of claims 1-4, wherein after the master monitoring tool controlling the slave monitoring tool detecting the operating status of the component to be monitored based on the component identification, further comprising:
and the main monitoring tool controls the component to be monitored according to the running state.
6. An apparatus for detecting a status of a component in a cluster, comprising:
the identification acquisition module is used for acquiring the component identification of the component to be monitored in the cluster;
and the component control module is used for controlling a slave monitoring tool to detect the running state of the component to be monitored based on the component identifier, and the slave monitoring tool and the component to be monitored are installed in the same node of the cluster.
7. The apparatus of claim 6, wherein the identity acquisition module comprises:
a request sending unit, configured to send an identifier query request to a central component of a cluster;
and the identification acquisition unit is used for acquiring the component identification of the component to be monitored, which is stored in the central node provided with the central component, when the identification query request is received, and sending the component identification to a main monitoring tool so that the main monitoring tool acquires the component identification.
8. The apparatus of claim 7, further comprising:
and the identification sending module is used for acquiring the component identification of the component after the component to be monitored is started, and sending the component identification to the central component for storage.
9. The apparatus of claim 6, wherein the component control module comprises:
the instruction sending unit is used for determining the IP address of the node to be monitored, on which the component to be monitored is installed, according to the component identifier, and sending a state detection instruction to a slave monitoring tool installed on the node to be monitored based on the IP address, wherein the state detection instruction carries the component identifier;
and the information acquisition unit is used for acquiring the running state information of the component to be monitored according to the component identifier and sending the running state information to a main monitoring tool so that the main monitoring tool determines the running state of the component to be monitored.
10. A state detection system for components in a cluster is characterized by comprising monitoring equipment and a multi-node cluster, wherein a main monitoring tool is installed on the monitoring equipment, the multi-node cluster comprises at least one node to be monitored, and at least one component to be monitored is installed on the node to be monitored, wherein,
the monitoring equipment is connected with the node to be monitored and used for acquiring the component identification of the component to be monitored and controlling the node to be monitored to detect the running state of the component to be monitored based on the component identification.
CN202010327466.8A 2020-04-23 2020-04-23 Method, device and system for detecting states of components in cluster Active CN111506480B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010327466.8A CN111506480B (en) 2020-04-23 2020-04-23 Method, device and system for detecting states of components in cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010327466.8A CN111506480B (en) 2020-04-23 2020-04-23 Method, device and system for detecting states of components in cluster

Publications (2)

Publication Number Publication Date
CN111506480A true CN111506480A (en) 2020-08-07
CN111506480B CN111506480B (en) 2024-03-08

Family

ID=71876352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010327466.8A Active CN111506480B (en) 2020-04-23 2020-04-23 Method, device and system for detecting states of components in cluster

Country Status (1)

Country Link
CN (1) CN111506480B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130067556A1 (en) * 2011-09-08 2013-03-14 Spencer Minear Application state sharing in a firewall cluster
CN103701661A (en) * 2013-12-23 2014-04-02 浪潮(北京)电子信息产业有限公司 Method and system for realizing node monitoring
CN106330523A (en) * 2015-07-03 2017-01-11 ***通信集团广西有限公司 Cluster server disaster recovery system and method, and server node
CN106506282A (en) * 2016-11-30 2017-03-15 国云科技股份有限公司 A kind of monitoring method for improving cloud platform monitoring performance and scale
CN107819640A (en) * 2016-09-14 2018-03-20 北京百度网讯科技有限公司 Monitoring method and device for robot operating system
CN108563550A (en) * 2018-04-23 2018-09-21 上海达梦数据库有限公司 A kind of monitoring method of distributed system, device, server and storage medium
CN109101397A (en) * 2018-08-01 2018-12-28 武汉索雅信息技术有限公司 High-Performance Computing Cluster monitoring method, unit and storage medium
CN109697153A (en) * 2018-12-28 2019-04-30 浙江省公众信息产业有限公司 Monitoring method, monitoring system and computer readable storage medium
CN109787850A (en) * 2017-11-10 2019-05-21 阿里巴巴集团控股有限公司 Monitoring system, monitoring method and calculate node
CN110048888A (en) * 2019-04-16 2019-07-23 深圳市致宸信息科技有限公司 A kind of method based on zabbix monitoring alarm, server, equipment and storage medium
CN110737566A (en) * 2019-09-17 2020-01-31 平安科技(深圳)有限公司 Host performance monitoring method and device, electronic equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130067556A1 (en) * 2011-09-08 2013-03-14 Spencer Minear Application state sharing in a firewall cluster
CN103701661A (en) * 2013-12-23 2014-04-02 浪潮(北京)电子信息产业有限公司 Method and system for realizing node monitoring
CN106330523A (en) * 2015-07-03 2017-01-11 ***通信集团广西有限公司 Cluster server disaster recovery system and method, and server node
CN107819640A (en) * 2016-09-14 2018-03-20 北京百度网讯科技有限公司 Monitoring method and device for robot operating system
CN106506282A (en) * 2016-11-30 2017-03-15 国云科技股份有限公司 A kind of monitoring method for improving cloud platform monitoring performance and scale
CN109787850A (en) * 2017-11-10 2019-05-21 阿里巴巴集团控股有限公司 Monitoring system, monitoring method and calculate node
CN108563550A (en) * 2018-04-23 2018-09-21 上海达梦数据库有限公司 A kind of monitoring method of distributed system, device, server and storage medium
CN109101397A (en) * 2018-08-01 2018-12-28 武汉索雅信息技术有限公司 High-Performance Computing Cluster monitoring method, unit and storage medium
CN109697153A (en) * 2018-12-28 2019-04-30 浙江省公众信息产业有限公司 Monitoring method, monitoring system and computer readable storage medium
CN110048888A (en) * 2019-04-16 2019-07-23 深圳市致宸信息科技有限公司 A kind of method based on zabbix monitoring alarm, server, equipment and storage medium
CN110737566A (en) * 2019-09-17 2020-01-31 平安科技(深圳)有限公司 Host performance monitoring method and device, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
R.CURRY ET AL.: "job centric cluster monitoring", 《12TH INTERNATIONAL CONFERENCE ON PARALLEL AND DISTRIBUTED SYSTEM》, 24 July 2006 (2006-07-24), pages 1 - 10 *
刘杨;肖侬;沈立;: "Xen虚拟集群监控器的设计与实现", 武汉理工大学学报, no. 20, 30 October 2010 (2010-10-30), pages 190 - 194 *
熊齐;唐佳明;: "Linux集群实时监控***的一种实现方法", 计算机***应用, no. 09, 15 September 2013 (2013-09-15), pages 52 - 55 *

Also Published As

Publication number Publication date
CN111506480B (en) 2024-03-08

Similar Documents

Publication Publication Date Title
CN108810100B (en) Method, device and equipment for electing master node
US9311163B2 (en) Configuration data management system, and configuration data management method
CN108848170B (en) Fog cluster management system and method based on nagios monitoring
CN113271541B (en) Method and device for acquiring terminal behavior data, method and device for transmitting terminal behavior data and network equipment
CN109714202A (en) A kind of client off-line reason method of discrimination and concentrating type safety management system
CN112769652B (en) Node service monitoring method, device, equipment and medium
CN113746821B (en) Intelligent device control method and device, storage medium and electronic device
CN111562889B (en) Data processing method, device, system and storage medium
CN109782695B (en) Control method, device and system for manufacturing equipment
CN115913872A (en) Server monitoring operation and maintenance method, device, equipment and medium
CN108683532B (en) Main and standby synchronization method and device
CN111506480B (en) Method, device and system for detecting states of components in cluster
KR20110066001A (en) Gateway providing resource of sensor node
CN111737028A (en) Dubbo service detection method and device
CN111371593A (en) Service deployment method, device, electronic equipment and storage medium
CN111343700A (en) Wireless sensor network communication method
CN111506422B (en) Event analysis method and system
CN111385520B (en) Automatic networking method and device of video monitoring equipment
CN116349216A (en) Edge computing method and system, edge device and control server
JP6958542B2 (en) Information processing equipment, information processing methods, information processing programs and information processing systems
CN112788153A (en) Internet of things equipment upgrade management method, device, equipment and storage medium
CN112187919A (en) Storage node management method and related device
CN111464357A (en) Resource allocation method and device
CN115865651B (en) Data acquisition method and device, electronic equipment and storage medium
CN111865639B (en) Method and device for collecting information of snmp service equipment and electronic equipment

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