How to enable SNMP monitoring for VMWare ESXi 6.0/6.5

You can do a lot of configuration of ESXi through the GUI, but one thing I’ve found that you cannot do is configure SNMP.

I can see in  the GUI that SNMP service is stopped, and that’s about it:

 

  • Even if you can manage to get the service started from the GUI, you’ll still have to set your community string somehow. I couldn’t exactly find a place to set that, so it’s off to the CLI we go.

So here’s how to enable SNMP and configure the community string/firewall on ESXi 6.0 or 6.5:

 

1. SSH to host

  • SSH should be enabled. If not, enable it.

 

2. Set SNMP community string

  • Enter the following command to set your string, replacing YOUR_COMM_STRING with your own.

 

3. Enable SNMP service

  • Enter the following command to enable the SNMP service

 

4. Adjust firewall

  • Chances are that your ESXi firewall is already allowing this traffic, but just in case, allow connections from anywhere.

  • This is very lenient but recommended for beginners or lab environments.

 

  • A more secure approach would be to restrict access to a range of IPs or a particular host. In this case, we are only allowing 192.168.0.0-192.168.0.254 to poll SNMP.

5. Restart SNMP service

It took a good 30-45 seconds for the service to restart on my host. Once this is done, you can confirm that the service is running via GUI:

 

That’s it!

  • Here’s a transcript of my shell session, for your reference:

Personally I am utilizing OpenNMS Horizon to graph the SNMP Interface Data for the VM Network.

发表评论