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.

I hope this helps. Thank you for reading.


1 Comment

turnpike420 · July 19, 2017 at 10:40 am

ESXi 6.0.0 build 4600944: when I follow the above and run “esxcli system snmp get” just before running the restart command it returns Enable: true; however after I run the restart command it returns Enable: false so I have to re-run “esxcli system snmp set –enable true”. Only then can I snmpwalk the ESXi system. Also, Enable: true is not persistent after an ESXi host reboot. The firewall and community name settings appear to remain persistent after reboot. I added the enable true line to /etc/rc.local.d/local.sh and that made it persistent after reboot.

Leave a Reply

Related Posts

Virtualization

Enable SSH login to vCenter 6.5 in WebUI

Enabling vCenter SSH access from Web User Interface 1. Log in to WebUI 2. On the vSphere Web Client Home page, click System Configuration. 3. Under System Configuration, click Nodes. 4. Under Nodes, select a Read more…

Virtualization

Install Dell OpenManage 8.5 VIB on ESXi 6.0/6.5

I recently wrote an article on installing OMSA 8.4 VIB on ESXi 6.5 and also installing OMSA 8.4 VIB on ESXi 5.5 — Sometime between then and now, Dell released OpenManage Server Administrator version 8.5 and a VIB Read more…

Cloud

Upgrading the size of an Azure Virtual Machine

Increasing the size/resources of a VM in your own environment is usually pretty straightforward. You’ll know whether or not you can hot-add resources; if you have to reboot the machine or not, etc. and it’s Read more…

%d bloggers like this: