SNMP isn’t exactly new technology, but it’s pretty reliable and just about every monitoring system out there supports it. There are definitely more in-depth monitoring solutions for ESXi out there, but if you are looking for a quick and dirty monitoring solution for an ESXi host to integrate into a platform you already have, SNMP will do the trick. This post describes how to setup SNMP on ESXi 5, 5.5, and 6. I’m fairly certain it will work on older versions of ESXi as well, but i have not tested that theory.
How to enable SNMP on ESXi 5 / 5.5 / 6
There are a few steps involved in getting SNMP functional on ESXi. They go something like this.
- Set the SNMP community string
- Enable the SNMP service
- Add necessary firewall rules
- Enable the added firewall rule
- Restart the SNMP daemon
It’s a pretty straight forward process. Let’s getting started. First, you need to connect to your ESXi host via SSH, If you don’t know how to do this, click here to read my post on how to enable SSH on ESXi. After logging in to your ESXi host via SSH, run the following commands.
# esxcli system snmp set --communities YOUR_STRING # esxcli system snmp set --enable true
You will need to change YOUR_STRING to the name of your SNMP community. Many times this is PUBLIC or PRIVATE, but I suggest you use something different and unique for security purposes.
Next, we need to add a firewall rule to allow the SNMP inbound port, and then enable it.