[go: up one dir, main page]

CN102142971B - Realize supervisory control system and the method for supervising of subscription-collection mechanism - Google Patents

Realize supervisory control system and the method for supervising of subscription-collection mechanism Download PDF

Info

Publication number
CN102142971B
CN102142971B CN201010104037.0A CN201010104037A CN102142971B CN 102142971 B CN102142971 B CN 102142971B CN 201010104037 A CN201010104037 A CN 201010104037A CN 102142971 B CN102142971 B CN 102142971B
Authority
CN
China
Prior art keywords
client
data
collector
adapter
subscription
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.)
Expired - Fee Related
Application number
CN201010104037.0A
Other languages
Chinese (zh)
Other versions
CN102142971A (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.)
China Digital Video Beijing Ltd
Original Assignee
China Digital Video Beijing 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 China Digital Video Beijing Ltd filed Critical China Digital Video Beijing Ltd
Priority to CN201010104037.0A priority Critical patent/CN102142971B/en
Publication of CN102142971A publication Critical patent/CN102142971A/en
Application granted granted Critical
Publication of CN102142971B publication Critical patent/CN102142971B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a kind of supervisory control system realizing subscription-collection mechanism, comprise: subscribe to processor, comprise subscription and accept module, associated record module and distribution scheduling module, described subscription accepts module for receiving the subscribe request of client, and be that corresponding client creates adapter according to described subscribe request, and, for corresponding watch-dog creates gatherer; Described associated record module is for recording the incidence relation of corresponding adapter and gatherer; Described distribution scheduling module indicates for providing the scheduling of distributor; Gatherer, for the achievement data of collection monitoring equipment; Distributor, for according to described scheduling instruction, is distributed to the adapter be associated by the achievement data of collection; Adapter, comprises the data that cache module forwards for distributor described in buffer memory, and described sending module is used for the data in described buffer memory to send to client.The present invention can realize various communication protocol, and effectively reduces network traffics.

Description

Monitoring system and monitoring method for realizing subscription-collection mechanism
Technical Field
The present invention relates to the technical field of data monitoring, and in particular, to a monitoring system and a monitoring method for implementing a subscription-collection mechanism.
Background
With the continuous development of computer and network technologies, more and more enterprises and users build computer clusters meeting various business requirements based on networks. The computers inside the cluster work independently of each other, providing services to the outside as a whole. Such as weather forecast and program production and broadcasting of television stations, are usually completed by a computer cluster.
Monitoring techniques have been developed to better manage the software and hardware resources in a cluster. In brief, the monitoring technology is to record or remotely check the running condition and task execution condition of computer software and hardware to know whether each index of the computer is normal. Currently, a monitoring system generally adopts a proxy-server structure, or a proxy-server-client structure, and a C/S (client/server) or B/S (browser/server) mode is generally adopted between a server and a client, and communication between a proxy and a server is generally performed based on an SNMP protocol or a TCP/UDP protocol.
However, in the prior art, the communication protocol between the proxy and the server is generally fixed and written down, so that the function of the server is not easy to expand. Moreover, the server often obtains information by polling the agents, that is, actively querying all the agents at regular intervals, and returning the queried node value by each agent, obviously, this method will cause a problem of huge network traffic.
Therefore, one technical problem that needs to be urgently solved by those skilled in the art is: how to creatively provide a monitoring scheme for realizing a subscription-collection mechanism so as to realize various communication protocols and effectively reduce network traffic.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a monitoring system and method for implementing a subscription-collection mechanism, so as to implement various communication protocols and effectively reduce network traffic.
In order to solve the above technical problem, an embodiment of the present invention discloses a monitoring system for implementing a subscription-collection mechanism, including:
the subscription processor comprises a subscription receiving module, an association recording module and a distribution scheduling module, wherein the subscription receiving module is used for receiving a subscription request of a client, creating an adapter for the corresponding client according to the subscription request and creating a collector for the corresponding monitoring equipment; the association recording module is used for recording the association relation between the corresponding adapter and the collector; the distribution scheduling module is used for providing scheduling indication of the distributor;
the collector is connected with the monitoring equipment and used for collecting index data of the monitoring equipment;
a distributor for distributing the metric data collected by the collector to an associated adapter in accordance with the scheduling indication;
the adapter is connected with the client and comprises a caching module and a sending module, wherein the caching module is used for caching the data forwarded by the distributor, and the sending module is used for sending the data in the cache to the client.
Preferably, the adapter further comprises:
and the clearing module is used for clearing the cache when all the data in the cache is sent to the client.
Preferably, the adapter further comprises:
and the deleting module is used for extracting the data in the cache when the client side does not exist in the preset time, and deleting the data in the current cache according to a first-in first-out principle when the cache space is full.
Preferably, the subscription processor further comprises:
and the subscription canceling module is used for receiving a subscription canceling request of the client, canceling the adapter of the corresponding client according to the subscription canceling request, deleting the association relationship between the adapter and the collector, and canceling the collector when the corresponding collector has no other associated adapters.
Preferably, the collector comprises a plurality of collectors, and the plurality of collectors are dispatched in series by a single thread, or the plurality of collectors are dispatched in parallel by threads of the respective collectors.
Preferably, the collector comprises an active collector and/or a passive collector;
the active collector is used for sending a request for inquiring a certain indication to an agent program on the monitoring equipment and receiving index data returned by the agent program;
and the passive collector is used for receiving the index data sent by the agent program on the monitoring equipment and returning a received command.
Preferably, the adapter sending module comprises a data pushing submodule and/or a client polling submodule;
the data pushing submodule is used for directly pushing data to a client through a preset client interface;
and the client polling submodule is used for responding to the polling of the client through a preset adapter interface and providing data to the client.
Preferably, the adapter further comprises:
the filtering module is used for filtering the related data forwarded by the distributor according to a preset filtering rule;
and/or the presence of a gas in the gas,
and the format conversion module is used for organizing the related data forwarded by the distributor into a displayable format according to the requirement of the client.
Preferably, the subscription processor further comprises:
and the overtime processing module is used for judging whether the time for extracting the data by the client exceeds the preset time, and if so, calling the subscription cancellation module.
The embodiment of the invention also discloses a monitoring method for realizing the subscription-collection mechanism, which comprises the following steps:
receiving a subscription request of a client, creating an adapter for the corresponding client according to the subscription request, and creating a collector for the corresponding monitoring equipment;
recording the association relationship between the corresponding adapter and the collector;
the collector collects index data of the monitoring equipment;
distributing the metric data to an associated adapter;
the adapter caches the data forwarded by the distributor and sends the cached data to a client.
Preferably, the method further comprises:
and when all the data in the cache is sent to the client, emptying the cache.
Preferably, the method further comprises:
and when the client does not extract the data in the cache within the preset time, and the cache space is full, deleting the data in the current cache according to a first-in first-out principle.
Preferably, the method further comprises:
receiving a subscription cancellation request of a client, canceling the corresponding adapter of the client according to the subscription cancellation request, deleting the association relationship between the adapter and the collector, and canceling the collector when the corresponding collector has no other associated adapters.
Preferably, the collector includes a plurality of collectors, and the step of collecting the monitoring device index data by the plurality of collectors includes:
adding the plurality of collectors to a collector queue;
and starting the single thread to sequentially call each collector according to the collector queue, and sequentially polling index data of the monitoring equipment connected with each collector.
Preferably, the collector includes a plurality of collectors, and the step of collecting the monitoring device index data by the plurality of collectors includes:
and respectively creating corresponding threads for each collector, and sequentially polling index data of the connected monitoring equipment by each collector in parallel.
Preferably, the collector comprises an active collector and/or a passive collector; the step of sequentially polling the corresponding index data of the monitoring devices connected to the active collector further comprises:
sending a request for inquiring a certain instruction to an agent program on the monitoring equipment, and receiving index data returned by the agent program;
the step of the passive collector sequentially polling the corresponding index data of the monitoring devices connected thereto further comprises:
and receiving the index data sent by the agent program on the monitoring equipment, and returning a received command.
Preferably, the step of sending the data in the cache to the client includes:
directly pushing data to a client through a preset client interface;
or,
data is provided to the client in response to polling of the client through a preset adapter interface.
Preferably, the method further comprises:
filtering the distributed related data according to a preset filtering rule;
and/or the presence of a gas in the gas,
and organizing the distributed related data into a displayable format according to the requirements of the client.
Preferably, the subscription request includes client data obtaining mode information, and the step of sending the cached data to the client further includes:
sending the data cached for a period of time to the client according to the client data acquisition mode information;
or,
and immediately sending the data entering the cache to the client according to the client data acquisition mode information.
Preferably, the method further comprises:
and judging whether the time for extracting the data by the client exceeds the preset time, if so, calling the subscription cancellation step.
Compared with the prior art, the invention has the following advantages:
the invention establishes an adapter for a corresponding client and a collector for a corresponding monitoring device by realizing a subscription-collection mechanism according to a subscription request of the client to related index data of a target monitoring device; only when the client needs the index data of a certain monitoring device, the collector starts to collect the index data of the corresponding monitoring device, the index data is forwarded to all subscribed adapters through the distributor, and then the adapters provide the data to the client. The invention starts to collect data only when the client makes a request, and suspends the data collection when the client does not need the data collection, thereby effectively reducing the network flow.
And, since a layer of collector is added between the server and the agent, it can be used to implement various communication protocols, so that the server can process all information uniformly no matter what communication protocol is obtained.
Furthermore, the dispenser of the present invention allows the collector and adapter to be loosely coupled, while also allowing the collector and adapter to be easily expandable.
Drawings
FIG. 1 is a block diagram of an embodiment of a monitoring system implementing a subscription-collection mechanism of the present invention;
FIG. 2 is a schematic diagram of a collector parallel scheduling scheme of the present invention;
FIG. 3 is a schematic diagram of a collector serial scheduling scheme of the present invention;
FIG. 4 is a schematic diagram of the construction of an adapter in a preferred embodiment of the invention;
fig. 5 is a flow chart of an embodiment of a monitoring method for implementing a subscription-collection mechanism according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
One of the core concepts of the embodiments of the present invention is to create an adapter for a corresponding client and a collector for a corresponding monitoring device by implementing a subscription-collection mechanism, that is, according to a subscription request of the client to related index data of a target monitoring device; only when the client needs the index data of a certain monitoring device, the collector starts to collect the index data of the corresponding monitoring device, the index data is forwarded to all subscribed adapters through the distributor, and then the adapters provide the data to the client. The invention starts to collect data only when the client makes a request, and suspends the data collection when the client does not need the data collection, thereby effectively reducing the network flow. And, since a layer of collector is added between the server and the agent, it can be used to implement various communication protocols, so that the server can process all information uniformly no matter what communication protocol is obtained.
Referring to fig. 1, a block diagram of a monitoring system implementing a subscription-collection mechanism according to an embodiment of the present invention is shown, and specifically includes:
a subscription processor 11, including a subscription accepting module, an association recording module, and a distribution scheduling module, where the subscription accepting module is configured to receive a subscription request from a client, create an adapter 14 for the corresponding client according to the subscription request, and create a collector 12 for the corresponding monitoring device; the association recording module is used for recording the association relationship between the corresponding adapter 14 and the collector 12; the distribution scheduling module is used for providing scheduling indication of the distributor 13;
the collector 12 is connected with the monitoring equipment and used for collecting index data of the monitoring equipment;
a distributor 13 for distributing the metric data collected by the collector 12 to the associated adapter 14 in dependence on the scheduling indication;
the adapter 14 is connected to the client, and includes a cache module and a sending module, where the cache module is configured to cache the data forwarded by the distributor, and the sending module is configured to send the data in the cache to the client.
In a specific implementation, the subscription request submitted by the client may include a subscriber (i.e., the current client), monitoring device information, and index data information. For management, after receiving the client subscription request containing the above content, the subscription accepting module of the subscription processor may generate a unique subscription number for the subscriber, and notify the client. Then searching whether the adapter of the subscriber exists in the stored adapter list, if not, creating an adapter for the subscriber, and adding the adapter to the adapter list; and meanwhile, searching whether the monitoring equipment information specified in the subscription request exists in the stored collector list, if not, creating one or more collectors aiming at the corresponding monitoring equipment, and adding the collectors into the collector list. In this case, the association recording module of the subscription processor may then establish an association relationship between the corresponding adapter and collector, and store the association relationship into the association list.
When a client submits a request for acquiring index data of corresponding monitoring equipment, if a collector is newly established or is in a pause state, starting the collector to start working; if the adapter is newly created or in a suspended state, the adapter is started to work.
The collector can comprise an active collector and/or a passive collector according to different data collection modes; specifically, the active collector may be configured to send a request for querying an indication to an agent on the monitoring device, and receive index data returned by the agent; for example, in a monitoring system for monitoring various software and hardware of a television station, the active collector may include a Simple Network Management Protocol (SNMP) information collector, a Simple Network Management Protocol (WMI) information collector, a database information collector, and the like. The passive collector can be used for receiving index data sent by an agent program on the monitoring equipment and returning a received command; for example, in a monitoring system for monitoring various software and hardware of a television station, the passive collector may include an SNMP alarm receiver, a WebService alarm receiver, and the like.
In practice, based on system requirements, multiple collectors are usually adopted, so as to ensure that a client displays timely update data, and even if a certain monitoring device fails and cannot be accessed, the real-time performance of collecting other monitoring device-related index data by the collectors is not affected. The manner of polling the index data may be performed according to the type of the current collector (active collector or passive collector), which is not described herein.
In order to reduce the resource occupation as much as possible, in another preferred embodiment of the present invention, a single-threaded serial scheduling mechanism for the collectors is further provided, and specifically, a schematic diagram of a collector serial scheduling scheme shown in fig. 3 may be referred to, that is, the system adds each collector into a collector queue, and simultaneously opens a single thread to sequentially call all the collectors according to the collector queue for processing, so that each collector sequentially polls all the monitoring indexes of the monitoring device connected thereto inside the system. The manner of polling the index data may be performed according to the type of the current collector (active collector or passive collector), which is not described herein.
In order to ensure that the client displays timely update of data under the single-threaded serial scheduling mechanism, in the embodiment, it is more preferable that, in the serial scheduling process, when polling a certain collector, it is detected whether the monitoring device connected to the certain collector can be accessed, and if not, it jumps to the next collector; defining a proper time period T, and when the polling time exceeds the time period T, firstly sending the data collected in the time period to processing and distribution; and then the client updates and displays partial data according to the received data.
In a specific application, the interaction between the adapter and the client may be in an adapter active push mode or a client polling mode. That is, as an example, the adapter sending module may include a data push sub-module, and/or a client polling sub-module; specifically, the data pushing sub-module is used for directly pushing the data to the client through a preset client interface; for example, the client interface may be a TCP interface, an SNMP interface, or the like; the client polling submodule is used for responding to the polling of the client through a preset adapter interface and providing data to the client; for example, the adapter interface may be a WebService interface, an SNMP interface, or the like.
Referring to fig. 4, in a preferred embodiment of the present invention, the adapter may further be provided with the following modules:
the filtering module 15 is configured to filter the relevant data forwarded by the distributor according to a preset filtering rule;
and/or the presence of a gas in the gas,
and the format conversion module 16 is used for organizing the related data forwarded by the distributor into a displayable format according to the requirements of the client.
As an example, the preset filtering rule may be set to a level assignment for alarm data and ignore no level alarms;
the format conversion module may organize the alarm data and the information data into a displayable format, and the like, specifically, an alarm description expression is defined for each adapter in a database, the expression has parameter statements, and the parameters are filled with actual data after the data are acquired. For the index obtained by SNMP protocol, the alarm description expression and parameter are automatically generated according to MIB definition file. For example, the alarm indicator mngmmtagenttap-17001 of the HP EVA storage device, the description generated from the MIB is defined as "hostname ═ { hostname }: occurrence time ═ occurrence time }: error code is { error code }: description, parameters include hostname, occurrence time, error code, and description. When alarm data is received, the actual values are filled in, and the following alarm description is formed: host name storage 1: the generation time is 2009-10-107: 50: error code 10001: the power supply 1 is described as failed. If the adapter 1 is a short message module, the format required by the adapter is relatively simple. The definition is described as hostname in time of occurrence description, the alarm received by the adapter describes storage1 in 2009-10-107: 50 for power 1 failure.
Of course, the two modules are only set when the system has a demand, and the purpose is to make the same index data meet the needs of different adapters, so as to increase the utilization rate of the data, and at the same time, facilitate the expansion of the adapters according to the needs. The specific function thereof will be determined by those skilled in the art according to the actual situation, and the present invention is not limited thereto.
It should be noted that, in the embodiment of the present invention, since the distributor is disposed between the collector and the adapter, so that the collector and the adapter form a loose coupling structure, expansion of functions of the collector and the adapter is facilitated. In this case, there are program level calls between the collector and the distributor, and the interaction between the distributor and the adapter may include program level calls and web service calls based on the SOAP protocol. Adapters inside the monitoring system, such as a database adapter and a monitoring client adapter, are all program level calls. The adapter outside the monitoring system is called by Webservice, the server opens a Webservice interface, and the adapter polls the interface call.
More preferably, in a specific implementation, the subscription request submitted by the client may further include client data acquisition mode information, and in this case, the sending module of the adapter may send the data cached for a period of time to the client according to the client data acquisition mode information; or, according to the client data acquisition mode information, immediately sending the data entering the cache to the client.
In order to fully utilize the resources, in a preferred embodiment of the present invention, the adapter may further include the following modules:
and the clearing module is used for clearing the cache when all the data in the cache is sent to the client.
And/or the presence of a gas in the gas,
and the deleting module is used for extracting the data in the cache when the client side does not exist in the preset time, and deleting the data in the current cache according to a first-in first-out principle when the cache space is full.
In order to process the subscription cancellation request submitted by the client, in a specific implementation, the subscription processor may further include the following modules:
and the subscription canceling module is used for receiving a subscription canceling request of the client, canceling the adapter of the corresponding client according to the subscription canceling request, deleting the association relationship between the adapter and the collector, and canceling the collector when the corresponding collector has no other associated adapters.
More preferably, in practice, when the client does not acquire data for a long time due to an exception, the subscription processor may further include the following module to perform timeout processing:
and the overtime processing module is used for judging whether the time for extracting the data by the client exceeds the preset time, and if so, calling the subscription cancellation module.
That is, with the present embodiment, the subscription processor may record the last time the client extracts data, and if the data is not updated for a long time, the data is considered to be overtime. And then invokes the subscription cancellation module to cancel the subscription of the client. In practice, the subscription can be further performed again when the client recovers to normal and re-acquires the data.
As an example of a practical application, the subscription processor, the collector, the distributor, and the adapter involved in the monitoring system implementing the subscription-collection mechanism of the present invention may be disposed in a server, that is, the monitoring system may adopt a structure of an agent end (monitoring device) -server-client.
Referring to fig. 5, a flowchart of an embodiment of a monitoring method for implementing a subscription-collection mechanism according to the present invention is shown, which specifically includes:
step 501, receiving a subscription request of a client, creating an adapter for the corresponding client according to the subscription request, and creating a collector for the corresponding monitoring device;
step 502, recording the association relationship between the corresponding adapter and collector;
step 503, the collector collects index data of the monitoring equipment;
step 504, distributing the index data to associated adapters;
and 505, the adapter caches the data forwarded by the distributor and sends the cached data to a client.
In a preferred embodiment of the present invention, the method may further include the steps of:
and when all the data in the cache is sent to the client, emptying the cache.
And when the client does not extract the data in the cache within the preset time, and the cache space is full, deleting the data in the current cache according to a first-in first-out principle.
If receiving a subscription cancellation request of a client, canceling the corresponding adapter of the client according to the subscription cancellation request, deleting the association relationship between the adapter and the collector, and canceling the collector when the corresponding collector has no other associated adapters.
In a specific implementation, the plurality of collectors may include a plurality of collectors, and in order to ensure that the client display data is updated timely, and even if a certain monitoring device fails and cannot be accessed, the real-time performance of the collector in collecting the index data related to other monitoring devices is not affected, in a preferred embodiment of the present invention, a multi-thread parallel scheduling mechanism for the collectors is provided, that is, in this embodiment, the step of collecting the index data of the monitoring devices by the plurality of collectors may specifically include the following sub-steps:
substep a1, adding the plurality of collectors to a collector queue;
and a substep A2, starting a single thread to sequentially call each collector according to the collector queue, and sequentially polling index data of the monitoring equipment connected with each collector inside each collector.
In order to reduce the occupation of resources as much as possible, in another preferred embodiment of the present invention, a single-threaded serial scheduling mechanism for collectors is further provided, that is, in this embodiment, the step of collecting the monitoring device indicator data by the plurality of collectors may specifically include the following sub-steps:
substep B1, creating corresponding threads for each collector respectively;
sub-step B2, each collector polls its connected monitoring device's index data sequentially in parallel.
In order to ensure that the client displays the timely update of the data under the single-thread serial scheduling mechanism, it is more preferable that in the serial scheduling process, when polling to a certain collector, whether the monitoring equipment connected with the certain collector can be accessed is detected, and if the monitoring equipment cannot be accessed, the next collector is jumped to; defining a proper time period T, and when the polling time exceeds the time period T, firstly sending the data collected in the time period to processing and distribution; and then the client updates and displays partial data according to the received data.
The collector comprises an active collector and/or a passive collector according to different data collection modes; specifically, the step of sequentially polling the active collector for the corresponding index data of the monitoring device connected thereto further includes:
sending a request for inquiring a certain instruction to an agent program on the monitoring equipment, and receiving index data returned by the agent program;
the step of the passive collector sequentially polling the corresponding index data of the monitoring devices connected thereto further comprises:
and receiving the index data sent by the agent program on the monitoring equipment, and returning a received command.
In the embodiment of the present invention, the interaction between the adapter and the client may adopt a mode of actively pushing the adapter, or may adopt a mode of polling the client. That is, the step of sending the data in the cache to the client specifically may include the following sub-steps:
substep C1, directly pushing the data to the client through a preset client interface;
or,
sub-step C2, providing data to the client in response to polling by the client through a preset adapter interface.
In order to make the same index data meet the requirements of different adapters, so as to increase the utilization rate of the data, and at the same time, facilitate the expansion of the adapters according to the requirements, the embodiment of the present invention may further include the following steps:
filtering the distributed related data according to a preset filtering rule;
and/or the presence of a gas in the gas,
and organizing the distributed related data into a displayable format according to the requirements of the client.
In a specific implementation, the subscription request submitted by the client may further include client data obtaining manner information, and in this case, the step of sending the data in the cache to the client may further include the following steps:
sending the data cached for a period of time to the client according to the client data acquisition mode information;
or,
and immediately sending the data entering the cache to the client according to the client data acquisition mode information.
More preferably, in practice, when the client does not obtain data for a long time due to an exception, the embodiment of the present invention may further include the following steps:
and judging whether the time for extracting the data by the client exceeds the preset time, if so, calling the subscription cancellation step.
In order to make the present invention more comprehensible to those skilled in the art, the present invention is further described below by dividing different processes.
Firstly, a subscription process:
1. a client calls a subscription processor to submit a subscription request, wherein the subscription request comprises information of a subscriber, monitoring equipment and index data;
2. the subscription processor generates a unique subscription number for each subscriber and informs the client;
3. the subscription processor searches whether the adapter of the subscriber already exists in the adapter list stored in the subscription processor, and if not, an adapter is created for the subscriber and added into the adapter list;
4. the subscription processor searches whether the monitoring equipment information specified in the subscription request exists in a stored collector list, and if not, creates one or more collectors for corresponding monitoring equipment and adds the collectors to the collector list;
5. the subscription processor establishes the association relationship between the corresponding adapter and collector and stores the association relationship in an association list;
6. if the collector is newly created or in a pause state, starting the collector to work; if the adapter is newly created or in a suspended state, the adapter is started to work.
II, working process:
1. the collector collects index data of the monitoring equipment and sends the data to the distributor;
2. the distributor distributes the index data collected by the collector to the associated adapters according to the association list according to the scheduling indication provided by the subscription processor;
3. the adapter caches the data forwarded by the distributor and sends the cached data for a period of time to the client according to the subscription requirement; or, the data entering the cache is immediately sent to the client.
4. After the client acquires data from the adapter, the adapter empties the cache;
5. and when the client does not acquire data from the adapter for a long time and the cache of the adapter is full, the adapter deletes the old data in the current cache according to a first-in first-out principle.
Thirdly, canceling the subscription process:
1. the client calls a subscription processor to cancel the subscription, and the request for canceling the subscription contains a subscription number;
2. the subscription processor finds the corresponding association from the association list and deletes the association;
3. the subscription processor finds the corresponding adapter from the adapter list and cancels the adapter;
4. the subscription handler finds the corresponding collector from the list of collectors, checks if the collector is still associated with other adapters, if not, revokes the collector, otherwise, does not do the revocation.
Fourthly, overtime processing:
1. when the client does not acquire data for a long time due to abnormality, the subscription processor records the time of acquiring the data last time by the client, updates the time when acquiring the data each time, and considers overtime if the data is not updated for a long time;
2. canceling the subscription of the corresponding adapter according to the process of canceling the subscription;
3. and when the client returns to normal and acquires the data again, the client performs subscription again.
Since the present embodiment basically corresponds to the system embodiment described above, details of the present embodiment are not described in detail, and reference may be made to the related description in the foregoing embodiment, which is not repeated herein. Moreover, it should be noted that while for simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it should be appreciated by those skilled in the art that the present invention is not limited by the illustrated ordering of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
The invention is operational with numerous general purpose or special purpose computing system environments or configurations. For example: multiprocessor systems, servers, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The foregoing describes in detail a monitoring system for implementing a subscription-collection mechanism and a monitoring method for implementing a subscription-collection mechanism provided by the present invention, and a specific example is applied in the present document to explain the principle and the implementation of the present invention, and the description of the foregoing embodiments is only used to help understand the method of the present invention and the core idea thereof; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (18)

1. A monitoring system implementing a subscription-collection mechanism, comprising:
the subscription processor comprises a subscription receiving module, an association recording module and a distribution scheduling module, wherein the subscription receiving module is used for receiving a subscription request of a client, creating an adapter for the corresponding client according to the subscription request and creating a collector for the corresponding monitoring equipment; the association recording module is used for recording the association relation between the corresponding adapter and the collector; the distribution scheduling module is used for providing scheduling indication of the distributor;
the collector is connected with the monitoring equipment and used for collecting index data of the monitoring equipment;
a distributor for distributing the metric data collected by the collector to an associated adapter in accordance with the scheduling indication;
the adapter is connected with the client and comprises a cache module and a sending module, wherein the cache module is used for caching the data forwarded by the distributor, and the sending module is used for sending the data in the cache to the client;
the subscription processor further comprises: and the subscription canceling module is used for receiving a subscription canceling request of the client, canceling the adapter of the corresponding client according to the subscription canceling request, deleting the association relationship between the adapter and the collector, and canceling the collector when the corresponding collector has no other associated adapters.
2. The system of claim 1, wherein the adapter further comprises:
and the clearing module is used for clearing the cache when all the data in the cache is sent to the client.
3. The system of claim 1 or 2, wherein the adapter further comprises:
and the deleting module is used for extracting the data in the cache when the client side does not exist in the preset time, and deleting the data in the current cache according to a first-in first-out principle when the cache space is full.
4. The system of claim 1, wherein the collector comprises a plurality of collectors that are scheduled serially by a single thread or that are scheduled in parallel by threads of respective collectors.
5. The system of claim 4, wherein the collector comprises an active collector and/or a passive collector;
the active collector is used for sending a request for inquiring a certain indication to an agent program on the monitoring equipment and receiving index data returned by the agent program;
and the passive collector is used for receiving the index data sent by the agent program on the monitoring equipment and returning a received command.
6. The system of claim 1, wherein the adapter sending module comprises a data push sub-module and/or a client polling sub-module;
the data pushing submodule is used for directly pushing data to a client through a preset client interface;
and the client polling submodule is used for responding to the polling of the client through a preset adapter interface and providing data to the client.
7. The system of claim 1, wherein the adapter further comprises:
the filtering module is used for filtering the related data forwarded by the distributor according to a preset filtering rule;
and/or the presence of a gas in the gas,
and the format conversion module is used for organizing the related data forwarded by the distributor into a displayable format according to the requirement of the client.
8. The system of claim 1, wherein the subscription processor further comprises:
and the overtime processing module is used for judging whether the time for extracting the data by the client exceeds the preset time, and if so, calling the subscription cancellation module.
9. A monitoring method for implementing a subscription-collection mechanism, comprising:
receiving a subscription request of a client, creating an adapter for the corresponding client according to the subscription request, and creating a collector for the corresponding monitoring equipment;
recording the association relationship between the corresponding adapter and the collector;
the collector collects index data of the monitoring equipment;
distributing the metric data to an associated adapter;
the adapter caches the data forwarded by the distributor and sends the cached data to a client;
receiving a subscription cancellation request of a client, canceling the corresponding adapter of the client according to the subscription cancellation request, deleting the association relationship between the adapter and the collector, and canceling the collector when the corresponding collector has no other associated adapters.
10. The method of claim 9, further comprising:
and when all the data in the cache is sent to the client, emptying the cache.
11. The method of claim 9 or 10, further comprising:
and when the client does not extract the data in the cache within the preset time, and the cache space is full, deleting the data in the current cache according to a first-in first-out principle.
12. The method of claim 9, wherein the collector comprises a plurality of collectors, the step of collecting monitoring device metric data by the plurality of collectors comprising:
adding the plurality of collectors to a collector queue;
and starting the single thread to sequentially call each collector according to the collector queue, and sequentially polling index data of the monitoring equipment connected with each collector.
13. The method of claim 9, wherein the collector comprises a plurality of collectors, the step of collecting monitoring device metric data by the plurality of collectors comprising:
and respectively creating corresponding threads for each collector, and sequentially polling index data of the connected monitoring equipment by each collector in parallel.
14. The method of claim 12 or 13, wherein the collector comprises an active collector and/or a passive collector; the step of sequentially polling the corresponding index data of the monitoring devices connected to the active collector further comprises:
sending a request for inquiring a certain instruction to an agent program on the monitoring equipment, and receiving index data returned by the agent program;
the step of the passive collector sequentially polling the corresponding index data of the monitoring devices connected thereto further comprises:
and receiving the index data sent by the agent program on the monitoring equipment, and returning a received command.
15. The method of claim 9, wherein the step of sending the data in the cache to a client comprises:
directly pushing data to a client through a preset client interface;
or,
data is provided to the client in response to polling of the client through a preset adapter interface.
16. The method of claim 9, further comprising:
filtering the distributed related data according to a preset filtering rule;
and/or the presence of a gas in the gas,
and organizing the distributed related data into a displayable format according to the requirements of the client.
17. The method of claim 9, wherein the subscription request includes client data acquisition mode information, and the step of sending the cached data to the client further comprises:
sending the data cached for a period of time to the client according to the client data acquisition mode information;
or,
and immediately sending the data entering the cache to the client according to the client data acquisition mode information.
18. The method of claim 9, further comprising:
and judging whether the time for extracting the data by the client exceeds the preset time, if so, calling the subscription cancellation step.
CN201010104037.0A 2010-01-29 2010-01-29 Realize supervisory control system and the method for supervising of subscription-collection mechanism Expired - Fee Related CN102142971B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010104037.0A CN102142971B (en) 2010-01-29 2010-01-29 Realize supervisory control system and the method for supervising of subscription-collection mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010104037.0A CN102142971B (en) 2010-01-29 2010-01-29 Realize supervisory control system and the method for supervising of subscription-collection mechanism

Publications (2)

Publication Number Publication Date
CN102142971A CN102142971A (en) 2011-08-03
CN102142971B true CN102142971B (en) 2015-08-19

Family

ID=44410217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010104037.0A Expired - Fee Related CN102142971B (en) 2010-01-29 2010-01-29 Realize supervisory control system and the method for supervising of subscription-collection mechanism

Country Status (1)

Country Link
CN (1) CN102142971B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624583B (en) * 2012-02-29 2016-06-01 武汉虹信通信技术有限责任公司 The layered design method that the concurrent real-time parameter of a kind of bulk device obtains
US9407450B2 (en) * 2012-05-01 2016-08-02 Cisco Technnology, Inc. Method and apparatus for providing tenant information for network flows
CN204440124U (en) * 2013-03-13 2015-07-01 阿斯科动力科技公司 System in fire pump room
CN106294607A (en) * 2016-07-29 2017-01-04 北京奇虎科技有限公司 Data cached update method and updating device
US10270726B2 (en) * 2017-02-24 2019-04-23 Satori Worldwide, Llc Selective distribution of messages in a scalable, real-time messaging system
CN107332787A (en) * 2017-06-29 2017-11-07 北京奇艺世纪科技有限公司 A kind of message distributing method and device
CN108287783A (en) * 2018-01-02 2018-07-17 浪潮通用软件有限公司 A kind of collecting method and device
CN114095583A (en) * 2021-10-28 2022-02-25 翌飞锐特电子商务(北京)有限公司 A method for electronic data exchange of air cargo
CN114119096A (en) * 2021-11-30 2022-03-01 中国建设银行股份有限公司 Data receiving method, apparatus, device and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002017150A1 (en) * 2000-08-23 2002-02-28 Pri Automation, Inc. Web based tool control in a semiconductor fabrication facility
WO2006072609A2 (en) * 2005-01-10 2006-07-13 International Business Machines Corporation Systems with message integration for data exchange, collection, monitoring and/or alerting
CN101511095A (en) * 2008-11-26 2009-08-19 中国移动通信集团广东有限公司 Base station alarm intelligent monitoring system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002017150A1 (en) * 2000-08-23 2002-02-28 Pri Automation, Inc. Web based tool control in a semiconductor fabrication facility
WO2006072609A2 (en) * 2005-01-10 2006-07-13 International Business Machines Corporation Systems with message integration for data exchange, collection, monitoring and/or alerting
CN101511095A (en) * 2008-11-26 2009-08-19 中国移动通信集团广东有限公司 Base station alarm intelligent monitoring system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
大众网网络监控系统的分析与设计;刘超;《中国优秀硕士学位论文全文数据库信息科技辑》;20090515;I138-568 *
范军涛,李国庆.实用的机群监控系统.《计算机工程与设计》.2008,第29卷(第1期),第190-212页. *

Also Published As

Publication number Publication date
CN102142971A (en) 2011-08-03

Similar Documents

Publication Publication Date Title
CN102142971B (en) Realize supervisory control system and the method for supervising of subscription-collection mechanism
CN113422842B (en) Distributed power utilization information data acquisition system considering network load
CN102195825B (en) A kind of client and the complete mutual supervisory control system of server and method for supervising thereof
CN113596150B (en) Message pushing method, device, computer equipment and storage medium
CN111885439B (en) Optical network integrated management and duty management system
CN102045197B (en) Alarm data synchronization method and network management system
CN101719852B (en) Method and device for monitoring performance of middleware
CN111464612B (en) Method for providing stable computing service in severe environment
CN114615096B (en) Event-driven architecture-based telecommunication charging method, system and related equipment
CN112437145A (en) Server cluster management method and device and related components
CN103795575A (en) Multi-data-centre-oriented system monitoring method
CN210804735U (en) Intelligent electric meter
CN102571383B (en) Access control method and system
CN114124662A (en) Resource intelligent operation and maintenance system based on cross-network environment
CN109302319B (en) Message pool distributed cluster and its management method
CN113407611B (en) Data integration distribution platform and system
CN113900898B (en) Data processing system, equipment and medium
CN113722182B (en) Parallel asynchronous efficient acquisition and analysis method and system thereof
CN116483543A (en) Task processing method, device, equipment and storage medium
CN108989456A (en) A kind of network implementation approach based on big data
CN105550143A (en) Interface system for acquiring working condition of information equipment
CN107911642A (en) A kind of cable television network management system
US20120072545A1 (en) Remote maintenance and monitoring service framework for heterogeneous device and system
CN103812706A (en) Adaptive method for network interface for isomerous manufacturer data network
CN118626342B (en) Monitoring system based on cloud primordia

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150819

Termination date: 20170129