Page 1 of 1

check_drivesize through NRPE - expr. error

Posted: Tue Nov 28, 2017 11:17 am
by nad
Hello,

when I run command

Code: Select all

./check_nrpe -H host_ip_address -c check_drivesize -a "crit=free<5GB" "warn=free<10GB" drive=c: "filter=type='fixed'"
from nagios server, I get error:

Code: Select all

Failed to validate filter see log for details: Warning expression is not valid: free<10GB
It is same when I set this command to nsclient.ini.

I've tried also alternative command
check_c=CheckDriveSize Drive=c:\ MinWarn=10GB MinCrit=5GB FilterType=FIXED CheckAll=false
But I get same error.

I'm using latest version of Nagios Core (NagiosĀ® Coreā„¢ 4.3.4) and NSClient++ (0.5.1.44)

Where can the problem be ?

Re: check_drivesize through NRPE - expr. error

Posted: Tue Nov 28, 2017 4:01 pm
by kyang
When I use GB, I get the same output error. Use "G" instead.

Code: Select all

./check_nrpe -H 192.168.3.46 -c check_drivesize -2 -a "crit=free<5G" "warn=free<10G" drive=c: "filter=type='fixed'"
This is my output.

Code: Select all

OK All 1 drive(s) are ok|'c: free'=276.22766GB;10;5;0;451.9297 'c: free %'=61%;2;1;0;100
Let us know if this helped you.

Re: check_drivesize through NRPE - expr. error

Posted: Wed Nov 29, 2017 6:43 am
by nad
Oh, thanks so much man.

I've copied this from older version of nsclient where It worked. It looks like that somebody has changed that.

The problem has been solved.

Re: check_drivesize through NRPE - expr. error

Posted: Wed Nov 29, 2017 10:12 am
by lmiltchev
Great! I am locking the topic. If you have any more issues/questions, please start a new thread.