Page 1 of 1
Issue with thresholds notifications on DataStores of VMWare
Posted: Wed Oct 18, 2017 6:18 am
by Ivajlo911
Hi,
we have an issue with the warning and critical notifications when using the VMWare plugin of Nagios XI to monitor our Data Stores.
When we start the monitor without thresholds it always says OK - for instance:
[root@nagios ~]# ./check_esx3.pl -D xxx -u xxx -p xxx -l "vmfs" -s L3CENFVI
ESX3 OK - L3CENFVI=58953.00 MB (23.05%) | L3CENFVI=58953.00MB;; L3CENFVI=58953.00MB;; L3CENFVI=58953.00MB;
When we put a value for thresholds it always goes into this value - for instance:
./check_esx3.pl -D xxx -u xxx -p xxx -l "vmfs" -s L3CENFVI -w 30
ESX3 WARNING - L3CENFVI=58953.00 MB (23.05%) | L3CENFVI=58953.00MB;30; L3CENFVI=58953.00MB;30; L3CENFVI=58953.00MB;30;
or
./check_esx3.pl -D xxx -u xxx -p xxx -l "vmfs" -s L3CENFVI -w 10
ESX3 WARNING - L3CENFVI=58953.00 MB (23.05%) | L3CENFVI=58953.00MB;10; L3CENFVI=58953.00MB;10; L3CENFVI=58953.00MB;10;
and always provides warning notification.
if we put a critical value it always reports back critical despite of the volume of the free space, which in this case is 23%.
Can we ask for your support?
Details on installation:
CentOS Linux release 7.3.1611 64 bit
Nagios XI 5.4.7
Manual Install of XI
No special configurations on your system, ie; is Gnome installed
No proxy
Using SSL
Re: Issue with thresholds notifications on DataStores of VMW
Posted: Wed Oct 18, 2017 10:29 am
by kyang
Can you tell us the version of the check_esx3.pl plugin?
Code: Select all
/usr/local/nagios/libexec/check_esx3.pl -V
But it seems to be passing warnings and criticals in %.
Here are my examples.
Code: Select all
./check_esx3.pl -D 192.xxx -u xxx -p xxx -l "vmfs" -s ISOs
ESX3 OK - ISOs=26873627.59 MB (88.50%) | ISOs=26873627.59MB;; ISOs=26873627.59MB;; ISOs=26873627.59MB;;
[root@localhost libexec]# ./check_esx3.pl -D 192.xxx -u xxx -p xxx -l "vmfs" -s ISOs -w 80% -c 90%
ESX3 WARNING - ISOs=26873627.59 MB (88.50%) | ISOs=88.50%;80;90 ISOs=88.50%;80;90 ISOs=88.50%;80;90
[root@localhost libexec]# ./check_esx3.pl -D 192.xxx-u xxx -p xxx -l "vmfs" -s ISOs -w 80% -c 88%
ESX3 CRITICAL - ISOs=26873627.59 MB (88.50%) | ISOs=88.50%;80;88 ISOs=88.50%;80;88 ISOs=88.50%;80;88
See if that works for you!
Re: Issue with thresholds notifications on DataStores of VMW
Posted: Thu Oct 19, 2017 4:15 am
by Ivajlo911
Hi,
Thank you.
the version is:
root@nagios ~]# /usr/local/nagios/libexec/check_esx3.pl -
Usage: check_esx3.pl -D <data_center> | -H <host_name> [ -N <vm_name> ]
-u <user> -p <pass> | -f <authfile>
-l <command> [ -s <subcommand> ]
[ -t <timeout> ] [ -w <warn_range> ] [ -c <crit_range> ]
[ -V ] [ -h ]
Missing argument: command
[root@nagios ~]# /usr/local/nagios/libexec/check_esx3.pl -V
check_esx3.pl 0.2.1
However, we see a very strange problem.
For one data store it works as you suggest but does not measure right. It seems that if you put 20% critical warning it warns above 20%, which is strange, because the monitor measures free space. An example:
/check_esx3.pl -D -l "vmfs" -s L3CENFVI -c 30%
ESX3 OK - L3CENFVI=58937.00 MB (23.05%) | L3CENFVI=23.05%;;30 L3CENFVI=23.05%;;30 L3CENFVI=23.05%;;30
./check_esx3.pl -D -l "vmfs" -s L3CENFVI -c 20%
ESX3 CRITICAL - L3CENFVI=58937.00 MB (23.05%) | L3CENFVI=23.05%;;20 L3CENFVI=23.05%;;20 L3CENFVI=23.05%;;20
Thank you.
Re: Issue with thresholds notifications on DataStores of VMW
Posted: Thu Oct 19, 2017 9:41 am
by kyang
No problem!
It would seem like that because the critical threshold is set to 20%, and if you have 23% of free space then you are past the "critical threshold".
How did you want your threshold set for free space? If it's below 20% would make more sense probably.
It would be something like this --> the : means < 90, (outside {90 .. ∞}) in this example.
Code: Select all
[root@localhost libexec]# ./check_esx3.pl -D 192.168.7.20 -u [email protected] -p xxx -l "vmfs" -s ISOs -c 90%:
ESX3 CRITICAL - ISOs=26860678.54 MB (88.46%) | ISOs=88.46%;;90: ISOs=88.46%;;90: ISOs=88.46%;;90:
Here's an article for thresholds on Nagios Plugins.
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT
Is this what you wanted? Let us know!
Re: Issue with thresholds notifications on DataStores of VMW
Posted: Mon Oct 23, 2017 7:08 am
by Ivajlo911
Hi,
even if it may work in some described by you situations with a single Data Store, when we start it for all datastores it just does not work.
All datastores enter in state critical and start notifying.
Can you advise?
Re: Issue with thresholds notifications on DataStores of VMW
Posted: Mon Oct 23, 2017 2:05 pm
by npolovenko
Hello,
@Ivajlo911. Let me clarify this. If you run the command for each individual Data Source it works as it should, but when you run separate commands through XI for each data source all of them go into critical?
If that's the case please send in your Nagios XI System Profile so I can take a look at the command definitions inside the xi?
To send us your system profile. Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and upload it here, or you can send it in PM. If you choose to pm please let us know here as well.
Re: Issue with thresholds notifications on DataStores of VMW
Posted: Tue Oct 24, 2017 2:13 am
by Ivajlo911
Hi,
thank you for your answer. We might have misunderstood each other.
Let me give an example:
When we do the command without a specific datastore, each time when there is a threshold defined, all datastores go in that threshold.
[root@nagios ~]# ./check_esx3.pl -D xxxx -u xxx -з xxx -l "vmfs" -c 5%
ESX3 CRITICAL - storages : L3CENFVI=58937.00 MB (23.05%), L3CENFG4SAD=130211.00 MB (72.77%), RESTORE=424089.00 MB (40.45%), L3CENFG4SEX01=242629.00 MB (7.71%), L3CENFG4SEX02=538150.00 MB (17.11%), L3CENFG4SEX03=486897.00 MB (13.31%), L3CENFG4SEX00=295338.00 MB (28.17%), L3CENFG4SEX04=363026.00 MB (6.92%), L3CENFG4SEX05=1043534.00 MB (19.90%), L3CENFVI=58937.00 MB (23.05%), L3CENFG4SAD=130211.00 MB (72.77%), RESTORE=424089.00 MB (40.45%), L3CENFG4SEX01=242629.00 MB (7.71%), L3CENFG4SEX02=538150.00 MB (17.11%), L3CENFG4SEX03=486897.00 MB (13.31%), L3CENFG4SEX00=295338.00 MB (28.17%), L3CENFG4SEX04=363026.00 MB (6.92%), L3CENFG4SEX05=1043534.00 MB (19.90%), L3CENFVI=58937.00 MB (23.05%), L3CENFG4SAD=130211.00 MB (72.77%), RESTORE=424089.00 MB (40.45%), L3CENFG4SEX01=242629.00 MB (7.71%), L3CENFG4SEX02=538150.00 MB (17.11%), L3CENFG4SEX03=486897.00 MB (13.31%), L3CENFG4SEX00=295338.00 MB (28.17%), L3CENFG4SEX04=363026.00 MB (6.92%), L3CENFG4SEX05=1043534.00 MB (19.90%) | L3CENFVI=23.05%;;5 L3CENFG4SAD=72.77%;;5 RESTORE=40.45%;;5 L3CENFG4SEX01=7.71%;;5 L3CENFG4SEX02=17.11%;;5 L3CENFG4SEX03=13.31%;;5 L3CENFG4SEX00=28.17%;;5 L3CENFG4SEX04=6.92%;;5 L3CENFG4SEX05=19.90%;;5 L3CENFVI=23.05%;;5 L3CENFG4SAD=72.77%;;5 RESTORE=40.45%;;5 L3CENFG4SEX01=7.71%;;5 L3CENFG4SEX02=17.11%;;5 L3CENFG4SEX03=13.31%;;5 L3CENFG4SEX00=28.17%;;5 L3CENFG4SEX04=6.92%;;5 L3CENFG4SEX05=19.90%;;5 L3CENFVI=23.05%;;5 L3CENFG4SAD=72.77%;;5 RESTORE=40.45%;;5 L3CENFG4SEX01=7.71%;;5 L3CENFG4SEX02=17.11%;;5 L3CENFG4SEX03=13.31%;;5 L3CENFG4SEX00=28.17%;;5 L3CENFG4SEX04=6.92%;;5 L3CENFG4SEX05=19.90%;;5
in short in our case we want when we perform the following command
[root@nagios ~]# ./check_esx3.pl -D xxxx -u xxx -з xxx -l "vmfs" -c 5%
to have all datastores in OK state, but it does not happen.
Thank you.
Re: Issue with thresholds notifications on DataStores of VMW
Posted: Tue Oct 24, 2017 10:11 am
by lmiltchev
The command below would give a critical output if the free space is greater than 5%.
Code: Select all
./check_esx3.pl -D xxxx -u xxx -з xxx -l "vmfs" -c 5%
If you want to get a CRITICAL when the free space is less than 5%, then try using a colon after the threshold value.
Code: Select all
./check_esx3.pl -D xxxx -u xxx -з xxx -l "vmfs" -c 5%:
Did this change the output?
Note: Normally, you would use "x:" for a value that is "<x". It is hard to say if the % sign in front of the colon will "play well" in this case. It seemed to work for us when we tested it in-house.
Please let us know if this helped. Thank you!
Re: Issue with thresholds notifications on DataStores of VMW
Posted: Wed Oct 25, 2017 2:56 am
by Ivajlo911
Hi,
this helped us fully resolve the issue.
Thank you for your support and please close the call - thank you.
Re: Issue with thresholds notifications on DataStores of VMW
Posted: Wed Oct 25, 2017 9:06 am
by kyang
Sounds great! I'll be closing this topic as resolved!
If you have any more questions, feel free to create another thread!
Thank you for using the Nagios Support Forum!