How can I use sm_snmp to generate traps with multiple varbinds in SMARTS?
search cancel

How can I use sm_snmp to generate traps with multiple varbinds in SMARTS?

book

Article ID: 327745

calendar_today

Updated On:

Products

VMware

Environment

VMware Smart Assurance - SMARTS

Resolution

How can I use sm_snmp to generate traps with multiple varbinds?



If you wish to create the following trap: Timestamp:       22-Sep-2004 05:05:05 EDT
Agent:           172.16.176.209
Enterprise OID:  .1.3.6.1.4.1.546.1.1
Generic Type:    6
Specific Type:   7
Varbinds:        [oid]->[varbind]
                 .1.3.6.1.4.1.546.5.6.4.1.2.151001 --> 1
                 .1.3.6.1.4.1.546.5.6.4.1.5.151001 --> 2
                 .1.3.6.1.4.1.546.5.6.4.1.3.151001 --> 1129450700
                 .1.3.6.1.4.1.546.5.6.4.1.7.151001 --> rbridge01
                 .1.3.6.1.4.1.546.5.6.4.1.9.151001 --> [RBRIDGE] EVENT=handheld_not_registered, PIN=538107560
                 .1.3.6.1.4.1.546.5.6.4.1.12.151001 --> Event Log - Application Warning
                 .1.3.6.1.4.1.546.5.6.4.1.1.151001 --> 151001
                 .1.3.6.1.4.1.546.5.6.4.1.14.151001 --> 8  You use the command below:

./sm_snmp -d <trap receiver> -p <SNMP port> trap <IP address of device sending trap> 172.16.176.209 .1.3.6.1.4.1.546.1.1 6 7 0 .1.3.6.1.4.1.546.5.6.4.1.2.151001 i 1
It will work up to and including the first varbind (.1.3.6.1.4.1.546.5.6.4.1.2.151001 --> 1).  To "expand" this to include the other varbinds, you just add more (oid, type, value) triplets at the end of command line. In this case it would become: ./sm_snmp -d <trap receiver> -p <SNMP port> trap <IP address of device sending trap> .1.3.6.1.4.1.546.1.1 6 7 0 .1.3.6.1.4.1.546.5.6.4.1.2.151001 i 1 .1.3.6.1.4.1.546.5.6.4.1.5.151001 i 2 .1.3.6.1.4.1.546.5.6.4.1.3.151001 i 1129450700 .1.3.6.1.4.1.546.5.6.4.1.7.151001 s "rbridge01" .1.3.6.1.4.1.546.5.6.4.1.9.151001 s "[RBRIDGE] EVENT=handheld_not_registered, PIN=538107560" .1.3.6.1.4.1.546.5.6.4.1.12.151001 s "Event Log - Application Warning" .1.3.6.1.4.1.546.5.6.4.1.1.151001 i 151001 .1.3.6.1.4.1.546.5.6.4.1.14.151001 i 8