Simulate SNMP traps to test surveillance

Posted by jishi on Server Fault See other posts from Server Fault or by jishi
Published on 2010-06-03T15:33:09Z Indexed on 2010/06/03 15:34 UTC
Read the original article Hit count: 380

Filed under:
|
|
|

I'm trying to use Net-SNMP on Windows to emulate a trap that should trigger an alarm on our surveillance system.

This is the setup:

  • Windows 7 client that sends the trap
  • Net-SNMP as software for sending the trap
  • Linux with Adventnet ManageEngine OpManager as NMS (not relevant)

This is what I'm trying to accomplish

send trap with OID .1.3.6.1.4.1.5089.1.0.1 (according to the MIB I have loaded into my NMS) and just some sort of message into it to see if I can get any alarm in my NMS. I can see that I actually send a trap in my firewall, but I have no idea what it contains.

This is my attempt so far:

snmptrap.exe -v 2c -c xxxxxxx 192.168.100.65 '' 6 0 .1.3.6.1.4.1.5089.1.0.1 s "123456"

However, I can't seem to find any reasonable documentation with examples for snmptrap. Basically, I need to know what:

  • '' <- why do I need this? I can omit it and it will still send a trap
  • 6 <- Enterprise gneric trap, I assume. Is this correct?
  • 0 <- I have no idea, I need some sort of value for this
  • .1.3.6.1.4.1.5089.1.0.1 <- the enterprise specific OID I assume, should this be followed by some more numbers
  • s <- indicates string
  • "123456" <- just a random test-string...

This doesn't make much sense to me, and if anyone can shed some light on this I would be very grateful.

© Server Fault or respective owner

Related posts about snmp

Related posts about oid