Send a notification trap SNMP with snmptrap command Linux
34,232
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.
Author by
Nicolas Frbezar
Updated on February 08, 2020Comments
-
Nicolas Frbezar over 4 years
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 ?
-
Omkar Dixit almost 2 yearsthanks,
@Andrew Komiagin
for the reply this answer saved me just now!