VMware ESXi 6.0 SNMP Config

Problem

SNMP is cool, but it's a bit of a ball ache to get working in ESXi. We need to configure all of our options and as far as I can see you can't do it using the GUI. So, here's how to do it using the CLI.

Solution

First, you'll need SSH access, this can be done through the security configuration within the vSphere GUI.

Once you're in via SSH these are the commands you'll need:

esxcli system snmp set -r  
esxcli system snmp set -c mycommunity  
esxcli system snmp set -p 161  
esxcli system snmp set -L "Location"  
esxcli system snmp set -C contact@example.com  
esxcli system snmp set -e yes  

Add it in your favourite SNMP monitoring tool and you're good to go! This is version 2c.