Friday, September 25, 2009

How to enable SNMP on a VMWare ESX Server

Since we all are looking to monitor our ESX servers, a lot of people are asking how to configure SNMP on their ESX servers so that they can be monitored via a third party product. Seems like a pretty logical question, so here's how you do it.

To enable SNMP on ESX Server version 3.5:

  1. On your ESX Server, enable SNMP under the security profile.
  2. Login as root
  3. Edit the snmpd.conf file (vi /etc/snmp/snmpd.conf) or (nano /etc/snmp/snmpd.conf)
  4. Use the arrow keys to go down to the section "rocommunity public". Replace "public" with your community string for your environment. Then use "Ctrl+X" to exit out of Nano. You'll be asked if you would like to save. Type in "y" for yes and hit enter. Press enter again when confirming the filename to save as.
  5. Since SNMP is not started by default, you'll need to type in this command to ensure it will be started after a reboot of the ESX server. The command is:
    chkconfig snmpd on
  6. We'll need to allow SNMP traffic through the built-in ESX firewall. To do this, type in the following command:
    esxcfg-firewall -e snmpd
  7. Now we're ready to start the SNMP service. Type in:
    service snmpd start

Of course, the exact commands, paths, and etc may vary based upon your particular implementation but you should be able to get there from here.

For more information, visit the VM Ware page on how to configure SNMP on the ESX Server.

1 comment:

Anonymous said...

Amiable post and this enter helped me alot in my college assignement. Gratefulness you as your information.