A kind of monitoring node automatic discovering method and system
Technical field
The present invention relates to server monitoring field more particularly to a kind of monitoring node automatic discovering method and systems.
Background technique
In the prior art, when number of servers is less, if one monitoring server of addition into whole system, can be with
Using manually gradually addition monitors node to the monitoring server.But with the reasons such as business development, the number of server
Amount is also more and more, if can waste a large amount of time at this time also by the way of manually gradually adding, consumption is a large amount of
Human time and human cost.In addition to this, if newly adding server in systems, it is also possible to because of artificial origin
Forget for the server to be added in the monitoring of monitoring server, causes in time handle it when failure.
Therefore, under the premise of saving manpower, time and O&M cost, providing one kind can find node simultaneously certainly automatically
The monitoring method of dynamic addition node, becomes current urgent problem to be solved.
Summary of the invention
In view of the above problems, the application describes a kind of monitoring node automatic discovering method, the method includes the steps:
S1: server controls scanner operation, and the scanner is sent out in specified IP address range to agent client
Scan instruction out;
S2: the agent client receives the scan instruction, and according to the scan instruction perform corresponding processing with
Node data is obtained,
The node data is back to the server;
S3: the node data stored in the node data and database is compared the server, and according to than
Corresponding operation is executed to analysis result.
Preferably, the scan instruction includes: the nodal information for obtaining and needing to be monitored.
Preferably, step S2 is specifically included:
S21: the agent client needs to be monitored the node according to the scan instruction acquisition received and believes
Breath;
S22: comparing and analyzing according to all nodal informations of the nodal information to the agent Client Agent,
When there are identical nodal information, step S23 is executed;
S23: the agent client obtains the node data of the nodal information and is back to the server.
Preferably, the node data includes the status information and/or agent visitor whether the monitoring node survives
The status information and/or the information for monitoring the program run on node whether family end can run.
Preferably, step S3 is specifically included:
S31: when the node data is not present in the database, classification processing is carried out to the node data;
S32: it is corresponded to according to the monitoring node addition corresponding to the node data of the classification results of the node data
Monitoring element;
S33: the corresponding node data of monitoring node is saved according to the classification results and the monitoring is wanted
Element.
Preferably, it is described monitoring element include: it is described monitoring node where host name information, IP address information, service
Type information and service processes information.
The present invention also provides a kind of monitoring node discovery system, the system comprises:
Server is monitored node analysis processing for sending scan instruction, and to the scanning result of feedback;
Agent client is connected to the server, and the scan instruction to be sent according to the server carries out
Scan process, and the scanning result is fed back in the server.
Preferably, the server includes:
Scanner is connected with the agent client, to the agent client hair into specified IP address range
Scan instruction out;
Node data acquiring unit is connected with the agent client, to receive the agent client return
Node data;
Database, to store the node data of all nodes listened to;
Analysis and processing unit is connected with the database and the node data acquiring unit respectively, to will be described
The node data in the node data and the database that node data acquiring unit receives compares, and according to than
Analysis result handles the received node data of the node data acquiring unit.
Preferably, the analysis and processing unit includes:
Judgment sub-unit is compared, is connected respectively with the node data acquiring unit and the database, to by institute
The node data stored in the received node data of node data acquiring unit and the database is stated to be compared one by one
To judge that the received node data of the node acquiring unit whether there is in the database;
Classification subelement, is connected, to connect the node data acquiring unit with the comparison judgment sub-unit
It is receiving and be not present in the node data in the database and classify;
It monitors element and adds subelement, be connected with the classification subelement, to the node data addition to classification
Monitoring element is simultaneously stored into the database.
Preferably, the agent client includes:
Command reception analytical unit is connected with the scanner, to receive scan instruction that the scanner is sent into
Row analysis obtains the nodal information for needing to be monitored;
Comparative analysis unit, with described instruction receive analytical unit be connected, to according to the nodal information with it is described
All nodal informations of agent Client Agent compare and analyze;
Node data extraction unit is connected with the comparative analysis unit, to when there are identical nodal information, then
It extracts the node data for needing the nodal information being monitored and feeds back to server.
Above-mentioned technical proposal have the following advantages that or the utility model has the advantages that monitoring node automatic discovering method provided by the invention and
System, by carrying out active scanning to the node in the IP address range of required monitoring with scanner mode, discovery is needed
The nodal information to be monitored, and the node data in each nodal information is judged, to confirm whether it is stored in data
In library.If no, illustrating, the node data is not monitored also, then being added at this time according to the classification results of the node data influences
Monitoring element and stored into database, convenient for the subsequent monitoring to the node data.This method avoids taking
Business device quantity excessively occupies human resources and time resource when more, has saved cost to a certain extent, prison has been effectively ensured
Validity, accuracy and the timeliness of control.
Detailed description of the invention
With reference to appended attached drawing, more fully to describe the embodiment of the present invention.However, appended attached drawing be merely to illustrate and
It illustrates, and is not meant to limit the scope of the invention.
Figure 1A is a kind of flow diagram one for monitoring node automatic discovering method of the present invention;
Figure 1B is a kind of flow diagram two for monitoring node automatic discovering method of the present invention;
Fig. 1 C is a kind of flow diagram three for monitoring node automatic discovering method of the present invention;
Fig. 2A is a kind of structural schematic diagram one for monitoring node discovery system of the present invention;
Fig. 2 B is a kind of structural schematic diagram two for monitoring node discovery system of the present invention.
Specific embodiment
A kind of monitoring node automatic discovering method of the present invention and system are carried out in the following with reference to the drawings and specific embodiments detailed
It describes in detail bright.
Embodiment one
As shown in Figure 1A, a kind of monitoring node automatic discovering method, comprising steps of
S1: server controls scanner operation, and the scanner is interior to agent client according to specified IP address range
And issue scan instruction;
S2:agent client carries out respective handling after receiving the scan instruction, node data is obtained, by the node
Data are back to server;
S3: the node data is compared the server with the node data of the storage in database, and according to
It compares analysis result and executes corresponding operation.
Specifically, it in monitoring node automatically, first has to control scanner by server and is scanned, be worth pointing out
Be, scanner scanning IP address range can specify, i.e., scanner is scanned in specified IP address range, and
Scan instruction is issued to the agent client that each is scanned.After agent client receives scan instruction, it will do it
Corresponding processing, specifically compares the nodal information of acquisition required for scan instruction with the nodal information itself stored
It is right, corresponding node data is then obtained according to comparison result.Finally, will be in the node data and database by server
The node data of storage is compared, and executes corresponding operation according to analysis result is compared.
As shown in Figure 1B, in step S2, step is specifically included:
The scan instruction obtains the nodal information for needing to be monitored to S21:agent client based on the received;
S22: comparing and analyzing according to all nodal informations of the nodal information to the agent Client Agent,
When there are identical nodal information, S23 is thened follow the steps;
S23:agent client obtains the node data of the nodal information and is back to server.
It is worth noting that scan instruction includes: the nodal information for needing to be monitored, so agent client receives
To after scan instruction, the nodal information for needing to be monitored is obtained according to the scan instruction.Then, the nodal information that will acquire
It is compared and analyzed with (acting on behalf of or storage) all nodal informations of agent client-side management, judges the node obtained
Whether information and the nodal information of storage are identical (S01).If finding the nodal information obtained and the section of agency after comparing analysis
When point information is identical, illustrate that the nodal information is meaningful, then agent client obtains the number of nodes of the nodal information
According to then the node data are back in server.In addition, the node data includes the state for monitoring node and whether surviving
In information of program run in the status information and monitoring node whether information, monitoring node can run etc. at least
It is a kind of.
As shown in Figure 1 C, in step s3, it specifically further comprises the steps of:
S31: when the node data is not present in the database, classification processing is carried out to the node data.
S32: corresponding prison is added according to the classification results of node data monitoring node corresponding to the node data
Control element.
S33: the corresponding node data of monitoring node is saved according to the classification results and the monitoring is wanted
Element.
It is worth noting that when the nodal information for finding to obtain after comparing analysis is identical with the nodal information of agency,
Agent client obtains the node data of the nodal information and is back to server.Later, judge whether the node data is deposited
It is in database (S02), if it does not, illustrating does not include the node data in the database, and because the number of nodes
According to the useful information for being corresponding monitoring node, so needing to classify the node data.After classification, according to node data
Corresponding to the node data monitoring node of classification results add corresponding monitoring element, and save the prison according to classification results
Control the corresponding node data of node and monitoring element.It is worth noting where monitoring element includes: the monitoring node
Host name information, IP address information, service type information and service processes information.
Specifically, for the node data in significant nodal information, if the node data is not present in data
In library, then illustrating that the node data is newly added or missing inspection before, so needing to handle the node data
It is monitored in order to subsequent.Specific processing method is first to classify to the node data, is then tied according to classification
Fruit obtains the corresponding monitoring element of the data, i.e. host name information, the IP address information, service at the corresponding place of the node data
Type information and service processes information etc..Finally, classification results and monitoring element are added in database, to facilitate to this
It monitors node and carries out the operation such as corresponding monitoring processing.
In the present embodiment, a node is made of an IP address and a port, if had in an IP address
Multiple ports then constitute multiple nodes.If the port numbers 4000 of IP address 192.168.1.100 and QQ constitute a node, such as
Fruit further includes having other port numbers 7053 such as CPC client, then IP address 192.168.1.100 and port numbers 7053 are constituted
One node.
In the following, specifically the above method is described in further detail.For example, server control scanner polls IP
Nodal information of the location range from 192.168.63.101 to 192.168.63.200, scanner can be scanned each IP address
It checks.When the IP address of scanner polls is 192.168.63.103, the agent client under the IP address receives scanning life
Order starts to query lower of address nodal information in need being monitored.Found after scanning, need to be monitored have QQ,
The corresponding port of these three softwares of CPC and outlook (QQ, CPC's and outlook's etc. need to be monitored
The monitoring node that the port numbers and the IP address of software or server etc. are constituted), then agent client judges its agency
All nodal informations in the presence or absence of monitoring node corresponding to these three softwares nodal information (i.e. in agent client
Whether the nodal information of these three softwares corresponding monitoring node is stored with).If being found after comparing, the corresponding monitoring node of QQ
Nodal information be present in the agent client, need to return to the corresponding node data of the nodal information of the monitoring node
Into server, all node datas stored in the node data and database are compared server, judge that it is
It is no to be present in database, if be not present in database, illustrate the node data still not at monitored state.
Specifically, if the node data of the corresponding monitoring node of QQ include the status information that can operate normally of the monitoring node with
And the program of operation is the operation program information of QQ, but discovery operation program information is not present in database after comparing,
So needing to classify the node data, then according to the requirement of the category, by the corresponding monitoring node of the node data
Add corresponding monitoring element.Finally the node data and monitoring element are stored into database.According to this mode, just
The node that can be made of to IP address the corresponding port QQ under 192.168.63.103 is monitored, and according to database
In monitoring element corresponding monitoring is carried out to the node.
Monitoring node automatic discovering method provided in this embodiment passes through the IP address with scanner to required monitoring
Node in range carries out active scanning, to find the nodal information for needing to monitor, and to the node in each nodal information
Data are judged, to confirm whether it stores in the database.If no, illustrating, the node data is not monitored also, then
The monitoring element influenced is added according to the classification results of the node data at this time and is stored into database, after being convenient for
The continuous monitoring to the node data.Human resources and time resource are excessively occupied when this method avoids number of servers more,
Cost has been saved to a certain extent, and validity, accuracy and the timeliness of monitoring has been effectively ensured.
Embodiment two
According to a kind of monitoring node automatic discovering method that above-described embodiment proposes, the present embodiment proposes a kind of monitoring section
Point discovery system.
As shown in Figure 2 A, a kind of monitoring node discovery system, comprising:
Server is monitored node analysis processing for sending scan instruction, and to the scanning result of feedback;
Agent client is connected to the server, and the scan instruction for being sent according to the server is scanned
Processing, and feedback scan processing result is to server.
The monitoring node discovery system that the present embodiment proposes, is mainly made of server and agent client, is serviced
Device is the scanning completed for issuing scan command to monitoring node, and is analyzed and processed according to scanning result.Agent visitor
Family end is mainly according to scan command to complete corresponding scan process, and feedback processing result is into server.I.e. in this reality
It applies in example, server and agent client cooperation complete the monitoring to monitoring node.
Wherein, server includes:
Scanner, to be scanned in specified IP address range and issue scan instruction;
Node data acquiring unit is connected with agent client, to receive the number of nodes of agent client return
According to;
Database, to store the node data of all nodes listened to;
Analysis and processing unit is connected with the database and node data acquiring unit respectively, to by the node
Data capture unit receives the node data, and the node data in the node data and database compared and
Corresponding processing, and according to comparative analysis result to the received node data of the node data acquiring unit at
Reason.
It is worth noting that analysis and processing unit includes:
Judgment sub-unit is compared, is connected respectively with the node data acquiring unit and the database, to by institute
The node data stored in the received node data of node data acquiring unit and the database is stated to be compared one by one
To judge that the received node data of the node acquiring unit whether there is in the database;
Classification subelement, is connected, to connect the node data acquiring unit with the comparison judgment sub-unit
It is receiving and be not present in the node data in the database and classify;
It monitors element and adds subelement, be connected with the classification subelement, to the node data addition to classification
Monitoring element is simultaneously stored into the database.
Specifically, scanner is scanned in specified IP address range and issues scan instruction, agent client
After receiving scan instruction, the nodal information for needing to be monitored is obtained according to the scan instruction.Then, the node that will acquire
Information is back in analysis and processing unit after being handled.At this point, analysis and processing unit connects the node data acquiring unit
The node data is received, and the node data in the node data and database is compared and is handled accordingly, and
The received node data of the node data acquiring unit is handled according to comparative analysis result.It is specific processed
Cheng Shi, first will be in the received node data of the node data acquiring unit and the database by comparison judgment sub-unit
The node data of storage compared one by one with judge the received node data of the node acquiring unit whether there is in
In the database.If it does not exist, then subelement of classifying is received by the node data acquiring unit and is not present in
The node data in the database is classified.Finally by monitoring element addition subelement to the number of nodes of classification
According to addition monitoring element and store into the database.
In addition, as shown in Figure 2 B, agent client includes:
Command reception analytical unit carries out the analysis acquisition needs to receive the scan instruction that the server is sent
The nodal information being monitored;
Comparative analysis unit, with described instruction receive analytical unit be connected, to according to the nodal information with it is described
All nodal informations of agent Client Agent compare and analyze;
Node data extraction unit is connected with the comparative analysis unit, to when there are identical nodal information, then
It extracts the node data for needing the nodal information being monitored and feeds back to server.
The command reception in agent client after scanner issues scan command, under the IP address of required scanning
Analytical unit receives the scan instruction that the server is sent and carries out the analysis acquisition nodal information for needing to be monitored, so
It is compared again by comparative analysis unit according to all nodal informations of the nodal information and the agent Client Agent afterwards
Analysis illustrates that the nodal information is that have if the nodal information that command reception analytical unit issues is present in agent client
Meaning, then node data extraction unit obtains the node data of the nodal information, and the node data are then back to clothes
It is engaged in the analysis and processing unit of device.In addition, the node data includes status information, the monitoring node for monitoring whether node survives
At least one of information of program run in the status information and monitoring node that whether can be run etc..
For a person skilled in the art, after reading above description, various changes and modifications undoubtedly be will be evident.
Therefore, appended claims should regard the whole variations and modifications for covering true intention and range of the invention as.It is weighing
The range and content of any and all equivalences, are all considered as still belonging to the intent and scope of the invention within the scope of sharp claim.