Page 1 of 1

check drivesize unable to filter name not like '\\?\'

Posted: Wed Sep 27, 2017 3:37 am
by s.wiki
Hi,
Earlier i have open a case https://support.nagios.com/forum/viewto ... 16&t=45269
and solution was working.

However i faced same issue on another server, even i have used the solution provided earlier

Code: Select all

[root@~]# /usr/local/nagios/libexec/check_nrpe -H 10.253.9.60
I (0.5.0.62 2016-09-14) seem to be doing fine...

[root@~]# /usr/local/nagios/libexec/check_nrpe -H 10.253.9.60 -c check_drivesize   -a "filter=type in ('fixed') AND name NOT LIKE '\\?\'" "warn=free<5%" "crit=free<0%"  exclude=p
OK All 4 drive(s) are ok|'\\?\Volume{652366bd-3fa3-11e5-80b4-806e6f6e6963}\ free'=58.2539MB;17.4998;0;0;349.99609 '\\?\Volume{652366bd-3fa3-11e5-80b4-806e6f6e6963}\ free %'=17%;5;0;0;100 'D:\ free'=186.63183GB;9.9997;0;0;199.99413 'D:\ free %'=93%;5;0;0;100 'E:\ free'=103.16119GB;8.99975;0;0;179.99511 'E:\ free %'=57%;5;0;0;100 'C:\ free'=47.71495GB;3.98279;0;0;79.65598 'C:\ free %'=60%;5;0;0;100
Any idea?
Thank you again for your great help

Re: check drivesize unable to filter name not like '\\?\'

Posted: Wed Sep 27, 2017 9:53 am
by tgriep
I am running an older version of NSClient++ but instead of using "AND name NOT LIKE" in the command, I used "AND drive NOT LIKE " worked for me.
Try the following example and see if it works like you want.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 10.253.9.60 -c check_drivesize   -a "filter=type in ('fixed') AND drive NOT LIKE '\\?\'" "warn=free<5%" "crit=free<0%"

Re: check drivesize unable to filter name not like '\\?\'

Posted: Mon Oct 02, 2017 4:29 am
by s.wiki
tgriep wrote:I am running an older version of NSClient++ but instead of using "AND name NOT LIKE" in the command, I used "AND drive NOT LIKE " worked for me.
Try the following example and see if it works like you want.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 10.253.9.60 -c check_drivesize   -a "filter=type in ('fixed') AND drive NOT LIKE '\\?\'" "warn=free<5%" "crit=free<0%"
Hi
I have tried "drive" and the result still the same.
T_T kindly help

Re: check drivesize unable to filter name not like '\\?\'

Posted: Mon Oct 02, 2017 8:30 am
by tgriep
I suggest installing the latest stable 4.4.x version of NSClient++ and see if that works. It could be a bug in the newer client.
You can get that client at the link below.
http://www.nsclient.org/download/0.4.4/