Here is a quick tip:
SNMP it’s disabled by default on ESXi 5.1, and so you won’t be able to monitor your host through CA E-Health, Nagios, and stuff like that, so where are the steps to enable, configuring readonly comunities and setting firewall rules.
1’st of all, you’ll need VMWare VSphere CLI (Not Power CLI), and it’s available from VMware webSite for ESXi 4.x and ESX 5.x. Download it and install. I’ll see that you’ll have a new item in your start menu:
Then you go to the bin (“cd bin”) directory that have all the Perl scripts that I’ll need, particularly the vicfg-snmp.pl.
You’ll be in C:\Program Files\VMware\VMware vSphere CLI\bin directory, righ? Nice… here are the commands:
- Show current config: vicfg-snmp.pl –server hostname –username username –password password –show
- Enable SNMP: vicfg-snmp.pl –server hostname –username username –password password –enable
- Reset SNMP Config to it’s defaults: vicfg-snmp.pl –server hostname –username username –password password –reset
- Set Readonly comunity: vicfg-snmp.pl –server hostname –username username –password password –communities community1,community2,…
Then I’ll have to allow SNMP Traffic though firewall, so …
- go to your VSphere Client, connecto to VCenter
- Select the host that you inform’d in the steps before
- Go to the Configuration tab, and click “Security Profile”
- Click on Properties
Then scroll down, find the “SNMP Server” option and click “Firewall” to allow connections from Any IP or to filter to just some IP addresses (for security).
Click OK. Make sure that SNMPd is running (you can click on “Options” as a shortcut to start the service and change the service activation policy.
You’re all set…
Hope it helps.