Using snmptrap I am able to send traps to a snmp adapter.
for example:
Code:
snmptrap -v 1 -c public localhost HOST-RESOURCES-MIB::hrDeviceStatus.1 121.221.2.11 6 123 '' hrDeviceStatus.1 i 3
Sends a trap message like beloe:
Code:
Mar 5 14:19:27 myxenvm snmptrapd[25808]: 2014-03-05 14:19:22 rnp00267366edc9.eu.tel.uss.com [121.221.2.11] (via UDP: [127.0.0.1]:35661) TRAP, SNMP v1, community public HOST-RESOURCES-MIB::hrDeviceStatus.1 Enterprise Specific Trap (123) Uptime: 5 days, 22:39:54.83 HOST-RESOURCES-MIB::hrDeviceStatus.1 = INTEGER: warning(3)
I need two helps in this.
1. Can anyone let me understand why the uptime information is coming in the message ?
2. As the warning message is there, I need to send a custom message event to an adapter which will parse the output and do some further task. But as the OID type is INTEGER, I am not able to send any string type with the trap. How can I do it ??