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 ?
If you have an SNMP-managed network, you can use RMC on Linux nodes to catch SNMP traps. You can use RMC's event management capabilities to respond to the trap message as you would respond to a monitored event in RMC. The SNMP trap information is also entered into the audit log.
snmptrap is an SNMP application that uses the SNMP TRAP operation to send information to a network manager. One or more object identifiers (OIDs) can be given as arguments on the command line. A type and a value must accompany each object identifier. Each variable name is given in the format specified in variables(5).
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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With