Configure SNMP on ESXi

Recently enabled and configured some customer VMware ESXi Hosts for their SNMP monitoring system. I have included the commands I have used to enable (via vSphere web client) and also set the configuration for Host (via esxcli). It’s fairly easy to setup and I have also included some steps for troubleshooting.

To begin with enable the service on the ESXI host itself, logon the vSphere web client and navigate to the desired ESXi Host then go to Configure> Services> and ensure the service is enabled and running!

Now the service is enabled you just need to set the SNMP configuration. So to do this connect to ESXI host via SSH ( logon as root) and run the below commands from ESX shell:

Display the curent config by running the below command:

esxcli system snmp get

Set the SNMP target for monitoring. (Where target server= X.X.X.X on port 161 in command syntax ):

esxcli system snmp set --targets=X.X.X.X@161/COMMUNITY_NAME

Set the SNMP community name. (Where community is COMMUNITY_NAME in command syntax):

esxcli system snmp set --communities COMMUNITY_NAME

Set location information. (Where you add the desired location information after the command):

esxcli system snmp set --syslocation "BigBuilding, Main Street, London"

Set the contact information. (Where you add the desired email address after the command):

esxcli system snmp set --syscontact support@techteam.com

Then enable SNMP service on the ESXi host:

esxcli system snmp set --enable true

Next you can run the below command to test the SNMP configuration:

esxcli system snmp test