Monitoring vSphere/ESX(i) in nagios is fairly easy. For FreeBSD users, you'll need to do the following:

Install nagios:

cd /usr/ports/net-mgmt/nagios-devel && make install clean

nagios-devel is only required until 3.2.4 is released as there is a servicedependency fix that will be incorporated into 3.2.4 that makes it easy to do the type of servicedependency that is used in vsphere.cfg.

Install the vmware-vsphere-cli port:

cd /usr/ports/net/vmware-vsphere-cli && make install clean

Download the plugin from op5 and place it in /usr/local/libexec/nagios

Configure any remaining components of nagios for your environment.

Use vicfg-user from the vmware-vsphere-cli port to add a nagios user to each of your ESXi hosts:

vicfg-user -server esxihost -username root -e user -o add -l nagios -p securepassword -r read-only

Create a file called vmware_authfile in /usr/local/libexec/nagios (and make sure it's only readable by the nagios user) with the following contents:


Add the vSphere configuration/dependency config file into your nagios config files and edit as needed.

You'll want to add your own hosts, just follow the existing format. The magic will automatically add the required tests/dependencies as long as the additional hosts follow the same format as the sample esxihost.

Add the vSphere checkcommands for nagios to your config as well.

Reload nagios and you should end up with vSphere monitoring!

Sample Output also includes additional ability to monitor VMs and other information by having it connect to vCenter. You should easily be able to add in these additional tests if you want them by following the existing samples.