joinVM’s Blog

May 6, 2009

Nagios Check Script for VMFS Volumes

Filed under: Nagios, VMware — joinvm @ 9:09 am

Using this Script, you can check your vmfs-volumes (LUN, NFS, iSCSI, Local ESX Discs) for remaining free space using Nagios.

You have to do the following steps to use this script:

1. copy to your Nagios installation-directory (f.e. /usr/local/nagios/libexec/

2. chmod the file for execution (chmod +x)

3. edit your nrpe.cfg while adding the following line:

“command[check_mvol]=sudo /usr/local/nagios/libexec/ 50 10”

where “50” means: warning on less then 50 GB available space on one of your vmfs-volumes (exit 1)

and “10” means: critical on less then 10 GB available space on one of your vmfs-Volumes (exit 2)

Nagios will tell you, which volumes have an available space problem in your Nagios overview

4. Add the following line to your sudoers-file to help your nagios user-account 🙂

“nagios  ALL=(ALL) NOPASSWD: /usr/local/nagios/libexec/”

Please be aware, that the actual version is not able to:

a, check only specific volumes

b, check on % of space instead of sizes in GB

I’ll try to bring up another version in the future with extended features.

The actual version works fine on ESX 3.x.

Have much fun using it !!!



Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at

%d bloggers like this: