CN111506480B - Method, device and system for detecting states of components in cluster - Google Patents

Method, device and system for detecting states of components in cluster Download PDF

Info

Publication number
CN111506480B
CN111506480B CN202010327466.8A CN202010327466A CN111506480B CN 111506480 B CN111506480 B CN 111506480B CN 202010327466 A CN202010327466 A CN 202010327466A CN 111506480 B CN111506480 B CN 111506480B
Authority
CN
China
Prior art keywords
component
monitored
monitoring tool
identification
cluster
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.)
Active
Application number
CN202010327466.8A
Other languages
Chinese (zh)
Other versions
CN111506480A (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

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

Abstract

The embodiment of the invention discloses a method, a device and a system for detecting the states of components in a cluster. The method comprises the following steps: the method comprises the steps that a main monitoring tool obtains a component identifier of a component to be monitored in a cluster; the master monitoring tool controls the slave monitoring tool to detect the running state of the component to be monitored based on the component identification, 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 embodiment of the invention can reduce the burden of the component to be monitored and improve the running speed of the component to be monitored by detecting the running state of the component to be monitored through the slave monitoring tool which is arranged in the same node with the component to be monitored and does not need to detect the running state of the component to be monitored, thereby improving the response speed of the component to be monitored and reducing the waiting time of users.

Description

Method, device and system for detecting states of 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 to provide services, components installed on each node of the multi-node cluster need to be monitored.
When monitoring each component, the operation state information of each component needs to be acquired. In the prior art, when acquiring the operation state information of each component, each component is generally required to collect the operation state information of itself and send the collected operation state information to a central component in a multi-node cluster, so that a monitoring tool can acquire the operation state information of each component from the central component.
However, in the existing operation state information acquisition method, each component needs to realize the function of collecting the operation state information required by the monitoring tool in addition to the related functions of the multi-node cluster, so that the burden of each component is increased, the operation speed of each component is reduced when the function of each component is realized, and the realization of the function of each component needs to take a long time.
Disclosure of Invention
In view of this, the 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 the burden of each component in a multi-node cluster, and improve the running speed of each component when implementing its own function.
In a first aspect, an embodiment of the present invention provides a method for detecting a state of a component in a cluster, including:
the method comprises the steps that a main monitoring tool obtains a component identifier of a component to be monitored in a cluster;
the master monitoring tool controls the slave monitoring tool to detect the running state of the component to be monitored based on the component identification, and the slave monitoring tool and the component to be monitored are installed in the same node of the cluster.
Further, the main monitoring tool obtains the component identifier of the component to be monitored in the cluster, including: the main monitoring tool sends an identification query request to a central component of the cluster; and when the central component receives the identification inquiry request, acquiring a component identification of the component to be monitored stored in a central node provided with the central component, and transmitting the component identification to the main monitoring tool so that the main monitoring tool acquires the component identification.
Further, the method for detecting the states of the components in the cluster further comprises the following steps: after the components to be monitored in the cluster are started, the component identification of the components is obtained, and the component identification is sent to the central component for storage.
Further, the master monitoring tool controls the slave monitoring tool to detect the operation state of the component to be monitored based on the component identification, and the method comprises the following steps: the master monitoring tool determines an IP address of a node to be monitored of the component to be monitored 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 master monitoring tool so that the master 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 operation state of the component to be monitored based on the component identification, the method further comprises: 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, including:
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 identification, 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 includes: a request sending unit, configured to send an identification query request to a central component of the cluster; the device comprises an identification acquisition unit, a main monitoring tool and a central node, wherein the identification acquisition unit is used for acquiring the component identification of the component to be monitored stored in the central node provided with the central component when receiving the identification inquiry request, and transmitting the component identification to the main monitoring tool so that the main monitoring tool acquires the component identification.
Further, the device for detecting the status of the components in the cluster further comprises: the device comprises an identification sending module, a central component and a monitoring module, wherein the identification sending module is used for obtaining 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 a node to be monitored of the component to be monitored 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; 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 the main monitoring tool so that the main monitoring tool can determine the running state of the component to be monitored.
Further, the device for detecting the status of the components in the cluster further comprises: 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, including a monitoring device and a multi-node cluster, where the monitoring device is provided with a main monitoring tool, and the multi-node cluster includes at least one node to be monitored, and at least one component to be monitored is installed on the node 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 operation state of the component to be monitored based on the component identifier.
In the technical scheme for detecting the states of the components in the cluster, the master monitoring tool acquires the component identifiers of the components to be monitored in the cluster, and controls the slave monitoring tool to detect the running states of the components to be monitored according to the component identifiers. By adopting the technical scheme, the embodiment of the invention can reduce the burden of the component to be monitored and improve the running speed of the component to be monitored by detecting the running state of the component to be monitored through the slave monitoring tool which is arranged in the same node with the component to be monitored and does not need to detect the running state of the component to be monitored, thereby improving the response speed of the component to be monitored and reducing the waiting time of users.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the accompanying drawings in which:
fig. 1 is a flow chart of a method for detecting states of components in a cluster according to a first embodiment of the present invention;
fig. 2 is a flow chart of a method for detecting states of components 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 device for detecting a state of a component in a cluster according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a state detection system of a component in a cluster according to a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the matters related to the present invention are shown in the accompanying drawings. In addition, embodiments of the invention and features of the embodiments may be combined with one another without conflict
Example 1
The embodiment of the invention provides a method for detecting the states of components in a cluster. The method may be performed by a state detection device of a component in the cluster, which may be implemented in software and/or hardware, and which may typically be integrated in a state detection system of the component in the cluster. Fig. 1 is a flowchart of a method for detecting a state of a component in a cluster according to an embodiment of the present invention, as shown in fig. 1, where the method includes:
s110, the main monitoring tool acquires 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 the program may be installed on a monitoring device, where the monitoring device may be a node in the cluster (i.e. one device in the cluster) or may be another device existing independently of the cluster. The component to be monitored can be understood as a component to be monitored in the cluster, the component can be a program installed on each node in the cluster, the component to be monitored in the cluster can comprise all or part of the components in the cluster, namely, a main monitoring tool can monitor the running states of all the components in the cluster, and can only monitor the running states of part of the components marked as the component to be monitored in the cluster, and the setting can be performed by a staff. The component identifier of the component to be monitored may be specifically understood as identifying information capable of uniquely determining the component to be monitored, which may be a process ID of an operating process of an operating system corresponding to the component to be monitored, 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 components to be monitored in the cluster are started, the components identification of the components to be monitored can be actively sent to the central component in the cluster; the central component receives and records the component identification sent by the component to be monitored and actively sends the component identification to the main monitoring tool, or the main monitoring tool sends an identification inquiry request to the central component, and the central component sends the component identification of the component to be monitored to the main monitoring tool after receiving the identification inquiry request sent by the main monitoring tool. Or after the component to be monitored is started, the IP address of the monitoring equipment provided with the main monitoring tool can be obtained, communication is carried out with the monitoring equipment according to the IP address, and the component identification of the component to be monitored is actively sent to the main monitoring equipment. Or the slave monitoring tool can periodically detect whether a new component to be monitored is started on the node, acquire the component identifier of the newly started component to be monitored when detecting that the new node to be monitored is started on the node, and send the component identifier to the master monitoring tool according to the IP address of the monitoring device.
S120, the master monitoring tool controls the slave monitoring tool to detect the running state of the component to be monitored based on the component identification, 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 be specifically understood as a program for detecting the operation state of the component to be monitored on the present node, which may be an auxiliary tool corresponding to the master monitoring tool, or may be a third party tool already installed on the node, that is, in this embodiment, the master monitoring tool may not only detect the operation state of the component to be monitored through the auxiliary tool corresponding to the master monitoring tool, but also may be compatible with other third party tools having a monitoring function, and detect the operation state of the component to be monitored by calling the third party tool having a monitoring function that is already installed on the node.
The master monitoring tool may generate a state detection instruction carrying the component identifier of the component to be monitored, which is required to detect the operation state of the component to be monitored, when the operation state of the component to be monitored needs to be detected, and the state detection instruction is used for indicating that the slave monitoring tool detects or periodically detects the operation 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, the running state of which is required to be detected, in the installed node according to the component identification carried in the state detection instruction, detects the running state of the component to be monitored, namely acquires 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 may be installed on each node of the cluster; the running state information may include performance indexes of the component to be monitored and/or state information of the component to be monitored, where the performance indexes may include a CPU, a memory, and/or a disk occupied by the component to be monitored, and the state information includes starting and closing of the component to be monitored.
In a preferred implementation of this embodiment, after the master monitoring tool controls the slave monitoring tool to detect the operation 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 operation state of the component to be monitored, the main monitoring tool can further control the component to be monitored according to the operation state of the component to be monitored, for example, when the operation state of the component to be monitored is an abnormal state, alarm is given and the component to be monitored is closed; for example, if the performance index of the component to be monitored is within the normal range, and if the performance index is determined to be not within the normal range, the performance index is correspondingly controlled, for example, if the performance index occupies too much resources (such as a CPU, a memory or a disk) and the utilization rate of the resources reaches the maximum utilization rate threshold, the occupation of the component to be monitored to the corresponding resources is reduced or the component to be monitored which is not important is closed, or if the component to be monitored is in the closed state, the occupation of the component to be monitored to the various resources is relieved, and the like, and the configuration can be specifically performed according to the needs.
According to the method for detecting the states of the components in the cluster, provided by the embodiment of the invention, the master monitoring tool obtains the component identification of the components to be monitored in the cluster, and controls the slave monitoring tool to detect the running state of the components to be monitored according to the component identification. According to 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 slave monitoring tool is not required to be detected by the component to be monitored, so that the burden of the component to be monitored can be reduced, the operation speed of the component to be monitored is improved, the response speed of the component to be monitored is improved, and the waiting time of a user is reduced.
Example two
Fig. 2 is a flow chart of a cluster gradual state detection method according to a second embodiment of the invention. Based on the above embodiments, the present embodiment optimizes "the main monitoring tool obtains the component identifier of the component to be monitored in the cluster" as: the main monitoring tool sends an identification query request to a central component of the cluster; and when the central component receives the identification inquiry request, acquiring a component identification of the component to be monitored stored in a central node provided with the central component, and transmitting the component identification to the main monitoring tool so that the main monitoring tool receives the component identification.
Further, the method for detecting the state of the component in the cluster provided in the embodiment further includes: after the components to be monitored in the cluster are started, the component identification of the components is obtained, and the component identification is sent to the central component for storage.
Further, "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" can be optimized as "the master monitoring tool determines the IP address of the node to be monitored for installing the component to be monitored according to the component identifier, and sends a state detection instruction to the slave monitoring tool installed on the node to be monitored based on the IP address, wherein the state detection instruction carries the component identifier; the slave monitoring tool obtains the operation state information of the component to be monitored according to the component identifier, and sends the operation state information to the master monitoring tool so that the master monitoring tool can determine the operation state of the component to be monitored "
Accordingly, as shown in fig. 2, the method for detecting the state of the component in the cluster according to the present embodiment includes:
s210, after the components to be monitored in the cluster are started, acquiring the component identification of the component, and sending the component identification to the central component for storage.
In this embodiment, taking a process ID of a process operated by an operating system corresponding to a component to be monitored as an example, after a component to be monitored in a cluster is started, the process corresponding to the component to be monitored may be located according to a corresponding relationship between each component and each process recorded in a node to be monitored installed in the component to be monitored, and the process ID of the process is obtained and used as a component identifier of the process; and then, establishing communication connection with the central component on the central node according to the IP address of the central node and/or the identifier of the central component, which are/is installed in the central node and are recorded in the cluster of the node to be monitored, installed by the component to be monitored, and transmitting the component identifier of the communication connection to the central component based on the communication connection. Thus, after receiving the component identifier sent by the component to be monitored, the central component can store the component identifier in the central node for the master monitoring tool to acquire.
S220, the master monitoring tool sends an identification query request to the central component of the cluster.
And S230, when the central component receives the identification inquiry request, acquiring a component identification of the component to be monitored stored in a central node provided with the central component, and transmitting the component identification to the main monitoring tool so that the main monitoring tool receives the component identification.
The monitoring device provided with the main monitoring tool can locally store the IP address of the central node in the cluster, and when the main monitoring tool needs to detect the running state of the component to be monitored, an identification query request is generated, communication connection is established between the main monitoring tool and the central node according to the IP address of the central node, and the generated identification query request is sent to the central node; correspondingly, after receiving the identification query request sent by the main monitoring tool, the central component can acquire the component identifications of all the components to be monitored stored in the central node, generate response information carrying the component identifications of all the components to be monitored, and send the response information to the main monitoring tool through communication connection established between the response information 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 component identifications of all components to be monitored in the cluster.
S240, the master monitoring tool determines an IP address of a node to be monitored of the component to be monitored 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.
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 master monitoring tool so that the master monitoring tool can determine the running state of the component to be monitored.
The method comprises the steps that a master monitoring tool obtains an IP address of a to-be-monitored node, on which a to-be-monitored component is installed, according to a component identifier of the to-be-monitored component, communication connection is established between the to-be-monitored node and the to-be-monitored node according to the IP address of the to-be-monitored node, a state detection instruction carrying the component identifier of the to-be-monitored component is generated, and the state detection instruction is sent to a slave monitoring tool installed on the to-be-monitored node through the established communication connection; correspondingly, after receiving a state detection instruction sent by the master monitoring tool, the slave monitoring tool analyzes the received state detection instruction to obtain a component identifier of the component to be monitored, acquires the running state information of the component to be monitored corresponding to the component identifier, and sends the acquired 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 according to the need, for example, a 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 identification of the component to be monitored, and then query the process information of the process corresponding to the component to be monitored by utilizing the process monitoring command of the operating system of the node to be monitored, such as ps command of a linux system, so as to obtain the running state information of the component to be monitored.
Taking a third party tool installed in each node of the cluster as an example of a slave monitoring tool, please refer to fig. 3 (only a to-be-monitored component on a to-be-monitored node is shown in the drawing), a data circulation process of the method for detecting a state of a component in the cluster provided in this embodiment may be: positioning a process corresponding to an operating system when a component to be monitored is started, and sending a process identifier of the process as a component identifier of the process to a central component for storage; the main monitoring tool inquires the component identifiers of the components to be monitored in the cluster through the central component, namely, when the central component carries out identification inquiry on the main monitoring tool, the component identifiers of the components to be monitored stored in the central node are sent to the main monitoring tool; when the main monitoring tool needs to detect the running state of the component to be monitored, the component identification of the component to be monitored is sent 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.
According to the method for detecting the states of the components in the cluster, provided by the embodiment II of the invention, after the components to be monitored in the cluster are started, the self component identifiers are obtained and sent to the central component for storage; the main monitoring tool sends an identification inquiry request to the central component; when the central component receives an identification inquiry request sent by the main monitoring tool, the central component sends the stored component identification of the component to be monitored to the main monitoring tool; the method comprises the steps that a master monitoring tool determines an IP address of a node to be monitored for installing 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 slave monitoring tool on the node to be monitored based on the IP address; 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. According to the technical scheme, the component identification 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 and operation parameters of the component to be monitored by a user, the labor consumed in the detection process of the component state in the 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 device for detecting the states of 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 device for detecting a status of a component in a cluster according to a third embodiment of the present invention, as shown in fig. 4, where the device includes an identifier obtaining module 301 and a component control module 302, where,
the identifier obtaining module 301 is configured to obtain a component identifier of a component to be monitored in the cluster;
and the component control module 302 is used for controlling a slave monitoring tool to detect the running state of the component to be monitored based on the component identification, wherein the slave monitoring tool and the component to be monitored are installed in the same node of the cluster.
According to the device for detecting the states of the components in the cluster, provided by the embodiment of the invention, the component identification of the components to be monitored in the cluster is obtained through the identification obtaining module, and the slave monitoring tool is controlled through the component control module to detect the running states of the components to be monitored according to the component identification. According to 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 slave monitoring tool is not required to be detected by the component to be monitored, so that the burden of the component to be monitored can be reduced, the operation speed of the component to be monitored is improved, the response speed of the component to be monitored is improved, and the waiting time of a user is reduced.
In the above aspect, the identifier obtaining module 301 may include: a request sending unit, configured to send an identification query request to a central component of the cluster; the device comprises an identification acquisition unit, a main monitoring tool and a central node, wherein the identification acquisition unit is used for acquiring the component identification of the component to be monitored stored in the central node provided with the central component when receiving the identification inquiry request, and transmitting the component identification to the main monitoring tool so that the main monitoring tool acquires the component identification.
Further, the device for detecting the status of the components in the cluster may further include: the device comprises an identification sending module, a central component and a monitoring module, wherein the identification sending module is used for obtaining 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 aspect, the component control module 302 may include: the instruction sending unit is used for determining the IP address of a node to be monitored of the component to be monitored 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; 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 the main monitoring tool so that the main monitoring tool can determine the running state of the component to be monitored.
Further, the device for detecting the status 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. Technical details not described in detail in this embodiment may refer to the method for detecting the status of a component in a cluster provided in any embodiment of the present invention.
Example IV
The fourth embodiment of the invention provides a system for detecting the states of 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 status detection system for a component in a cluster according to a fourth embodiment of the present invention, where, as shown in fig. 5, the system includes a monitoring device 1 and a multi-node cluster 2, a master monitoring tool is installed on the monitoring device 1, the multi-node cluster 2 includes at least one node 21 to be monitored, and 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 21 to be monitored, and is configured to obtain a component identifier of the component to be monitored, and control the node 21 to be monitored to detect an operation 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 obtain, when receiving an identifier query request sent by the monitoring device 1, a component identifier of a component to be monitored 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 21 to be monitored may be further 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 on which the component to be monitored is installed, and send, based on the IP address, a status detection instruction to a slave monitoring tool installed on the node 21 to be monitored, where the status detection instruction carries the component identifier; correspondingly, the node to be monitored 21 may be specifically configured to obtain the operation state information of the component to be monitored according to the component identifier, and send the operation state information to the monitoring device 1, so that the monitoring device 1 determines the operation state of the component to be monitored.
Preferably, the monitoring device 1 may also be used for controlling the component to be monitored according to the operating state.
According to the state detection system for the components in the cluster, provided by the embodiment of the invention, the running state of the components to be monitored is detected by the slave monitoring tool which is arranged in the same node with the components to be monitored, and the running state of the components to be monitored does not need to be detected by the components to be monitored, so that the burden of the components to be monitored can be reduced, the running speed of the components to be monitored can be improved, the response speed of the components to be monitored can be improved, and the waiting time of a user can be reduced.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. 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, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (4)

1. A method for detecting a state of a component in a cluster, comprising:
the method comprises the steps that a main monitoring tool obtains a component identifier of a component to be monitored in a cluster;
the master monitoring tool controls the slave monitoring tool to detect the running state of the component to be monitored based on the component identification, and the slave monitoring tool and the component to be monitored are installed in the same node of the cluster;
the main monitoring tool obtains a component identifier of a component to be monitored in a cluster, and the method comprises the following steps: the main monitoring tool sends an identification query request to a central component of the cluster; when the central component receives the identification inquiry request, acquiring a component identification of a component to be monitored stored in a central node provided with the central component, and transmitting the component identification to the main monitoring tool so that the main monitoring tool acquires the component identification; after the components to be monitored in the cluster are started, acquiring the component identification of the component, and sending the component identification to a central component for storage;
the master monitoring tool controls the slave monitoring tool to detect the operation state of the component to be monitored based on the component identification, and the method comprises the following steps: the master monitoring tool determines an IP address of a node to be monitored of the component to be monitored 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 master monitoring tool so that the master monitoring tool determines the running state of the component to be monitored.
2. The method of claim 1, further comprising, after the master monitoring tool controls a slave monitoring tool to detect an operational state of the component to be monitored based on the component identification:
and the main monitoring tool controls the component to be monitored according to the running state.
3. A device for detecting a state 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;
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 identification, and the slave monitoring tool and the component to be monitored are installed in the same node of the cluster;
wherein, the sign obtains the module and includes: a request sending unit, configured to send an identification query request to a central component of the cluster; the device comprises an identification acquisition unit, a main monitoring tool and a central node, wherein the identification acquisition unit is used for acquiring a component identification of a component to be monitored stored in the central node provided with the central component when receiving the identification inquiry request, and transmitting the component identification to the main monitoring tool so that the main monitoring tool acquires the component identification; the device comprises an identification sending module, a central module and a monitoring module, wherein the identification sending module is used for obtaining the component identification of the component after the component to be monitored is started and sending the component identification to the central module for storage;
the component control module includes: the instruction sending unit is used for determining the IP address of a node to be monitored of the component to be monitored 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; 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 the main monitoring tool so that the main monitoring tool can determine the running state of the component to be monitored.
4. The system 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, at least one component to be monitored is installed on the node to be monitored, the monitoring equipment is connected with the node to be monitored and used for acquiring a component identifier 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 identifier;
the obtaining the component identifier of the component to be monitored comprises the following steps: the monitoring equipment sends an identification query request to a central component of the cluster through a main monitoring tool; when the central component receives the identification inquiry request, acquiring a component identification of a component to be monitored stored in a central node provided with the central component, and transmitting the component identification to the main monitoring tool so that the main monitoring tool acquires the component identification; after the components to be monitored in the cluster are started, acquiring the component identification of the component, and sending the component identification to a central component for storage;
controlling the node to be monitored to detect the operation state of the component to be monitored based on the component representation comprises: the monitoring equipment determines an IP address of a node to be monitored of the component to be monitored according to the component identifier through a master monitoring tool, 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 master monitoring tool so that the master monitoring tool determines the running state of the component to be monitored.
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 CN111506480A (en) 2020-08-07
CN111506480B true 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 (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8763106B2 (en) * 2011-09-08 2014-06-24 Mcafee, Inc. Application state sharing in a firewall cluster

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
job centric cluster monitoring;R.curry et al.;《12th international conference on parallel and distributed system》;20060724;第1-10页 *
Linux集群实时监控系统的一种实现方法;熊齐;唐佳明;;计算机系统应用;20130915(第09期);第52-55页 *
Xen虚拟集群监控器的设计与实现;刘杨;肖侬;沈立;;武汉理工大学学报;20101030(第20期);第190-194页 *

Also Published As

Publication number Publication date
CN111506480A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
CN105791387B (en) Vehicle control updating method and system
US9798533B2 (en) Transferring operating environment of registered network to unregistered network
JP5902355B2 (en) Out-of-range / in-range prediction calculations to reduce computing device wireless reconnection times
US20190379733A1 (en) Method and device for managing data in internet of things, computer device and readable medium
US9311163B2 (en) Configuration data management system, and configuration data management method
CN105009554B (en) Detect intelligent terminal hardware whether operation exception method and intelligent terminal
CN109428740B (en) Method and device for recovering equipment failure
CN110928561B (en) Vehicle controller software version management method and device, vehicle and storage medium
CN112769652B (en) Node service monitoring method, device, equipment and medium
CN113271541B (en) Method and device for acquiring terminal behavior data, method and device for transmitting terminal behavior data and network equipment
CN115913872A (en) Server monitoring operation and maintenance method, device, equipment and medium
CN111506480B (en) Method, device and system for detecting states of components in cluster
CN101873232A (en) Judgment method of equipment uniqueness and IP network discovery server
JP2021114701A (en) Server, management device, apparatus management system, apparatus management method, and program
CN101515251A (en) Board-level platform debugging method, device and system
KR100695011B1 (en) Apparatus for auto-installing/removing peripheral devices, system and method for auto-detecting peripheral devices
CN112788153B (en) Internet of things equipment upgrading management method, device, equipment and storage medium
JP6958542B2 (en) Information processing equipment, information processing methods, information processing programs and information processing systems
JP2001145168A (en) Communication system, communications equipment, and communication method
CN106550027B (en) Device connection method and device connection system
CN112925686A (en) Data acquisition method, server, system and storage medium
CN111464357A (en) Resource allocation method and device
CN111092765B (en) Intelligent driving method, system, electronic device and readable storage medium
CN117376417B (en) Data acquisition method, system, device, computing equipment and storage medium
KR101596062B1 (en) Data and Event Sharing System and Method among Personal Devices

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