(2016-12-28)
Problem
I need SNMP access to an ESXi host.
Solution
- Enable ssh access to the snmp host.
- Enable the v1/v2c community:
esxcli system snmp set --communities public
- Ensure the system will start snmpd at boot time:
esxcli system snmp set --enable true
- Start the service:
Done!
This works through at least ESXi 6.7 (but not on v4 or previous).
It died
On 6.7 (no updates), the snmpd will die after a while for unknown reasons. The "correct" fix is to move to a more recent update (I think U1 has the fix for this). However if this isn't immediately practical, you can bump the service:
$ ssh root@my-esxi-04 /etc/init.d/snmpd restart