Page 2 of 3
Re: check_drivesize in windows with threshold
Posted: Thu Jun 23, 2016 5:01 pm
by rkennedy
Can you show us all of the different results from your test? It will help to figure out if this is possibly a bug with check_drivesize or not.
Re: check_drivesize in windows with threshold
Posted: Fri Jun 24, 2016 1:58 am
by Naveed
I have attached the command output from nagios server (External testing)
[root@AXmonitor vmn]# /usr/local/nagios/libexec/check_nrpe -H 1.2.3.4 -c check_drivesize -a "warn=free<90%" "crit=free<98%" "drive=c"
CRITICAL c: 114.782GB/126.998GB used|'c free'=12.21564GB;114.29823;124.45808;0;126.99804 'c free %'=9%;90;98;0;100
[root@AXmonitor vmn]# /usr/local/nagios/libexec/check_nrpe -H 1.2.3.4 -c check_drivesize -a "warn=free<90%" "crit=free<98%" "drive=d"
CRITICAL d: 9.859GB/284.998GB used|'d free'=275.13917GB;256.49823;279.29808;0;284.99804 'd free %'=96%;89;97;0;100
YOu can see drive d is only 9 GB used out of 285 GB. But still result is showing critical.
I have attached all screenshots of commands testing from CCM as well..
Hope so this would help us to figure the right problem.
Re: check_drivesize in windows with threshold
Posted: Fri Jun 24, 2016 9:53 am
by lmiltchev
Your thresholds are set up as this:
The drive d has 96% free space, which is below the critical threshold. You probably meant to use the following thresholds:
Can you try these thresholds?
Re: check_drivesize in windows with threshold
Posted: Fri Jun 24, 2016 12:14 pm
by Naveed
Thank you for reply.
Actually my requirement are as follows using check_drivesize with nrpe on windows server.
Whenever any of my drive consumed 90 %, it should generate a warning alert and critical on 95%.
I tried followings but all in vain, my result is not changing.
My one drive is 88% utilized.
"warn=free<90%" "crit=free<95%"
"warn=free<70%" "crit=free<80%"
"warn=free<75%" "crit=free<85%"
in all cases my result is in warning state, as my drive is utilized above critical.
I tried the following as well, but no luck so far.
"warn=used>75%" "crit=used>85%"
Need your expertise to suggest a solution please.
Thank you very much!
Re: check_drivesize in windows with threshold
Posted: Fri Jun 24, 2016 12:52 pm
by ssax
Please try this:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 1.2.3.4 -c check_drivesize -a "warn=free<10%" "crit=free<2%" "drive=c"
That should give you what you're looking for (free is less than X%).
Re: check_drivesize in windows with threshold
Posted: Mon Jun 27, 2016 6:08 am
by Naveed
Thank you SSAX
Its working fine from command line on nagios xi server.
But As I tried to edit the threshold from GUI, it does not take those threshold and generate alert on default threshold.
Kindly suggest something please.
Thank you!
Re: check_drivesize in windows with threshold
Posted: Mon Jun 27, 2016 10:36 am
by lmiltchev
How did you modify the service - by going to "Service Detail"->Configure->Re-configure this service or in the CCM? Did you apply configuration (if you modified the service under the CCM)?
Go to the CCM->Services, find your "check drive size" service, click on the "View Text Config" action button next to it (the diskette icon), and show us the config.
Re: check_drivesize in windows with threshold
Posted: Mon Jun 27, 2016 4:40 pm
by Box293
Due to some issues with how PHP escapes characters the "Test Check Command" may not work in these situations and should be ignored.
So for all further testing of this service you need to:
Make the changes to the service
Save the Service
Apply Configuration
Go back to the home screen and find the Service
When viewing the Service Status Details page click the Schedule a forced immediate check link
Just to re-iterate, for all further testing for this service DO NOT use the "Test Check Command" button, follow the steps above.
Re: check_drivesize in windows with threshold
Posted: Mon Jun 27, 2016 5:53 pm
by Naveed
Thank you very much
It worked for me, the way you suggested me to apply thresholds.
Thank you!
Re: check_drivesize in windows with threshold
Posted: Mon Jun 27, 2016 6:44 pm
by Naveed
Kindly just share the commands for threshold of check_memory and check_cpu/check_load
I am using below, please validate these.
Thank you!
check_nrpe!check_memory -a show-all type=physical 'warning=used>92%' 'critical=used>95%'!!!!!!!
check_nrpe!check_cpu -a -w 92 -c 95!!!!!!!