A kind of monitor node automatic discovering method and system
Technical field
The present invention relates to server monitoring field, relate in particular to a kind of monitor node side of discovery automaticallyMethod and system.
Background technology
In the prior art, in the time that number of servers is less, arrive if add a monitoring serverIn whole system, can adopt and progressively add manually monitor node to this monitoring server.But along with reasons such as business developments, the quantity of server is also more and more, if now alsoAdopt the mode of progressively adding manually, can waste a large amount of time, consume a large amount of peoplePower time and human cost. In addition,, if newly add server in system, also haveMay, because artificial origin forgets to be added this server in the monitoring of monitoring server to, causeWhen fault, just can not process it in time.
Therefore, saving under the prerequisite of manpower, time and O&M cost, providing the one canAutomatically find that node automatic powder adding add the method for supervising of node, become urgently to be resolved hurrily asking at presentTopic.
Summary of the invention
In view of the above problems, the application has recorded a kind of monitor node automatic discovering method, described inMethod comprises step:
S1: the operation of server controls scanner, the IP address range that described scanner is being specifiedInteriorly send scan instruction to agent client;
S2: scan instruction described in described agent client, and carry out according to described scan instructionProcess to obtain node data accordingly,
Described node data is back to described server;
S3: described server carries out the node data of storing in described node data and databaseComparison, and carry out corresponding operation according to compare of analysis result.
Preferably, described scan instruction comprises: obtain the nodal information that need to monitor.
Preferably, step S2 specifically comprises:
S21: described agent client is obtained and need to be entered according to the described scan instruction receivingThe described nodal information of row monitoring;
S22: all node letters according to described nodal information to described agent Client AgentBreath is analyzed, in the time there is identical nodal information, and execution step S23;
S23: described agent client is obtained the node data of described nodal information and is back toDescribed server.
Preferably, described node data comprise status information that whether described monitor node survive and/ or described agent the client status information and/or described monitor node that whether can move onThe information of the program of moving.
Preferably, step S3 specifically comprises:
S31: in the time that described node data is not present in described database, to described nodesAccording to the processing of classifying;
S32: the described prison corresponding to this node data according to the classification results of described node dataControl node adds corresponding monitoring key element;
S33: preserve the described node data that described monitor node is corresponding according to described classification resultsAnd described monitoring key element.
Preferably, described monitoring key element comprises: the host name information at described monitor node place,IP address information, service type information and service processes information.
The present invention also provides a kind of monitor node discovery system, and described system comprises:
Server, for sending scan instruction, and carries out monitor node to the scanning result of feedbackAnalyzing and processing;
Agent client, is connected in described server, in order to what send according to described serverDescribed scan instruction is carried out scan process, and described scanning result is fed back to described serverIn.
Preferably, described server comprises:
Scanner, is connected with described agent client, in the IP address range to specifyingAgent client send scan instruction;
Node data acquiring unit, is connected with described agent client, described in receivingThe node data that agent client is returned;
Database, the node data of all nodes that listened in order to storage;
Analysis and processing unit, respectively with described database and described node data acquiring unit phaseConnect, in order to described node data and described data that described node data acquiring unit is receivedNode data in storehouse contrasts, and according to compare of analysis result, described node data is obtainedThe described node data that unit receives is processed.
Preferably, described analysis and processing unit comprises:
Contrast judgment sub-unit, respectively with described node data acquiring unit and described databaseBe connected, in order to described node data and described data that described node data acquiring unit is receivedThe node data of storing in storehouse contrasts to judge what described node acquiring unit received one by oneWhether described node data is present in described database;
Classification subelement, is connected with described contrast judgment sub-unit, in order to by described nodeData capture unit described node data that receive and that be not present in described database carries outClassification;
Monitoring key element is added subelement, is connected, in order to the institute to classification with described classification subelementStating node data adds monitoring key element and is stored in described database.
Preferably, described agent client comprises:
Command reception analytic unit, is connected with described scanner, sends out in order to receive described scannerThe scan instruction analysis of sending is obtained the nodal information that described needs are monitored;
Comparative analysis unit, is connected with described command reception analytic unit, in order to according to described jointAll nodal informations of dot information and described agent Client Agent are analyzed;
Node data extraction unit, is connected with described comparative analysis unit, in order to identical when existingNodal information time, extract the node data of the described nodal information that need to monitor anti-Be fed to server.
Technique scheme tool has the following advantages or beneficial effect: monitor node provided by the inventionAutomatic discovering method and system, by using the IP address of scanner mode to required monitoringNode in scope carries out active scanning, finds to need the nodal information of monitoring, and to eachNode data in nodal information judges, to confirm whether it is stored in database. IfNo, illustrate that this node data is also not monitored, now according to the classification of this node dataResult is added the monitoring key element of impact and is stored in database, is convenient to follow-up to thisThe monitoring of node data. When this method avoids number of servers many, too much take human resources withAnd time resource, saved to a certain extent cost, effectively ensured monitoring validity,Accuracy and promptness.
Brief description of the drawings
With reference to appended accompanying drawing, to describe more fully embodiments of the invention. But, appendedAccompanying drawing only, for explanation and elaboration, does not form limitation of the scope of the invention.
Figure 1A is the schematic flow sheet one of a kind of monitor node automatic discovering method of the present invention;
Figure 1B is the schematic flow sheet two of a kind of monitor node automatic discovering method of the present invention;
Fig. 1 C is the schematic flow sheet three of a kind of monitor node automatic discovering method of the present invention;
Fig. 2 A is the structural representation one of a kind of monitor node discovery system of the present invention;
Fig. 2 B is the structural representation two of a kind of monitor node discovery system of the present invention.
Detailed description of the invention
Below in conjunction with the drawings and specific embodiments to a kind of monitor node of the present invention side of discovery automaticallyMethod and system are elaborated.
Embodiment mono-
As shown in Figure 1A, a kind of monitor node automatic discovering method, comprises step:
S1: the operation of server controls scanner, described scanner is according to the IP address model of specifyingEnclose interior to agent client and send scan instruction;
Described in S2:agent client, after scan instruction, carry out respective handling, obtain nodeData, are back to server by described node data;
S3: described server enters the node data of the storage in described node data and databaseRow comparison, and carry out corresponding operation according to compare of analysis result.
Specifically, in the time of automatic monitoring node, first to be undertaken by server controls scannerScanning, it is worthy of note, the IP address range of scanner scanning can be specified,Scanner scans in the IP address range of specifying, and the agent that each is scannedClient is sent scan instruction. When agent client is after scan instruction, can carry out phaseThe processing of answering is by the required scan instruction nodal information obtaining and self storage specificallyNodal information compare, then obtain corresponding node data according to comparison result. Finally,By server, the node data of the storage in described node data and database is compared, andCarry out corresponding operation according to compare of analysis result.
As shown in Figure 1B, in step S2, specifically comprise step:
S21:agent client is obtained and need to be monitored according to the described scan instruction receivingDescribed nodal information;
S22: all node letters according to described nodal information to described agent Client AgentBreath is analyzed, and in the time there is identical nodal information, performs step S23;
S23:agent client is obtained the node data of described nodal information and is back to serviceDevice.
It is worthy of note, scan instruction comprises: the nodal information that need to monitor, soAgent client, after scan instruction, obtains and need to monitor according to this scan instructionNodal information. Then, by the nodal information getting and agent client-side management (Agency's or storage) all nodal informations are analyzed, the nodal information that judgement is obtainedNodal information whether identical (S01) with storage. If find the node obtaining after compare of analysisWhen information and agency's nodal information is identical, illustrate that this nodal information is significant, agentClient is obtained the node data of described nodal information, then these node data is back to serviceIn device. In addition, described node data comprises status information, the monitoring whether monitor node survivesThe information of the program of moving on the status information whether node can move and monitor nodeDeng at least one.
As shown in Figure 1 C, in step S3, specifically also comprise step:
S31: in the time that described node data is not present in described database, to described nodesAccording to the processing of classifying.
S32: the monitoring joint corresponding to this node data according to the classification results of described node dataPoint adds corresponding monitoring key element.
S33: preserve the described node data that described monitor node is corresponding according to described classification resultsAnd described monitoring key element.
It is worthy of note, the nodal information that discovery is obtained after compare of analysis and agency's nodeWhen information is identical, agent client is obtained the node data of described nodal information and is back to clothesBusiness device. Afterwards, judge whether this node data is present in database (S02), if notExist, illustrate and in this database, do not comprise this node data, and because this node data is rightThe useful information of the monitor node of answering, so need this node data to classify. After classification,Monitor node corresponding to this node data added corresponding according to the classification results of node dataMonitoring key element, and preserve according to classification results node data and the monitoring that this monitor node is correspondingKey element. It is worthy of note, monitoring key element comprises: the host name letter at described monitor node placeBreath, IP address information, service type information and service processes information.
Specifically, for the node data in significant nodal information, if this node dataBe not present in database, illustrate that so this node data is new that add or undetected before, so need this node data is processed so that follow-up it is monitored. SpecificallyProcessing method be, first this node data is classified, then obtain this according to classification resultsThe monitoring key element that data are corresponding, these node data host name information, the IP at corresponding placeAddress information, service type information and service processes information etc. Finally, by classification results andMonitoring key element is added in database, to facilitate, this monitor node is carried out to corresponding monitoring processing etc.Operation.
In the present embodiment, a node is to be made up of an IP address and a port, asFruit has multiple ports on an IP address, forms multiple nodes. As IP address192.168.1.100 form a node with the port numbers 4000 of QQ, if also include itHe as the port numbers 7053 of CPC client, IP address 192.168.1.100 and portNumbers 7053 form a node.
Below, specifically said method is described in further detail. For example, server controlThe node of scanner polls IP address range processed from 192.168.63.101 to 192.168.63.200Information, scanner can carry out scanography to each IP address. When the IP address of scanner pollsDuring for 192.168.63.103, the agent client scan command under this IP address starts to look intoAsk the nodal information that under this address, all needs are monitored. After scanning, find, need to carry outMonitoring have QQ, CPC and port corresponding to these three kinds of softwares of outlook (QQ, CPCAnd outlook etc. the port numbers of the software that need to monitor or server etc.Monitor node with this IP address formation), then agent client judges all joints of its agencyIn dot information, whether having the nodal information of these three kinds of corresponding monitor nodes of software (is agentIn client, whether store the nodal information of the monitor node that these three kinds of softwares are corresponding). If warpAfter comparison, find, the nodal information of the monitor node that QQ is corresponding is present in this agent client,The node data corresponding nodal information of this monitor node need to be back in server to serviceDevice is compared all node datas of storing in this node data and database, judges itWhether be present in database, if be not present in database, this node data be describedAlso not in monitored state. Specifically, if the node of monitor node corresponding to QQData comprise that status information that this monitor node can normally move and the program of operation are QQWorking procedure information, but through comparison after find that working procedure information is not present in databaseIn, so need this node data to classify, then according to such other requirement, shouldThe monitor node that node data is corresponding adds corresponding monitoring key element. Finally by this node data withAnd monitoring key element is stored in database. According to this mode, can be to IP address just192.168.63.103 the node that port corresponding to QQ under forms is monitored, and according to numberAccording to the monitoring key element in storehouse, this node is carried out to corresponding monitoring.
The monitor node automatic discovering method that the present embodiment provides, by using scanner to requiredNode in the IP address range of monitoring carries out active scanning, with what find to monitorNodal information, and the node data in each nodal information is judged, whether to confirm itBe stored in database. If no, illustrate that this node data is also not monitored, root nowClassification results according to this node data adds the monitoring key element of impact and is stored to numberIn storehouse, be convenient to the follow-up monitoring to this node data. This method avoids number of servers manyTime too much take human resources and time resource, saved to a certain extent cost, effectivelyValidity, accuracy and the promptness of monitoring are ensured.
Embodiment bis-
A kind of monitor node automatic discovering method proposing according to above-described embodiment, the present embodiment is carriedGo out a kind of monitor node discovery system.
As shown in Figure 2 A, a kind of monitor node discovery system, comprising:
Server, for sending scan instruction, and carries out monitor node to the scanning result of feedbackAnalyzing and processing;
Agent client, is connected in described server, for what send according to described serverScan instruction is carried out scan process, and feedback scan result is to server.
The monitor node discovery system that the present embodiment proposes, mainly by server and agentClient forms, and server is for sending scan command to complete the scanning to monitor node,And carry out analyzing and processing according to scanning result. Agent client be mainly according to scan command withComplete corresponding scan process, and feedback processing result is to server. In the present embodiment,The monitoring that server and agent client have cooperated to monitor node.
Wherein, server comprises:
Scanner, in order to scan and to send scan instruction at the IP address range of specifying;
Node data acquiring unit, is connected with agent client, in order to receive agent clientEnd return node data;
Database, the node data of all nodes that listened in order to storage;
Analysis and processing unit, is connected with described database and node data acquiring unit respectively,In order to described node data acquiring unit is received to described node data, and by described node dataContrast with the node data in database and process accordingly, and tie according to comparative analysisThe described node data that fruit receives described node data acquiring unit is processed.
It is worthy of note, analysis and processing unit comprises:
Contrast judgment sub-unit, respectively with described node data acquiring unit and described databaseBe connected, in order to described node data and described data that described node data acquiring unit is receivedThe node data of storing in storehouse contrasts to judge what described node acquiring unit received one by oneWhether described node data is present in described database;
Classification subelement, is connected with described contrast judgment sub-unit, in order to by described nodeData capture unit described node data that receive and that be not present in described database carries outClassification;
Monitoring key element is added subelement, is connected, in order to the institute to classification with described classification subelementStating node data adds monitoring key element and is stored in described database.
Specifically, scanner scans and sends scanning in the IP address range of specifyingInstruction, agent client, after scan instruction, obtains and need to enter according to this scan instructionThe nodal information of row monitoring. Then, after being processed, the nodal information getting is back to pointAnalyse in processing unit. Now, described node data acquiring unit is received institute by analysis and processing unitState node data, and the node data in described node data and database is contrasted andCorresponding processing, and the institute described node data acquiring unit being received according to comparative analysis resultStating node data processes. Concrete processing procedure is, first by contrasting judgment sub-unit by instituteState the joint stored in described node data that node data acquiring unit receives and described databasePoint data contrast the described node data that judges that described node acquiring unit receives one by oneWhether be present in described database. If do not exist, the subelement of classifying is by described nodeData capture unit described node data that receive and that be not present in described database carries outClassification. Finally adding subelement by monitoring key element wants the described node data interpolation monitoring of classificationElement is also stored in described database.
In addition, as shown in Figure 2 B, agent client comprises:
Command reception analytic unit, divides in order to the scan instruction that receives described server transmissionAnalyse and obtain the nodal information that described needs are monitored;
Comparative analysis unit, is connected with described command reception analytic unit, in order to according to described jointAll nodal informations of dot information and described agent Client Agent are analyzed;
Node data extraction unit, is connected with described comparative analysis unit, in order to identical when existingNodal information time, extract the node data of the described nodal information that need to monitor anti-Be fed to server.
Send after scan command the agent client under the IP address of required scanning at scannerCommand reception analytic unit in end receives the scan instruction of described server transmission and analyzesObtain the nodal information that described needs are monitored, and then by described in comparative analysis unit basisAll nodal informations of nodal information and described agent Client Agent are analyzed, asWhen the nodal information that fruit command reception analytic unit sends is present in agent client, this is describedNodal information is significant, and node data extraction unit obtains the node of described nodal informationData, are then back to these node data in the analysis and processing unit of server. In addition, instituteWhether state status information, the monitor node that node data comprises whether monitor node survives can transportAt least one in the information of the program of moving on the status information of row and monitor node etc.
For a person skilled in the art, read after above-mentioned explanation various changes and modificationsUndoubtedly will be apparent. Therefore, appending claims should regard as contain of the present invention trueWhole variations and the correction of sincere figure and scope. Any and all etc. within the scope of claimsThe scope of valency and content, all should think and still belong to the intent and scope of the invention.