SNMP Trap Test command
Using ESXCLI from a vSphere host
Execute the ‘esxcli system snmp test’ command from the vSphere SNMP Agent. Expected output from the vSphere SNMP Agent after running the test command:
Comments: There is 1 target configured, send warmStart requested, test completed normally.
From VCLI
Execute ‘vicfg-snmp --server <server ip> --username <server usrname> --password <server password> -T’.
Expected output:
Sending test nofication(trap) to all configured targets...
Result
Expected Output from SNMP Client.
The following information is expected at SNMP client when executing SNMP trap test.
2013-05-21 12:09:29 localhost.localdomain [127.0.0.1] (via UDP: [192.168.0.1]:13954->[192.168.0.200]:1111) TRAP, SNMP v1, community public
SNMPv2-MIB::snmpTraps Warm Start Trap (0) Uptime: 0:04:47.00
Syslog Information
The following information is logged in /var/log/syslog.log when executing SNMP trap test
2013-05-21T06:34:49Z snmpd: snmpd: Sending warmStart notification at operator request
2013-05-21T06:34:49Z snmpd: snmpd: FindSnmpCommEntryWithCtxEngID: scanning snmpCommunityTable, securityName = v1trap_0,
contextEngineID = 00:00:00:63:00:00:00:a1:00:00:00:00, contextName = -, network address = 192.168.0.200:1111
2013-05-21T06:34:49Z snmpd: snmpd: FindSnmpCommEntryWithCtxEngID: snmpCommunitySecurityName does not match in row 0
2013-05-21T06:34:49Z snmpd: snmpd: FindSnmpCommEntryWithCtxEngID: returning row 1, matched search criteria
2013-05-21T06:34:49Z snmpd: snmpd: FindSnmpCommEntryWithCtxEngID: finished scanning snmpCommunityTable
2013-05-21T06:34:49Z snmpd: snmpd: SendToIpTransport: sendto(fd=6, length=43) rc = 43
2013-05-21T06:34:49Z snmpd: snmpd: Sr_send_trap_ctx: trap pdu sent to '192.168.0.200:1111' size=43 bytes
WireShark Log
The following information is delivered at a wireshark monitoring station when executing the SNMP trap test:
tcpdump Result
The following tcpdump information is logged when executing SNMP trap test:
06:34:49.785092 IP (tos 0x0, ttl 64, id 51718, offset 0, flags [none], proto UDP (17), length 71)
192.168.0.1.13954 > 192.168.0.200.1111: { SNMPv1 { Trap(28) .1.3.6.1.6.3.1.1.5 127.0.0.1 warmStart 21900 } }