6.5.1

Table Of Contents
Configure the SNMP Agent to Send SNMP v1 or v2c Notifications
You can use the ESXi SNMP agent to send virtual machine and environmental notications to management
systems.
To send SNMP v1/v2c notications with the SNMP agent, you must congure the target (receiver) unicast
address, community, and an optional port. If you do not specify a port, the SNMP agent sends traps to UDP
port 162 on the target management system by default.
To congure SNMP v3 traps, see “Congure SNMP v3 Targets,” on page 158.
If you run ESXCLI commands through vCLI, you must supply connection options that specify the target
host and login credentials. If you use ESXCLI commands directly on a host using the ESXi Shell, you can use
the commands as given without specifying connection options. For more information on connection options
see vSphere Command-Line Interface Concepts and Examples.
Prerequisites
Congure the ESXi SNMP agent by using the ESXCLI commands. See Geing Started with vSphere Command-
Line Interfaces for more information on how to use ESXCLI.
Procedure
1
Run the esxcli system snmp set command with the --targets option:
esxcli system snmp set --targets target_address@port/community
Here, target_address is the address of the target system, port is the port number to send the notications
to, and community is the community name.
Each time you specify a target with this command, the seings you specify overwrite all previously
specied seings. To specify multiple targets, separate them with a comma.
For example, run the following command for conguring the targets 192.0.2.1@163/westnoc and
2001:db8::1@163/eastnoc:
esxcli system snmp set --targets 192.0.2.1@163/westnoc,2001:db8::1@163/eastnoc
2 (Optional) If the ESXi SNMP agent is not enabled, run the following command:
esxcli system snmp set --enable true
3 (Optional) Send a test trap to verify that the agent is congured correctly by running the esxcli system
snmp test command.
The agent sends a warmStart trap to the congured target.
Configure ESXi for SNMP v3
When you congure the ESXi SNMP agent for SNMPv3, the agent supports sending informs and traps.
SNMPv3 also provides stronger security than SNMPv1 or SNMPv2c, including key authentication and
encryption.
Inform is a notication that the sender resends up to three times or until the receiver acknowledges the
notication.
Procedure
1 Congure the SNMP Engine ID on page 156
Every SNMP v3 agent has an engine ID which serves as a unique identier for the agent. The engine
ID is used with a hashing function to generate keys for authentication and encryption of SNMP v3
messages.
Chapter 9 Monitoring Networked Devices with SNMP and vSphere
VMware, Inc. 155