Setting SNMP settings on a standalone ESXi host using VMware vCLI.
Connecting to the host
The following command is used to connect to the host and will proceed each of the commands below.
esxcli –server <server name or IP> –user <user> –password <password>
1 Set the SNMP target port and community
esxcli system snmp set –targets target_address@port/community.
Replace target_address, port, and community with the address of the target system, the port number to send the traps to, and the community name, respectively.
2 To enable the SNMP agent
esxcli system snmp set –enable true
3 View SNMP settings
esxcli system snmp get
4 Send a test
esxcli system snmp test
Example of putting connection and command together:
esxcli –server <server name or IP> –user <user> –password <password> system snmp get