Setup SNMP on vSphere ESX Host without vMA

I have really enjoyed that ESX has made me learn Linux. Having a very Windows background, Linux has always been one of those undiscovered areas I get lost in.

Here I will show you how to setup SNMP from your vCenter server as well as on an ESX host with vSphere.


There are two ways to go about this:

  1. 1) Set this up individually on your ESX servers by opening a SSH window.  You just need putty or an ssh too
  2. 2) Use vMA (vSphere Management Assistant) with instructions to install it located here.

Here we will set them up individually

Warning before we beginIf you haven’t enabled root on your host then this will not be an easy task to get started.  Just note that I will be using “root”.   So you may need to do an “su” before you begin to make yourself a super user.  Also, note that this is way different than old versions of ESX as SNMP is now embedded in the VMware Management Service (Host-Daemon).

I will be utilizing this along with Solarwinds 10.0 Network Performance Monitor which I use. If you have never used it, then you should check it out. There are many great free tools they have for VMware. I assure you, I am not getting paid for saying that. I have also noticed I can manage my EMC Avamar Backup solution using the same tools with SolarWinds. There are many free Linux tools as well as Cacti you can use to get the job done.

First thing to do is open up the SNMP firewall ports from vCenter to the host you are adding. Check the box and watch the Tasks occur below in vCenter.

Next we move on to one of the ESX hosts.   From here all changes will be made with the “nano” command.   I find it easier to use and navigate around.   Sorry Linux VI fanboys, I am a Windows Macintosh guy.  Open up the tool you use to ssh into the ESX host.   I prefer Bitvise Tunnlier which can be found from my tools page.  Connect to your ESX host and and run the following command: nano /etc/vmware/snmp.xml

Below will be the output of that setting.   Make the appropriate changes to them and hit Ctrl X.    This will allow you to save your modifications.

<config>
<snmpSettings>
<enable>true</enable>
<communities>public</communities>
<targets>server1@162 private</targets>
</snmpSettings>
</config>

After you have saved the settings, I always run one final command to make sure SNMP is running.   service snmpd restart

Once you have made sure all the services are running, you then need to go to your monitoring tool.   From here, you can see if the server is responding to SNMP requests.   So, in Orion I go to my Admin page like I am adding a regular server.  Then I tell it my Hostname of the server as well as click the check box for “Poll for ESX”.   Remember to use the FQDN (Fully Qualified Domain Name) of the server or it will time out.   In this version I do not have to add my community name in the middle.   However, I do have to add the ESX credentials located at the bottom.


From here you should be able to successfully add the node to your monitored environment.   There will be no need to add the mib libraries because they have already updated it for vSphere.


2 Comments

Add a Comment

Your email address will not be published. Required fields are marked *