Nicolas Frbezar Nicolas Frbezar - 1 year ago 118
Linux Question

Send a notification trap SNMP with snmptrap command Linux

For test purpose, i'm trying to use the snmptrap command to produce a . trap (printer alert trap).

I'm not in my two feet with the syntax of the snmptrap command, so can someone explain me how to correctly use this command, specially for this trap if it's possible ?

Answer Source

The syntax is pretty simple:

snmptrap -c public -v 2c ""

The problem here is that this particular trap should be sent with 6 varbinds:

  • prtAlertIndex
  • prtAlertSeverityLevel
  • prtAlertGroup
  • prtAlertGroupIndex
  • prtAlertLocation
  • prtAlertCode

Thus you'll also have to provide values for all these varbinds. So the Trap Receiver will be able to handle this type of trap properly.

I'd suggest using tools like NetDecision Trap Simulator which automatically configures traps to send based on MIB definitions.

enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download