First, make sure you have enabled SSH access to your ESXi node.
You can do that in Configuration > Security Profile > Services > SSH.
When SSH is enabled, login to your server with ssh root@esxi-address and type the following commands to enable a SNMP community named myc0mmun1ty with your appropriate Location and Contact.
- esxcli system snmp set -r
- esxcli system snmp set -c myc0mmun1ty
- esxcli system snmp set -p 161
- esxcli system snmp set -L “Stockholm, Sweden”
- esxcli system snmp set -C [email protected]
- esxcli system snmp set -e yes