VMWare – Enable SNMP

Problem

You need to enable SNMP on VMWare ESXi

 

Solution

To enable SNMP first go to Configuration => Software => Security Profile

myite-vm-snmp-00

On the top right choose properties

myite-vm-snmp-06

Select snmpd then click on options

Choose Start and stop with host

myite-vm-snmp-05

If you get the following error proceed or jump to last step

myite-vm-snmp-03

Log into host via SSH

Edit the file /etc/vmware/snmp.xml

If you are not familar with editing try:

vi /etc/vmware/snmp.xml

You should see

myite-vm-snmp-04

We need to change the file as follows

<?xml version="1.0"?>
<config><snmpSettings><enable>true</enable><port>161</port>
<communities>PUT-YOUR-SNMP-COMMUNITY-HERE</communities>
<targets>MONITORING-SERVER-IP-ADDRESS-HERE</targets></snmpSettings></config>

Hit ESC and i on the keyboard together then move your cursor to the true section and replace false with true.

Then move the cursor to the

<communities></communities>

and enter your community string

Then move your cursor to the

<targets></targets>

and add your device or server that is monitoring SNMP

Once done hit ESC key then type “:wq” without the quotes to save and quit

When done go to SNMP service option as before and start the service

myite-vm-snmp-05

Proceed with configuring your SNMP monitor to point to this ESXi host which should now respond to SNMP requests.

One additional step is to download the MIBs, unzip (if required) and upload them to your monitoring server.

v6.x
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1013445

v5.5
https://my.vmware.com/web/vmware/details?productId=352&downloadGroup=SNMPMIBS550

 

 

Tested Platforms

VWWare ESXi v5.5
VWWare ESXi v5.1

Hits: 10

Leave a Reply