As the command above indicates, you must configure one or more targets:
Type esxcli system snmp set -i <str> or esxcli system snmp set -t <str>.
For example, to set targets for user2 and user3, type:
esxcli system snmp set -i 10.112.170.205@2263/user2/auth/inform, # -For authNoPriv
10.112.170.205@2264/user3/priv/inform # For authPriv
Running esxcli system snmp test produces the following error:
Authentication protocol not defined, security level for target 10.112.170.205@2264 requires it
Set the authentication and privacy protocols. For example, esxcli system snmp set -a SHA1 -x AES128 sets the authentication protocol to SHA1 and the privacy protocol to AES128.
Running esxcli system snmp test produces the following error message:
Requires remote user to be defined for user3
Refer to KB 2033377: Configuring inform users for the ESXi SNMP Agent.
The esxcli system snmp test command is equivalent to restarting the snmpd agent (both send a warmStart trap).
There are a number of diagnostics available to troubleshoot further:
1. /var/log/syslog.log will contain a record of the call to transfer the message to the vmkernel IP stack (example below):
2013-07-22T15:13:45Z snmpd: snmpd: SendToIpTransport: sendto(fd=4, length=44) rc = 44
2013-07-22T15:13:45Z snmpd: snmpd: Sr_send_trap_ctx: trap pdu sent to 'xxx.xxx.xxx.xxx:1162' size=44 bytes
2. tcpdump-uw can trace outgoing snmp traps:
tcpdump-uw -v -i vmk# -n -T snmp udp and port ### (typically port 162; if custom ports are configured use those)
3. Unless reverse poll is turned off (by turning off sfcb (esxcfg-advcfg -g /UserVars/CIMEnabled) or by suppressing the event with esxcli system snmp set -n option),every 5 minutes an enterprise trap is emitted from sfcbd.
4. Lastly turning up/down physical NICs can also cause traps (esxcli network nic up|down -n vmnic#). Make note of the configurations/states before changing to avoid causing network issues.