Send a notification trap SNMP with snmptrap command Linux
Asked Answered
I

1

7

For test purpose, i'm trying to use the snmptrap command to produce a .1.3.6.1.2.1.43.18.2.0.1 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 ?

Instructive answered 9/5, 2016 at 15:40 Comment(1)
Not sure this is a programming question.Lyrebird
T
13

The syntax is pretty simple:

snmptrap -c public -v 2c 127.0.0.1 "" 1.3.6.1.2.1.43.18.2.0.1

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

Torrent answered 10/5, 2016 at 13:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.