Page 1 of 1

List only alerting datastores from ESX using check_esx3

Posted: Tue Mar 20, 2018 1:10 pm
by sac1472
Hello,
Check_esx3 listing all datastores from ESX, but i want to list only alerting datastores from ESX As there are more than 50 datastores on one esx.

Command :
Check_esx3.pl -D xxx -H xxx -S seeionfile -l vmfs -o used,breif -w 90% -c 95%

Re: List only alerting datastores from ESX using check_esx3

Posted: Tue Mar 20, 2018 9:25 pm
by mcapra
So you want to alert on specific datastores rather than all datastores?

The check_esx3.pl help menu offers a solution:

Code: Select all

 * vmfs - shows Datastore info
    + (name) - free space info for datastore with name (name)
    all datastore info
I think you can pass the Datastore name via the -s argument when using vmfs. That's what these users seem to be doing:
https://support.nagios.com/forum/viewto ... pl#p226717
https://support.nagios.com/forum/viewto ... pl#p220884
https://support.nagios.com/forum/viewto ... pl#p235692

Re: List only alerting datastores from ESX using check_esx3

Posted: Wed Mar 21, 2018 3:34 am
by sac1472
Nope. I want that plugin should check all datastores from ESX and list only those which are in critical/warning state rather than printing all datastores from esx.
It gets difficult to identify which is in critical from all datastores & also from plugin output, nagios unable to show all datastore in dashboard as output exceeds the limit.

see attachment. you will understand what i am saying

Re: List only alerting datastores from ESX using check_esx3

Posted: Wed Mar 21, 2018 12:27 pm
by kyang
Hello,

I actually don't see an option that does this currently in check_esx3.

The best way is to specify which datastore using the -s.

Yes, you certainly have a lot of datastores, but the plugin doesn't determine which one is in critical or warning. Or at least I have been playing with it and cannot find the option to do so.

Re: List only alerting datastores from ESX using check_esx3

Posted: Thu Mar 22, 2018 2:58 am
by sac1472
hey, i found solution for that. that's all because of spelling mistake in argument shown in help.
see attached for help menu which shows wrong argument.
version of check_esx3 is 0.7.1

the correct argument is : - brief

correct command will be like :-
check_esx3.pl -D xxx -H xxx -S seeionfile -l vmfs -o used,brief -w 90% -c 95%

It's working now, you can close this topic. Also, if you have access, please update the correct argument in plugin that will be helpful for others. 8-)

Re: List only alerting datastores from ESX using check_esx3

Posted: Thu Mar 22, 2018 9:50 am
by kyang
Great catch!

I even looked passed this option.

Glad you got it working, and I'll be sure to mention that to our team.

Thanks for using the Nagios Support Forum.

Closing this topic now.