CN111309549B - Monitoring method, monitoring system, readable medium and electronic equipment - Google Patents

Monitoring method, monitoring system, readable medium and electronic equipment Download PDF

Info

Publication number
CN111309549B
CN111309549B CN202010079098.XA CN202010079098A CN111309549B CN 111309549 B CN111309549 B CN 111309549B CN 202010079098 A CN202010079098 A CN 202010079098A CN 111309549 B CN111309549 B CN 111309549B
Authority
CN
China
Prior art keywords
slicing
monitoring
node
information
monitoring device
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
CN202010079098.XA
Other languages
Chinese (zh)
Other versions
CN111309549A (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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010079098.XA priority Critical patent/CN111309549B/en
Publication of CN111309549A publication Critical patent/CN111309549A/en
Application granted granted Critical
Publication of CN111309549B publication Critical patent/CN111309549B/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/004Error avoidance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5017Task decomposition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/502Proximity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/508Monitor

Abstract

The present disclosure relates to a monitoring method, a monitoring system, a readable medium and an electronic device. The method and the device are based on the slicing technology, the slicing clusters are built, the monitoring devices receive the monitoring tasks dispatched by the slicing clusters, the load of each monitoring device is reduced, the possibility of downtime of each monitoring device is reduced, monitoring of other monitoring devices is not affected after any monitoring device is downtime, a certain time of monitoring blank period cannot be caused to the whole monitoring system, and data loss is reduced to a large extent. And when the query request is heavier, the first query request requires more target monitored hosts, the slicing node can divide the first query request into a plurality of second query requests according to the slicing information and send the second query requests to the plurality of target monitoring devices, so that the response speed is improved.

Description

Monitoring method, monitoring system, readable medium and electronic equipment
Technical Field
The disclosure relates to the technical field of monitoring, and in particular relates to a monitoring method, a monitoring system, a readable medium and electronic equipment.
Background
In the related art, a monitoring system generally monitors monitored hosts by using a single server, when the number of the monitored hosts reaches a certain scale, great pressure is generated in writing operation of the server and querying of data in a longer time range, and the server may be down, so that a certain time of monitoring blank period is caused for the whole monitoring system.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a monitoring method applied to a slicing node in a monitoring system, where the monitoring system includes a slicing cluster and a plurality of monitoring devices, the slicing cluster includes a plurality of slicing nodes, and the method includes:
acquiring a first query request, wherein the first query request is sent to the fragment cluster by a request end, and the first query request comprises identification information of at least one target monitored host;
determining a target monitoring device corresponding to each target monitored host according to the identification information of each target monitored host and the fragment information, wherein the fragment information represents the corresponding relation between each monitored host and the monitoring device;
sending a second query request to each target monitoring device, wherein the second query request comprises identification information of a target monitored host included in the first query request;
Receiving monitoring data returned by each target monitoring device according to the second query request;
and returning the received monitoring data to the request end.
In a second aspect, the present disclosure provides a monitoring method applied to a monitoring device in a monitoring system, where the monitoring system includes a shard cluster and a plurality of monitoring devices, the shard cluster includes a plurality of shard nodes, and the method includes:
receiving a second query request sent by the slicing node, wherein the second query request comprises identification information of a target monitored host included in a first query request, and the first query request is sent to the slicing cluster by a request end and is acquired by the slicing node;
and returning the monitoring data of each target monitoring host according to the second query request.
In a third aspect, the present disclosure provides a sliced node, applied to a monitoring system, the monitoring system including a sliced cluster and a plurality of monitoring devices, the sliced cluster including a plurality of sliced nodes, the sliced node including:
the first query request acquisition module is used for acquiring a first query request which is sent to the fragment cluster by a request end and comprises identification information of at least one target monitored host;
The target monitoring device acquisition module is used for determining a target monitoring device corresponding to each target monitored host according to the identification information of each target monitored host and the fragmentation information, wherein the fragmentation information represents the corresponding relation between each monitored host and the monitoring device;
a second query request sending module, configured to send a second query request to each target monitoring device, where the second query request includes identification information of a target monitored host included in the first query request;
the monitoring data receiving module is used for receiving monitoring data returned by each target monitoring device according to the second query request;
and the monitoring data return module is used for returning the received monitoring data to the request end.
In a fourth aspect, the present disclosure provides a monitoring device applied to a monitoring system, the monitoring system including a shard cluster and a plurality of monitoring devices, the shard cluster including a plurality of shard nodes, the monitoring devices including:
the second query request receiving module is used for receiving a second query request sent by the slicing node, wherein the second query request comprises identification information of a target monitored host included in a first query request, and the first query request is sent to the slicing cluster by a request end and is acquired by the slicing node;
And the second query request response module is used for returning the monitoring data of each target monitoring host according to the second query request.
In a fifth aspect, the present disclosure provides a monitoring system, where the monitoring system includes a slicing cluster and a plurality of monitoring devices, where the slicing cluster includes a plurality of slicing nodes, where the slicing nodes are the slicing nodes in the third aspect, and/or where the monitoring devices are the monitoring devices in the fourth aspect.
In a sixth aspect, the present disclosure provides a computer readable medium having stored thereon a computer program, characterized in that the program when executed by a processing device implements the steps of the method of the first or second aspect.
In a seventh aspect, the present disclosure provides an electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing said computer program in said storage means to carry out the steps of the method of the first or second aspect.
Through the technical scheme, the method and the device are based on the slicing technology, the slicing clusters are built, the monitoring devices receive the monitoring tasks dispatched by the slicing clusters, the load of each monitoring device is reduced, the possibility of downtime of each monitoring device is reduced, monitoring of other monitoring devices is not affected after any monitoring device is downtime, a certain time of monitoring blank period cannot be caused to the whole monitoring system, and data loss is reduced to a greater extent. And when the query request is heavier, the first query request requires more target monitored hosts, the slicing node can divide the first query request into a plurality of second query requests according to the slicing information and send the second query requests to the plurality of target monitoring devices, so that the response speed is improved.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale. In the drawings:
fig. 1 is a flow chart illustrating a monitoring method applied to a sliced node according to an embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating a monitoring method applied to a monitoring device according to an embodiment of the present disclosure.
Fig. 3 is a block diagram of a sharded node, according to an embodiment of the present disclosure.
Fig. 4 is a block diagram of a monitoring device according to an embodiment of the present disclosure.
Fig. 5 is a block diagram of a monitoring system according to an embodiment of the present disclosure.
Fig. 6 is a block diagram of an electronic device, according to an embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
An embodiment of the present disclosure provides a monitoring method. The monitoring method is applied to the slicing nodes in the monitoring system, the monitoring system comprises a slicing cluster and a plurality of monitoring devices, and the slicing cluster comprises a plurality of slicing nodes. Fig. 1 is a flow chart illustrating a monitoring method applied to a sliced node according to an embodiment of the present disclosure. As shown in fig. 1, the method comprises the steps of:
step S11, a first query request is acquired.
The first query request is sent to the fragment cluster by a request end. The load balancing device can be arranged in the slicing cluster, and the received first query request is sent to one slicing node with smaller load in the slicing cluster through the load balancing device. The shard cluster may also send the received first query request to any one of the shard nodes in the shard cluster in a random manner. The first query request is used for requesting monitoring data of at least one target monitored host. The target monitored host requests a monitored host of a query for the first query request. The first query request includes identification information of at least one target monitored host.
And step S13, determining a target monitoring device corresponding to each target monitored host according to the identification information and the fragmentation information of each target monitored host.
The slicing information characterizes the corresponding relation between each monitored host and the monitoring device. The target monitoring device is a monitoring device corresponding to the target monitored host.
And step S15, sending a second query request to each target monitoring device.
Wherein the second query request includes identification information of the target monitored host included in the first query request. When at least one target monitored host computer requested to be queried by the first query request corresponds to one target monitoring device, the identification information of the target monitored host computer included in the second query request is the same as the identification information of the target monitored host computer included in the first query request. When at least two target monitored hosts are queried by the first query request, and the at least one target monitored host corresponds to at least two target monitoring devices, a second query request is initiated to each target monitoring device, the second query request is a sub-request of the first query request, and the sum of the identification information of all the target monitored hosts included in the second query request is the same as the identification information of the target monitored hosts included in the first query request.
And S17, receiving monitoring data returned by each target monitoring device according to the second query request.
And step S19, returning the received monitoring data to the request end.
Optionally, the monitoring data includes a plurality of monitoring items, the slicing node concatenates the received monitoring data with the data of the same monitoring item in the form of a chain according to a timestamp, and returns the concatenated monitoring data to the request end.
Through the technical scheme, the embodiment of the disclosure builds the slicing cluster based on the slicing technology, and the plurality of monitoring devices receive the monitoring tasks dispatched by the slicing cluster, so that the load of each monitoring device is reduced, the possibility of downtime of each monitoring device is reduced, monitoring of other monitoring devices is not affected after any monitoring device is downtime, a certain time of monitoring blank period is not caused to the whole monitoring system, and data loss is reduced to a greater extent. And when the query request is heavier, the first query request requires more target monitored hosts, the slicing node can divide the first query request into a plurality of second query requests according to the slicing information and send the second query requests to the plurality of target monitoring devices, so that the response speed is improved.
Optionally, in a specific embodiment, step S17 includes: and receiving monitoring data locally stored by each target monitoring device returned by each target monitoring device according to the second query request.
Through the technical scheme, the target monitoring device actively pulls the monitoring data of the monitored host, and compared with the monitored host pushing the monitoring data to the monitoring device, the monitoring device can be protected, the monitoring device is prevented from being written to collapse, and meanwhile, the response speed of the monitoring system to the request end is improved.
Optionally, in the case that the shard node is a master shard node in the shard cluster, the method further includes: and generating the slicing information according to the attributes of each monitoring device and the monitored host, and synchronizing the slicing information to other slicing nodes included in the slicing cluster. And indicating the monitoring device to acquire the monitoring data of the corresponding monitored host according to the fragment information.
The master shard node is one of a plurality of shard nodes included in the shard cluster. The master slicing node not only can be used for acquiring the first query request, but also can be used for generating and synchronizing slicing information, and the monitoring device is instructed to acquire the monitoring data of the corresponding monitored host according to the slicing information.
The selection modes of the main slicing nodes can be various. Optionally, in an embodiment, the master shard node is determined by: each slicing node multicasts information to other slicing nodes included in the slicing cluster, wherein the information comprises a slicing node name for sending the information; and taking the slicing node corresponding to the most-occurring slicing node name in the information set as the main slicing node, wherein the information set is a set formed by information received by each slicing node first. Optionally, in another embodiment, the master shard node is determined by: each slicing node multicasts information to other slicing nodes included in the slicing cluster, wherein the information comprises a slicing node name for sending the information; and determining the main slicing node according to the number of names of each slicing node and the weight of each slicing node in an information set, wherein the information set is formed by the information received by each slicing node first, and the weight is determined according to the number of processors of each slicing node, the current load and the service availability. For example, for a specified time frame, the weight may be equal to the sum of the number of processors per sharded node divided by the load plus the availability of service. Optionally, in another embodiment, the master shard node is determined by: and selecting a fragment node from the plurality of fragment nodes as a main fragment node according to an input instruction of a user, namely manually designating the main fragment node.
The nodes of each segment and the main segment can be linked by heartbeat keep-alive, and after the main segment is hung off, the new main segment can be rapidly selected by the mode.
Optionally, the generating the piece of information according to the attribute of each of the monitoring device and the monitored host includes: and determining the monitoring device corresponding to each monitored host according to the geographical distance from the monitored host to each monitoring device and the load and the number of processors of each monitoring device, and obtaining the fragment information representing the monitoring device corresponding to each monitored host.
Each monitoring device may have two attributes, a geographic location attribute and a performance attribute, which are related to the load and the number of processors of the monitoring device. Each monitored host may have a geographic location attribute. The master slicing node may determine the monitoring device corresponding to the monitored host according to the geographical distance from the monitored host to each monitoring device and the load and the number of processors of each monitoring device. In practical implementation, for a monitored host, a score may be calculated according to the geographical distance between the monitored host and each monitoring device and the load and the number of processors of each monitoring device, where the score is a score when the monitored host corresponds to each monitoring device, and the monitoring device corresponding to the highest score in the scores corresponds to the monitored host. For example, for a monitored host, its geographic location attribute may be set to D1; the geographical position attribute of the first monitoring device is D1, the geographical distance L1=D1-D1 between the monitored host and the first monitoring device is recorded as p1, the number of the processors is recorded as c1, and the score 1=1/L1+ (c 1/p 1) when the monitored host corresponds to the first monitoring device; the geographical location attribute of the second monitoring device is D2, the geographical distance l2=d1-D2 from the monitored host to the second monitoring device is denoted as p2, the number of processors is denoted as c2, and the score 2=1/l2+ (c 2/p 2) when the monitored host corresponds to the second monitoring device. Similarly, a score3 is obtained when the monitored host corresponds to the third monitoring device, scores score4 and … are obtained when the monitored host corresponds to the fourth monitoring device, and score N is obtained when the monitored host corresponds to the nth monitoring device. Where N represents the number of monitoring devices that the monitoring system includes that can be used to monitor. Comparing the maximum value of score1 to score N, and corresponding the monitoring device corresponding to the highest score to the monitored host.
By the technical scheme, the geographic distance from the monitored host to each monitoring device and the load and the number of processors of each monitoring device are comprehensively considered when the slicing is carried out, the slicing mode is reasonable, and the large load and the far distance from the monitored host of the monitoring devices can be avoided.
In an embodiment, the master slicing node may periodically (periodically) obtain the geographical distance from each monitored host to each monitoring device, and the load and the number of processors of each monitoring device, so as to determine the monitoring device corresponding to each monitored host, and obtain new slicing information for updating.
Optionally, in the case that the shard node is a master shard node in the shard cluster, the method further includes: when deleting or adding a monitored host corresponding to the monitoring device, deleting or adding the corresponding relation between the monitoring device and the monitored host in the slicing information, and indicating that the monitoring device does not acquire or acquire the monitoring data of the monitoring host; and synchronizing the slicing information after deleting or adding the corresponding relation between the monitoring device and the monitored host to other slicing nodes included in the slicing cluster.
According to the technical scheme, when a monitored host is deleted or added in a monitoring device, the main slicing node only needs to instruct the monitoring device to delete or add the monitored host, and the slicing information after the corresponding relation between the monitoring device and the monitored host is deleted or added is synchronized to other slicing nodes included in the slicing cluster, so that the monitoring devices except the monitoring device in the slicing information are not influenced, and the data quantity and the transmission cost of the main slicing node are reduced.
Based on the above inventive concept, an embodiment of the present disclosure further provides a monitoring method. The monitoring method is applied to a monitoring device in a monitoring system, wherein the monitoring system comprises a slicing cluster and a plurality of monitoring devices, and the slicing cluster comprises a plurality of slicing nodes. Fig. 2 is a flowchart illustrating a monitoring method applied to a monitoring device according to an embodiment of the present disclosure. As shown in fig. 2, the method comprises the steps of:
step S51, receiving a second query request sent by the slicing node.
The second query request comprises identification information of a target monitored host computer included in a first query request, wherein the first query request is sent to the fragment cluster by a request end and is acquired by the fragment node;
And step S53, returning the monitoring data of each target monitoring host according to the second query request.
Through the technical scheme, the embodiment of the disclosure builds the slicing cluster based on the slicing technology, and the plurality of monitoring devices receive the monitoring tasks dispatched by the slicing cluster, so that the load of each monitoring device is reduced, the possibility of downtime of each monitoring device is reduced, monitoring of other monitoring devices is not affected after any monitoring device is downtime, a certain time of monitoring blank period is not caused to the whole monitoring system, and data loss is reduced to a greater extent. And when the query request is heavier, namely the first query request requires more target monitored hosts, the slicing node can divide the first query request into a plurality of second query requests according to the slicing information and send the second query requests to a plurality of target monitoring devices, so that the response speed is improved.
Optionally, the method further comprises: and receiving the slicing information sent by the main slicing node, and acquiring and storing monitoring data of the corresponding monitored host according to the slicing information.
The slicing information characterizes the corresponding relation between each monitored host and the monitoring device. Through the technical scheme, the target monitoring device actively pulls the monitoring data of the monitored host, and compared with the monitored host pushing the monitoring data to the monitoring device, the monitoring device can be protected, the monitoring device is prevented from being written to collapse, and meanwhile, the response speed of the monitoring system to the request end is improved.
Optionally, the method further comprises: and according to the indication of the master slicing node, not acquiring or acquiring the monitoring data of a monitoring host.
According to the technical scheme, when a monitored host is deleted or added in a monitoring device, the main slicing node only needs to instruct the monitoring device to delete or add the monitored host, and the monitoring devices except the monitoring device in the slicing information are not affected, so that the data quantity and the transmission cost of the main slicing node are reduced.
Based on the above inventive concept, an embodiment of the present disclosure further provides a slicing node 10, which is applied to a monitoring system. The monitoring system comprises a sliced cluster 1 and a plurality of monitoring devices 50, the sliced cluster 1 comprising a plurality of sliced nodes 10. Fig. 3 is a block diagram of a slicing node 10, shown in accordance with an embodiment of the present disclosure. As shown in fig. 3, the slicing node 10 includes:
the first query request obtaining module 11 is configured to obtain a first query request, where the first query request is sent by a request end to the partition cluster 1, and the first query request includes identification information of at least one target monitored host.
The target monitoring device 50 obtaining module 13 is configured to determine, according to the identification information of each target monitored host and the fragmentation information, a target monitoring device 50 corresponding to each target monitored host, where the fragmentation information characterizes a corresponding relationship between each monitored host and the monitoring device 50.
And a second query request sending module 15, configured to send a second query request to each of the target monitoring devices 50, where the second query request includes identification information of the target monitored host included in the first query request.
The monitoring data receiving module 17 is configured to receive monitoring data returned by each of the target monitoring devices 50 according to the second query request.
And the monitoring data return module 19 is used for returning the received monitoring data to the request end.
Optionally, the monitoring data includes a plurality of monitoring items, the slicing node 10 concatenates the received monitoring data with the data of the same monitoring item in the form of a chain according to a timestamp, and returns the concatenated monitoring data to the request end.
Through the above technical scheme, the embodiment of the disclosure constructs the slicing cluster 1 based on the slicing technology, and the plurality of monitoring devices 50 accept the monitoring task dispatched by the slicing cluster 1, so that the load of each monitoring device 50 is reduced, the possibility of downtime of each monitoring device 50 is reduced, and after any monitoring device 50 is downtime, the monitoring of other monitoring devices 50 is not affected, a monitoring blank period with a certain time is not caused to the whole monitoring system, and the data loss is reduced to a greater extent. And when the query request is heavy, that is, when the target monitored hosts required to be queried by the first query request are more, the slicing node 10 can divide the first query request into a plurality of second query requests according to the slicing information and send the second query requests to the plurality of target monitoring devices 50, so that the response speed is improved.
Optionally, in a specific embodiment, the monitoring data receiving module 17 is specifically configured to: and receiving monitoring data which are locally stored by each target monitoring device 50 and returned by each target monitoring device 50 according to the second query request.
Through the above technical scheme, the target monitoring device 50 actively pulls the monitoring data of the monitored host, and can protect the monitoring device 50, prevent the monitoring device 50 from being collapsed, and improve the response speed of the monitoring system to the request end relative to the pushing of the monitoring data to the monitoring device 50 by the monitored host.
Optionally, in the case that the slicing node 10 is a master slicing node in the slicing cluster 1, the slicing node 10 further includes: the device comprises a slicing information generating module and a slicing module. The slicing information generating module is configured to generate the slicing information according to the attributes of each monitoring device 50 and the monitored host, and synchronize the slicing information to other slicing nodes 10 included in the slicing cluster 1. The slicing module is configured to instruct the monitoring device 50 to obtain the monitoring data of the corresponding monitored host according to the slicing information.
The master slicing node is one of a plurality of slicing nodes 10 included in the slicing cluster 1. The master slicing node may be configured to not only obtain the first query request, but also generate and synchronize slicing information, and instruct the monitoring device 50 to obtain monitoring data of a corresponding monitored host according to the slicing information.
The selection modes of the main slicing nodes can be various. Optionally, in an embodiment, the master shard node is determined by: each of the slicing nodes 10 multicasts information to other slicing nodes 10 included in the slicing cluster 1, wherein the information comprises the names of the slicing nodes 10 sending the information; and taking the corresponding slicing node 10 with the name of the most-occurring slicing node 10 in the information set as the main slicing node, wherein the information set is formed by the information received by each slicing node 10 first. Optionally, in another embodiment, the master shard node is determined by: each of the slicing nodes 10 multicasts information to other slicing nodes 10 included in the slicing cluster 1, wherein the information comprises the names of the slicing nodes 10 sending the information; the master slicing node is determined according to the number of names of each slicing node 10 appearing in an information set formed by information received first by each slicing node 10 and the weight of each slicing node 10, wherein the weight is determined according to the number of processors of each slicing node 10, the current load and the service availability. For example, for a specified time frame, the weight may be equal to the sum of the number of processors per sliced node 10 divided by the load plus the service availability. Optionally, in another embodiment, the master shard node is determined by: and selecting one slicing node 10 from the plurality of slicing nodes 10 as a main slicing node according to an input instruction of a user, namely, manually designating the main slicing node.
The heartbeat keep-alive link can be used between each slicing node 10 and the main slicing node, and after the main slicing node is hung, a new main slicing node can be rapidly selected through the mode.
Optionally, the slicing information generating module is specifically configured to: and for each monitored host, determining the monitoring device 50 corresponding to the monitored host according to the geographical distance from the monitored host to each monitoring device 50 and the load and the number of processors of each monitoring device 50, and obtaining the fragment information representing the monitoring device 50 corresponding to each monitored host.
Each monitoring device 50 may have two attributes, a geographic location attribute and a performance attribute, which are related to the load and number of processors of the monitoring device 50. Each monitored host may have a geographic location attribute. The master slicing node may determine the monitoring device 50 corresponding to the monitored host according to the geographical distance between the monitored host and each monitoring device 50 and the load and the number of processors of each monitoring device 50. In actual implementation, for a monitored host, a score may be calculated according to the geographical distance between the monitored host and each monitoring device 50 and the load and the number of processors of each monitoring device 50, where the score is a score when the monitored host corresponds to each monitoring device 50, and the monitoring device 50 corresponding to the highest score in the scores corresponds to the monitored host. For example, for a monitored host, its geographic location attribute may be set to D1; the geographical location attribute of the first monitoring device 50 is D1, the geographical distance l1=d1-D1 from the monitored host to the first monitoring device 50 is denoted as p1, the number of processors is denoted as c1, and the score 1=1/l1+ (c 1/p 1) when the monitored host corresponds to the first monitoring device 50; the geographical location attribute of the second monitoring device 50 is D2, the geographical distance l2=d1-D2 from the monitored host to the second monitoring device 50 is denoted as p2, the number of processors is denoted as c2, and the score 2=1/l2+ (c 2/p 2) when the monitored host corresponds to the second monitoring device 50. Similarly, score3 is obtained when the monitored host corresponds to the third monitoring device 50, scores score4 and … are obtained when the monitored host corresponds to the fourth monitoring device 50, and score N is obtained when the monitored host corresponds to the nth monitoring device 50. Where N represents the number of monitoring devices 50 that the monitoring system includes that can be used to monitor. Comparing the maximum value of score1 to score n, and associating the monitoring device 50 corresponding to the highest score with the monitored host.
By the technical scheme, the geographical distance from the monitored host to each monitoring device 50 and the load and the number of processors of each monitoring device 50 are comprehensively considered when the slicing is carried out, the slicing mode is reasonable, and the large load and the far distance from the monitored host of the monitoring device 50 can be avoided.
In an embodiment, the master slicing node may periodically (periodically) obtain the geographical distance from each monitored host to each monitoring device 50 and the load and the number of processors of each monitoring device 50, so as to determine the monitoring device 50 corresponding to each monitored host, and obtain new slicing information for updating.
Optionally, in the case that the slicing node 10 is a master slicing node in the slicing cluster 1, the slicing node 10 further includes: and the adding and deleting indication module and the adding and deleting synchronization module. The adding/deleting indication module is configured to delete or add a corresponding relationship between the monitoring device 50 and the monitored host in the piece of information when the monitoring device 50 deletes or adds a monitored host corresponding to the monitoring device, and indicate that the monitoring device 50 does not acquire or acquire monitoring data of the monitored host. The adding and deleting synchronization module is configured to synchronize the segment information after deleting or adding the corresponding relationship between the monitoring device 50 and the monitored host to other segment nodes 10 included in the segment cluster 1.
By the above technical solution, when a monitored host is deleted or added in a monitoring device 50, the master slicing node only needs to instruct the monitoring device 50 to delete or add the monitored host, and synchronize the slicing information after deleting or adding the corresponding relationship between the monitoring device 50 and the monitored host to other slicing nodes 10 included in the slicing cluster 1, without affecting the monitoring devices 50 except for the monitoring device 50 in the slicing information, so that the data size and transmission overhead of the master slicing node are reduced.
It should be noted that, as will be clearly understood by those skilled in the art, for convenience and brevity of description, the specific working process and description of the slicing node 10 described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
Based on the above inventive concept, an embodiment of the present disclosure further provides a monitoring device 50 applied to a monitoring system. The monitoring system comprises a sliced cluster 1 and a plurality of monitoring devices 50, the sliced cluster 1 comprising a plurality of sliced nodes 10. Fig. 4 is a block diagram of a monitoring device 50 according to an embodiment of the present disclosure. As shown in fig. 4, the monitoring device 50 includes:
A second query request receiving module 51, configured to receive a second query request sent by the slicing node 10, where the second query request includes identification information of a target monitored host included in a first query request, where the first query request is sent by a request end to the slicing cluster 1 and is acquired by the slicing node 10;
and a second query request response module 53, configured to return monitoring data of each target monitoring host according to the second query request.
Through the above technical scheme, the embodiment of the disclosure constructs the slicing cluster 1 based on the slicing technology, and the plurality of monitoring devices 50 accept the monitoring task dispatched by the slicing cluster 1, so that the load of each monitoring device 50 is reduced, the possibility of downtime of each monitoring device 50 is reduced, and after any monitoring device 50 is downtime, the monitoring of other monitoring devices 50 is not affected, a monitoring blank period with a certain time is not caused to the whole monitoring system, and the data loss is reduced to a greater extent. And when the query request is heavy, that is, when the target monitored hosts required to be queried by the first query request are more, the slicing node 10 can divide the first query request into a plurality of second query requests according to the slicing information and send the second query requests to the plurality of target monitoring devices 50, so that the response speed is improved.
Optionally, the monitoring device 50 further includes: and a monitoring module. And the monitoring module is used for receiving the slicing information sent by the main slicing node, and acquiring and storing the monitoring data of the corresponding monitored host according to the slicing information.
Wherein the slicing information characterizes a corresponding relationship between each monitored host and the monitoring device 50. Through the above technical scheme, the target monitoring device 50 actively pulls the monitoring data of the monitored host, and can protect the monitoring device 50, prevent the monitoring device 50 from being collapsed, and improve the response speed of the monitoring system to the request end relative to the pushing of the monitoring data to the monitoring device 50 by the monitored host.
Optionally, the monitoring device 50 further includes: and adding and deleting modules. And the adding and deleting module is used for not acquiring or acquiring the monitoring data of a monitoring host according to the indication of the main slicing node.
By the above technical solution, when a monitored host is deleted or added in a monitoring device 50, the master slicing node only needs to instruct the monitoring device 50 to delete or add the monitored host, without affecting the monitoring devices 50 except for the monitoring device 50 in the slicing information, so that the data size and transmission overhead of the master slicing node are reduced.
It should be noted that, for convenience and brevity of description, the specific working process and description of the monitoring device 50 described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
Based on the above inventive concept, an embodiment of the present disclosure further provides a monitoring system. Fig. 5 is a block diagram of a monitoring system according to an embodiment of the present disclosure. The monitoring system comprises a sliced cluster 1 and a plurality of monitoring devices 50, the sliced cluster 1 comprising a plurality of sliced nodes 10. The slicing node 10 is the slicing node 10 described above, and/or the monitoring device 50 is the monitoring device 50 described above, which will not be described herein.
The embodiments of the present disclosure also provide a computer readable medium having stored thereon a computer program which, when executed by a processing device, can perform the above-described monitoring method applied to the sliced node 10 or perform the above-described steps of the monitoring method applied to the monitoring device 50.
Referring now to fig. 6, a schematic diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the electronic device may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a first query request, wherein the first query request is sent to the fragment cluster by a request end, and the first query request comprises identification information of at least one target monitored host; determining a target monitoring device corresponding to each target monitored host according to the identification information of each target monitored host and the fragment information, wherein the fragment information represents the corresponding relation between each monitored host and the monitoring device; sending a second query request to each target monitoring device, wherein the second query request comprises identification information of a target monitored host included in the first query request; receiving monitoring data returned by each target monitoring device according to the second query request; and returning the received monitoring data to the request end.
Alternatively, the computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: receiving a second query request sent by the slicing node, wherein the second query request comprises identification information of a target monitored host included in a first query request, and the first query request is sent to the slicing cluster by a request end and is acquired by the slicing node; and returning the monitoring data of each target monitoring host according to the second query request.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. The name of a module does not in some cases define the module itself.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, an example one provides a monitoring method applied to a sliced node in a monitoring system, the monitoring system including a sliced cluster and a plurality of monitoring devices, the sliced cluster including a plurality of sliced nodes, the method including: acquiring a first query request, wherein the first query request is sent to the fragment cluster by a request end, and the first query request comprises identification information of at least one target monitored host; determining a target monitoring device corresponding to each target monitored host according to the identification information of each target monitored host and the fragment information, wherein the fragment information represents the corresponding relation between each monitored host and the monitoring device; sending a second query request to each target monitoring device, wherein the second query request comprises identification information of a target monitored host included in the first query request; receiving monitoring data returned by each target monitoring device according to the second query request; and returning the received monitoring data to the request end.
According to one or more embodiments of the present disclosure, a second example provides the method of the first example, where the receiving the monitoring data returned by each of the target monitoring devices according to the second query request includes: and receiving monitoring data locally stored by each target monitoring device returned by each target monitoring device according to the second query request.
In accordance with one or more embodiments of the present disclosure, example three provides the method of example one, in a case where the sharded node is a master sharded node in the sharded cluster, the method further comprising: generating the slicing information according to the attribute of each monitoring device and the monitored host, and synchronizing the slicing information to other slicing nodes included in the slicing cluster; and indicating the monitoring device to acquire the monitoring data of the corresponding monitored host according to the fragment information.
In accordance with one or more embodiments of the present disclosure, example four provides the method of example three, the master sharding node being determined by: each slicing node multicasts information to other slicing nodes included in the slicing cluster, wherein the information comprises a slicing node name for sending the information; and taking the slicing node corresponding to the most-occurring slicing node name in the information set as the main slicing node, wherein the information set is a set formed by information received by each slicing node first.
In accordance with one or more embodiments of the present disclosure, example five provides the method of example three, the master sharding node being determined by: each slicing node multicasts information to other slicing nodes included in the slicing cluster, wherein the information comprises a slicing node name for sending the information; and determining the main slicing node according to the number of names of each slicing node and the weight of each slicing node in an information set, wherein the information set is formed by the information received by each slicing node first, and the weight is determined according to the number of processors of each slicing node, the current load and the service availability.
According to one or more embodiments of the present disclosure, example six provides the method of example three, wherein the generating the piece of information according to the attribute of each of the monitoring device and the monitored host includes: and determining the monitoring device corresponding to each monitored host according to the geographical distance from the monitored host to each monitoring device and the load and the number of processors of each monitoring device, and obtaining the fragment information representing the monitoring device corresponding to each monitored host.
According to one or more embodiments of the present disclosure, example seven provides the method of any one of examples two to six, further comprising, in a case where the sharded node is a master sharded node in the sharded cluster: when deleting or adding a monitored host corresponding to the monitoring device, deleting or adding the corresponding relation between the monitoring device and the monitored host in the slicing information, and indicating that the monitoring device does not acquire or acquire the monitoring data of the monitoring host; and synchronizing the slicing information after deleting or adding the corresponding relation between the monitoring device and the monitored host to other slicing nodes included in the slicing cluster.
According to one or more embodiments of the present disclosure, an example eight provides a monitoring method applied to a monitoring device in a monitoring system, the monitoring system including a shard cluster and a plurality of monitoring devices, the shard cluster including a plurality of shard nodes, the method comprising: receiving a second query request sent by the slicing node, wherein the second query request comprises identification information of a target monitored host included in a first query request, and the first query request is sent to the slicing cluster by a request end and is acquired by the slicing node; and returning the monitoring data of each target monitoring host according to the second query request.
According to one or more embodiments of the present disclosure, example nine provides a sharded node applied to a monitoring system, the monitoring system including a sharded cluster and a plurality of monitoring devices, the sharded cluster including a plurality of sharded nodes, the sharded node including: the first query request acquisition module is used for acquiring a first query request which is sent to the fragment cluster by a request end and comprises identification information of at least one target monitored host; the target monitoring device acquisition module is used for determining a target monitoring device corresponding to each target monitored host according to the identification information of each target monitored host and the fragmentation information, wherein the fragmentation information represents the corresponding relation between each monitored host and the monitoring device; a second query request sending module, configured to send a second query request to each target monitoring device, where the second query request includes identification information of a target monitored host included in the first query request; the monitoring data receiving module is used for receiving monitoring data returned by each target monitoring device according to the second query request; and the monitoring data return module is used for returning the received monitoring data to the request end.
According to one or more embodiments of the present disclosure, example ten provides a control apparatus applied to a monitoring system including a sharded cluster including a plurality of sharded nodes and a plurality of monitoring apparatuses including: the second query request receiving module is used for receiving a second query request sent by the slicing node, wherein the second query request comprises identification information of a target monitored host included in a first query request, and the first query request is sent to the slicing cluster by a request end and is acquired by the slicing node; and the second query request response module is used for returning the monitoring data of each target monitoring host according to the second query request.
According to one or more embodiments of the present disclosure, example eleven provides a monitoring system comprising a sharded cluster comprising a plurality of sharded nodes, the sharded nodes being the sharded nodes described in example nine, and/or a plurality of monitoring devices, the monitoring devices being the monitoring devices described in example ten.
According to one or more embodiments of the present disclosure, example twelve provides a computer-readable medium having stored thereon a computer program which, when executed by a processing device, implements the steps of the method of any of examples one to eight.
According to one or more embodiments of the present disclosure, an example thirteen provides an electronic device, comprising: a storage device having a computer program stored thereon; processing means for executing the computer program in the storage means to implement the steps of the method of any one of examples one to eight.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims. The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.

Claims (10)

1. A monitoring method, characterized by being applied to a sliced node in a monitoring system, the monitoring system comprising a sliced cluster and a plurality of monitoring devices, the sliced cluster comprising a plurality of sliced nodes, the method comprising:
acquiring a first query request, wherein the first query request is sent to the fragment cluster by a request end, and the first query request comprises identification information of at least one target monitored host;
determining a target monitoring device corresponding to each target monitored host according to the identification information of each target monitored host and the fragment information, wherein the fragment information represents the corresponding relation between each monitored host and the monitoring device;
Sending a second query request to each target monitoring device, wherein the second query request comprises identification information of a target monitored host included in the first query request;
receiving monitoring data returned by each target monitoring device according to the second query request;
returning the received monitoring data to the request end;
in the case that the sharded node is a master sharded node in the sharded cluster, the method further comprises:
generating the slicing information according to the attribute of each monitoring device and the monitored host, and synchronizing the slicing information to other slicing nodes included in the slicing cluster;
the monitoring device is instructed to acquire the monitoring data of the corresponding monitored host according to the slicing information;
the main slicing node is determined by the following steps:
each slicing node multicasts information to other slicing nodes included in the slicing cluster, wherein the information comprises a slicing node name for sending the information;
and determining the main slicing node according to the number of names of each slicing node and the weight of each slicing node in an information set, wherein the information set is formed by the information received by each slicing node first, and the weight is determined according to the number of processors of each slicing node, the current load and the service availability.
2. The method of claim 1, wherein receiving the monitoring data returned by each of the target monitoring devices according to the second query request comprises:
and receiving monitoring data locally stored by each target monitoring device returned by each target monitoring device according to the second query request.
3. The method of claim 1, wherein generating the shard information based on the attributes of each of the monitoring device and the monitored host comprises:
and determining the monitoring device corresponding to each monitored host according to the geographical distance from the monitored host to each monitoring device and the load and the number of processors of each monitoring device, and obtaining the fragment information representing the monitoring device corresponding to each monitored host.
4. A method according to claim 2 or 3, wherein in case the shard node is a master shard node in the shard cluster, the method further comprises:
when deleting or adding a monitored host corresponding to the monitoring device, deleting or adding the corresponding relation between the monitoring device and the monitored host in the slicing information, and indicating that the monitoring device does not acquire or acquire the monitoring data of the monitoring host;
And synchronizing the slicing information after deleting or adding the corresponding relation between the monitoring device and the monitored host to other slicing nodes included in the slicing cluster.
5. A monitoring method, characterized by being applied to a monitoring device in a monitoring system, the monitoring system comprising a shard cluster and a plurality of monitoring devices, the shard cluster comprising a plurality of shard nodes, the method comprising:
receiving a second query request sent by the slicing node, wherein the second query request comprises identification information of a target monitored host included in a first query request, and the first query request is sent to the slicing cluster by a request end and is acquired by the slicing node;
returning the monitoring data of each target monitored host according to the second query request;
the method further comprises the steps of:
receiving the slicing information sent by a main slicing node in the slicing cluster, and acquiring and storing monitoring data of corresponding monitored hosts according to the slicing information, wherein the slicing information represents the corresponding relation between each monitored host and a monitoring device;
the main slicing node is determined by the following steps:
each slicing node multicasts information to other slicing nodes included in the slicing cluster, wherein the information comprises a slicing node name for sending the information;
And determining the main slicing node according to the number of names of each slicing node and the weight of each slicing node in an information set, wherein the information set is formed by the information received by each slicing node first, and the weight is determined according to the number of processors of each slicing node, the current load and the service availability.
6. The utility model provides a shard node, its characterized in that is applied to monitored control system, monitored control system includes shard cluster and a plurality of monitoring device, shard cluster includes a plurality of shard nodes, shard node includes:
the first query request acquisition module is used for acquiring a first query request which is sent to the fragment cluster by a request end and comprises identification information of at least one target monitored host;
the target monitoring device acquisition module is used for determining a target monitoring device corresponding to each target monitored host according to the identification information of each target monitored host and the fragmentation information, wherein the fragmentation information represents the corresponding relation between each monitored host and the monitoring device;
a second query request sending module, configured to send a second query request to each target monitoring device, where the second query request includes identification information of a target monitored host included in the first query request;
The monitoring data receiving module is used for receiving monitoring data returned by each target monitoring device according to the second query request;
the monitoring data return module is used for returning the received monitoring data to the request end;
in the case that the shard node is a master shard node in the shard cluster, the shard node further includes:
the slicing information generation module is used for generating the slicing information according to the attribute of each monitoring device and the monitored host, and synchronizing the slicing information to other slicing nodes included in the slicing cluster;
the slicing module is used for indicating the monitoring device to acquire the monitoring data of the corresponding monitored host according to the slicing information;
the main slicing node is determined by the following steps:
each slicing node multicasts information to other slicing nodes included in the slicing cluster, wherein the information comprises a slicing node name for sending the information;
and determining the main slicing node according to the number of names of each slicing node and the weight of each slicing node in an information set, wherein the information set is formed by the information received by each slicing node first, and the weight is determined according to the number of processors of each slicing node, the current load and the service availability.
7. A monitoring device, characterized in that is applied to monitored control system, monitored control system includes a burst cluster and a plurality of monitoring device, the burst cluster includes a plurality of burst nodes, the monitoring device includes:
the second query request receiving module is used for receiving a second query request sent by the slicing node, wherein the second query request comprises identification information of a target monitored host included in a first query request, and the first query request is sent to the slicing cluster by a request end and is acquired by the slicing node;
the second query request response module is used for returning the monitoring data of each target monitored host according to the second query request;
the monitoring module is used for receiving the slicing information sent by the main slicing node in the slicing cluster, acquiring and storing the monitoring data of the corresponding monitored host according to the slicing information, and the slicing information represents the corresponding relation between each monitored host and the monitoring device;
the main slicing node is determined by the following steps:
each slicing node multicasts information to other slicing nodes included in the slicing cluster, wherein the information comprises a slicing node name for sending the information;
And determining the main slicing node according to the number of names of each slicing node and the weight of each slicing node in an information set, wherein the information set is formed by the information received by each slicing node first, and the weight is determined according to the number of processors of each slicing node, the current load and the service availability.
8. A monitoring system, characterized in that the monitoring system comprises a sliced cluster and a plurality of monitoring devices, the sliced cluster comprises a plurality of sliced nodes, the sliced nodes are the sliced nodes according to claim 6, and/or the monitoring devices are the monitoring devices according to claim 7.
9. A computer readable medium on which a computer program is stored, characterized in that the program, when being executed by a processing device, carries out the steps of the method according to any one of claims 1-5.
10. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing said computer program in said storage means to carry out the steps of the method according to any one of claims 1-5.
CN202010079098.XA 2020-02-03 2020-02-03 Monitoring method, monitoring system, readable medium and electronic equipment Active CN111309549B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010079098.XA CN111309549B (en) 2020-02-03 2020-02-03 Monitoring method, monitoring system, readable medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010079098.XA CN111309549B (en) 2020-02-03 2020-02-03 Monitoring method, monitoring system, readable medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111309549A CN111309549A (en) 2020-06-19
CN111309549B true CN111309549B (en) 2023-04-21

Family

ID=71145446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010079098.XA Active CN111309549B (en) 2020-02-03 2020-02-03 Monitoring method, monitoring system, readable medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111309549B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252603A (en) * 2008-04-11 2008-08-27 清华大学 Cluster distributed type lock management method based on storage area network SAN
CN105703940A (en) * 2015-12-10 2016-06-22 中国电力科学研究院 Multistage dispatching distributed parallel computing-oriented monitoring system and monitoring method
CN107733986A (en) * 2017-09-15 2018-02-23 中国南方电网有限责任公司 Support the protection of integrated deployment and monitoring operation big data support platform
CN109597810A (en) * 2018-11-21 2019-04-09 金色熊猫有限公司 A kind of task cutting method, device, medium and electronic equipment
CN109861887A (en) * 2019-02-27 2019-06-07 山东浪潮云信息技术有限公司 A kind of OpenTsdb service indication polymerization based on Zookeeper
CN109977161A (en) * 2019-03-28 2019-07-05 上海中通吉网络技术有限公司 The monitoring system of presto cluster
CN110704453A (en) * 2019-10-15 2020-01-17 腾讯音乐娱乐科技(深圳)有限公司 Data query method and device, storage medium and electronic equipment
CN110704872A (en) * 2019-09-24 2020-01-17 天津卓朗科技发展有限公司 Data query method and device, electronic equipment and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8549364B2 (en) * 2009-02-18 2013-10-01 Vmware, Inc. Failure detection and recovery of host computers in a cluster
US11544288B2 (en) * 2010-12-23 2023-01-03 Mongodb, Inc. Systems and methods for managing distributed database deployments

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252603A (en) * 2008-04-11 2008-08-27 清华大学 Cluster distributed type lock management method based on storage area network SAN
CN105703940A (en) * 2015-12-10 2016-06-22 中国电力科学研究院 Multistage dispatching distributed parallel computing-oriented monitoring system and monitoring method
CN107733986A (en) * 2017-09-15 2018-02-23 中国南方电网有限责任公司 Support the protection of integrated deployment and monitoring operation big data support platform
CN109597810A (en) * 2018-11-21 2019-04-09 金色熊猫有限公司 A kind of task cutting method, device, medium and electronic equipment
CN109861887A (en) * 2019-02-27 2019-06-07 山东浪潮云信息技术有限公司 A kind of OpenTsdb service indication polymerization based on Zookeeper
CN109977161A (en) * 2019-03-28 2019-07-05 上海中通吉网络技术有限公司 The monitoring system of presto cluster
CN110704872A (en) * 2019-09-24 2020-01-17 天津卓朗科技发展有限公司 Data query method and device, electronic equipment and computer readable storage medium
CN110704453A (en) * 2019-10-15 2020-01-17 腾讯音乐娱乐科技(深圳)有限公司 Data query method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN111309549A (en) 2020-06-19

Similar Documents

Publication Publication Date Title
CN110909521B (en) Online document information synchronous processing method and device and electronic equipment
CN111400625B (en) Page processing method and device, electronic equipment and computer readable storage medium
CN115757400B (en) Data table processing method, device, electronic equipment and computer readable medium
CN112379982B (en) Task processing method, device, electronic equipment and computer readable storage medium
CN112035529A (en) Caching method and device, electronic equipment and computer readable storage medium
CN112099982A (en) Collapse information positioning method, device, medium and electronic equipment
CN114637703B (en) Data access device, method, readable medium and electronic equipment
CN111241137B (en) Data processing method, device, electronic equipment and storage medium
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN111262907B (en) Service instance access method and device and electronic equipment
CN111309549B (en) Monitoring method, monitoring system, readable medium and electronic equipment
CN113420400B (en) Routing relation establishment method, request processing method, device and equipment
CN112507676B (en) Method and device for generating energy report, electronic equipment and computer readable medium
CN112100211B (en) Data storage method, apparatus, electronic device, and computer readable medium
CN110941683B (en) Method, device, medium and electronic equipment for acquiring object attribute information in space
CN111143355B (en) Data processing method and device
CN112311840A (en) Multi-terminal data synchronization method, device, equipment and medium
CN113239301A (en) Page loading request method and device and electronic equipment
CN111787043A (en) Data request method and device
CN111597439A (en) Information processing method and device and electronic equipment
CN112948108B (en) Request processing method and device and electronic equipment
CN115225586B (en) Data packet transmitting method, device, equipment and computer readable storage medium
CN113157695B (en) Data processing method and device, readable medium and electronic equipment
CN111258670B (en) Method and device for managing component data, electronic equipment and storage medium
CN113157365B (en) Program running method, program running device, electronic equipment and computer readable medium

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