Page 1 of 1

check_esx plugin help needed

Posted: Thu Jul 25, 2013 11:36 am
by hudbaylicensing
The VMware wizard plugin works fine, but I wanted to tweak it a bit to get some of the info that we need.

Trying to use the check_esx plugin to connect to my VMWare Data Centre and return a list of all of my datastores with total space, free/used space, and to issue Warnings and Critical Warnings at 80% and 90%.

I can currently have it connect to the vCenter server and list all of the datastores and their used space by using the following command:

./check_esx3.pl -D VMDataCentreServerIP -u AdminUser -p AdminPasswd -l vmfs

I have tried appending -w80 and -c90 to the end of the command but all it does is add a ;80;90 top the end of each data store line.

Can someone tell me what I am doing wrong or give some advice?

Thanks,

Marc

Re: check_esx plugin help needed

Posted: Thu Jul 25, 2013 12:29 pm
by abrist
Are you using check_esx or check_esx3 ?

Re: check_esx plugin help needed

Posted: Thu Jul 25, 2013 1:14 pm
by hudbaylicensing
Sorry wasn't clear - using check_esx3.

Re: check_esx plugin help needed

Posted: Thu Jul 25, 2013 3:54 pm
by abrist
Looking at the threshold values: http://nagiosplug.sourceforge.net/devel ... HOLDFORMAT
You will need to specify percentages as well as understand that check_esx3 looks like it reports freespace, no used space, so you will want to use the format n%: instead of just n
For example:

Code: Select all

./check_esx3.pl -D VMDataCentreServerIP -u AdminUser -p AdminPasswd -l vmfs -w 20%: -c 10%:
Let me know how this works out for you.

Re: check_esx plugin help needed

Posted: Fri Jul 26, 2013 10:39 am
by hudbaylicensing
Thanks for the info.

Didn't help. Still outputting the format: DataStore Name = xx%;20;10

I did find another plugin/check command script called check_esx_datastores.pl which gives me most of what I am looking for, but the format is just ugly.

Re: check_esx plugin help needed

Posted: Fri Jul 26, 2013 12:51 pm
by abrist
Well, these checks should work. My testbox can successfully run the follow and get an ok:

Code: Select all

./check_esx3.pl -D 192.168.5.132 -u <user> -p <pass> -l vmfs -w 80% -c 90%
Output:

Code: Select all

ESX3 OK - storages : datastore1 (1)=204097.00 MB (42.96%), datastore2=272236.00 MB (28.58%), datastore1=254450.00 MB (11.15%) | 'datastore1 (1)'=42.96%;80;90 datastore2=28.58%;80;90 datastore1=11.15%;80;90