check_drivesize in windows with threshold

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_drivesize in windows with threshold

Post 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.
Former Nagios Employee
Naveed
Posts: 285
Joined: Mon May 30, 2016 10:10 am

Re: check_drivesize in windows with threshold

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_drivesize in windows with threshold

Post by lmiltchev »

Your thresholds are set up as this:

Code: Select all

"warn=free<90%" "crit=free<98%"
The drive d has 96% free space, which is below the critical threshold. You probably meant to use the following thresholds:

Code: Select all

"warn=free<10%" "crit=free<2%"
Can you try these thresholds?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Naveed
Posts: 285
Joined: Mon May 30, 2016 10:10 am

Re: check_drivesize in windows with threshold

Post 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!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_drivesize in windows with threshold

Post 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%).
Naveed
Posts: 285
Joined: Mon May 30, 2016 10:10 am

Re: check_drivesize in windows with threshold

Post 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!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_drivesize in windows with threshold

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_drivesize in windows with threshold

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Naveed
Posts: 285
Joined: Mon May 30, 2016 10:10 am

Re: check_drivesize in windows with threshold

Post by Naveed »

Thank you very much

It worked for me, the way you suggested me to apply thresholds.
Thank you!
Naveed
Posts: 285
Joined: Mon May 30, 2016 10:10 am

Re: check_drivesize in windows with threshold

Post 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!!!!!!!
Locked