Summary of the invention
Technical problem to be solved by this invention is: for prior art Problems existing, provides a kind of network management test competitor alarm method and device.Simulation alarm device can simulate all alarms of each producer's different model, eliminate the cost of large number quipments and eliminate the human cost of the different alarm cost of structure and the logistics cost (such as storage battery, environmental monitoring module etc.) that some structure alarms need.The method still tests the disposal ability of webmaster to alarm simultaneously, the scene that the alarm per second of simulation existing network is many.
The technical solution used in the present invention is as follows:
A kind of network management test competitor alarm method comprises:
Step 1: the acquisition module of simulation alarm device is according to snmp agreement, and the mib fileinfo that equipment manufacturer provides; Intercepting obtains alarm monitoring information, and described alarm monitoring information comprises the sequence valve between preset warning information OID and warning information OID;
Step 2: the local mac address of the configuration information module installation alarm monitoring information of simulation alarm device and IP address, and need NM server MAC Address and the IP address of carrying out data transmission;
Step 3: the local mac address that the package module of simulation alarm device provides according to configuration information module and IP address, NM server MAC Address and IP address, become Trap message by described alarm monitoring Information encapsulation;
Step 3: the Trap message after package module encapsulation is sent to NM server by the data transmission blocks of simulation alarm device;
Step 4: after the Trap message that the data transmission blocks that NM server receives simulation alarm device sends, carry out the dissection process of Trap message, checks current Trap message whether successfully resolved.
Further, described step 4 specifically comprises:
Step 41: Trap message is passed to NM server by the data transmission blocks of simulation alarm server, and NM server receives warning message by port one 62; NM server is checked whether this warning information OID defines in NM server before and is supported, if do not support, then and NM server not this Trap message of dissection process; Otherwise NM server checks the sequence valve between the warning content that this warning information OID carries and warning information OID, perform step 42;
Step 42: if the sequence valve mistake between the warning information OID warning content of carrying and warning information OID or information dropout, then resolve failure; If warning content is correct, but the sequence valve mistake between warning information OID, then resolve; If warning information OID supports, and sequence valve between warning information OID is correct, then parse this warning content;
Step 43: the warning content of the warning content that user is parsed by NM server and simulation alarm Servers installed compares, whether checking is consistent.
A kind of network management test competitor alarm device comprises simulation alarm device and NM server; Described simulation alarm device comprises acquisition module, configuration information module, package module and data transmission blocks;
Acquisition module, for according to snmp agreement, and the mib fileinfo that equipment manufacturer provides; Intercepting obtains alarm monitoring information, and described alarm monitoring information comprises the sequence valve between preset warning information OID and warning information OID;
Configuration information module, for arranging local mac address and the IP address of alarm monitoring information, and needs NM server MAC Address and the IP address of carrying out data transmission;
Package module, for the local mac location that provides according to configuration information module and IP address, NM server MAC Address and IP address, becomes Trap message by described alarm monitoring Information encapsulation;
Trap message after package module encapsulates by data transmission blocks sends to NM server;
After the Trap message that the data transmission blocks that NM server receives simulation alarm device sends, carry out the dissection process of Trap message, check current rap message whether successfully resolved.
Further, described NM server carries out alarm monitoring message handler, checks whether current device information normally specifically comprises after receiving the Trap message of data transmission blocks transmission:
Step 41: Trap message is passed to NM server by the data transmission blocks of simulation alarm server, and NM server receives warning message by port one 62; NM server is checked whether this warning information OID defines in NM server before and is supported, if do not support, then and NM server not this Trap message of dissection process; Otherwise NM server checks the sequence valve between the warning content that this warning information OID carries and warning information OID, perform step 42;
Step 42: if the sequence valve mistake between the warning information OID warning content of carrying and warning information OID or information dropout, then resolve failure; If warning content is correct, but the sequence valve mistake between warning information OID, then resolve; If warning information OID supports, and sequence valve between warning information OID is correct, then parse this warning content;
Step 43: the warning content of the warning content that user is parsed by NM server and simulation alarm Servers installed compares, whether checking is consistent.
In sum, owing to have employed technique scheme, the invention has the beneficial effects as follows:
Can be served by simulation alarm and directly construct warning message, single simulation alarm service just can simulate all alarms of each producer's different model, eliminate the cost of large number quipments and eliminate the human cost of the different alarm cost of structure and the logistics cost (such as storage battery, environmental monitoring module etc.) that some structure alarms need.The method still tests the disposal ability of webmaster to alarm simultaneously, the scene that the alarm per second of simulation existing network is many.
Embodiment
All features disclosed in this specification, or the step in disclosed all methods or process, except mutually exclusive feature and/or step, all can combine by any way.
Arbitrary feature disclosed in this specification (comprising any accessory claim, summary), unless specifically stated otherwise, all can be replaced by other equivalences or the alternative features with similar object.That is, unless specifically stated otherwise, each feature is an example in a series of equivalence or similar characteristics.
1.MIB file extracts data
The mib file provided by equipment manufacturer, analyzes warning content and the alarm form of every bar alarm, obtains warning information OID and the warning information OID sequence valve of the inside.
2.Trap message constructs
By extract the IP address of alarm mib information (alarm form and OID)+NM server and the IP of MAC Address+alarm simulation device PC and MAC Address structure warning message, and carry out assignment for the OID inside alarm, build and be merged into a warning message completed, and be recorded in file.
3. message is set and sends interval and message amount
The interval that message directly sends is set, controls the speed of transmission message per second.The quantity that message amount controls altogether will send altogether is set.Above-mentioned information is sent to NM server
4. message sends
Start a thread of giving out a contract for a project, be put in internal memory by the content of the transmission interval of message, message amount and warning message, message sends thread loops transmit queue message, directly adds the transmission buffering area of network interface card.
Warning information OID comprises warning information OID type and warning content OID, and alarm type OID is such as high temperature alarm, or low temperature alarm.The design parameter information that this alarm that warning content OID refers to is carried.Such as warning information OID type is high temperature alarm, then warning information OID just comprises the temperature of current device and these two information of temperature of high temperature early warning.
Specific embodiment one:
Step 1: acquisition module is according to snmp agreement, and the mib fileinfo that equipment manufacturer provides; Intercepting obtains alarm monitoring information, and described alarm monitoring information comprises the sequence valve between preset warning information OID and warning information OID;
Step 2: the local mac address of configuration information module installation alarm monitoring information and IP address, and need NM server MAC Address and the IP address of carrying out data transmission;
Step 3: the local MAN address that package module provides according to configuration information module and IP address, NM server MAC Address and IP address, become Trap message by described alarm monitoring Information encapsulation;
Step 3: the Trap message after package module encapsulates by data transmission blocks sends to NM server;
Step 4: NM server carries out alarm monitoring message handler, checks that whether current device information is normal after receiving the Trap message of data transmission blocks transmission.Be specially:
Step 41: Trap message is passed to NM server by the data transmission blocks of simulation alarm server, and NM server receives warning message by port one 62; NM server is checked whether this warning information OID defines in NM server before and is supported, if do not support, then and NM server not this Trap message of dissection process; Otherwise NM server checks the sequence valve between the warning content that this warning information OID carries and warning information OID, perform step 42;
Step 42: if the sequence valve mistake between the warning information OID warning content of carrying and warning information OID or information dropout, then resolve failure; If warning content is correct, but the sequence valve mistake between warning information OID, then resolve; If warning information OID supports, and sequence valve between warning information OID is correct, then parse this warning content;
Step 43: the warning content of the warning content that user is parsed by NM server and simulation alarm Servers installed compares, whether checking is consistent.
The present invention is not limited to aforesaid embodiment.The present invention expands to any new feature of disclosing in this manual or any combination newly, and the step of the arbitrary new method disclosed or process or any combination newly.