Page 1 of 1

failed to check_drivesize

Posted: Tue Aug 22, 2017 5:25 am
by s.wiki
Hi ,
One of my server having issue while using check_drivesize drive=*
I have comapred the same command on different server, kindly refer to the output and attachment.
May i know how to exclude this?

Code: Select all

[b]serverA[/b]
[root@ ]# /usr/local/nagios/libexec/check_nrpe -H  10.90.30.21 -c check_drivesize -a "filter=type in ('fixed') " "warn=free<5%" "crit=free<0%" drive=*
Filter processing failed: Failed to get size for \\?\Volume{82fbb537-bc25-11e5-a89b-9c8e991f36a4}\: 1005: The volume does not contain a recognized file system.
Please make sure that all required file system drivers are loaded and that the volume is not corrupted.
: 0 < convert(0)|

[b]serverB[/b]
[root@ ]# /usr/local/nagios/libexec/check_nrpe -H  10.250.0.129 -c check_drivesize -a "filter=type in ('fixed') " "warn=free<5%" "crit=free<0%" drive=*
OK All 3 drive(s) are ok|'C:\ free'=45.49789GB;4.02499;0;0;80.49999 'C:\ free %'=57%;5;0;0;100 'D:\ free'=160.60402GB;8.13207;0;0;162.64159 'D:\ free %'=99%;5;0;0;100 'P:\ free'=24.66615GB;1.74999;0;0;34.99999 'P:\ free %'=70%;5;0;0;100

Re: failed to check_drivesize

Posted: Tue Aug 22, 2017 8:49 am
by mcapra
Try this:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H  10.90.30.21 -c check_drivesize -a "filter=type='fixed' AND drive NOT LIKE '\\?\\'" "warn=free<5%" "crit=free<0%"
With the main difference being the filter rule we are applying:

Code: Select all

"filter=type='fixed' AND drive NOT LIKE '\\?\\'"
If that doesn't work, can you share the version of NSClient++ being used on the 10.90.30.21 machine? This command executed from the CLI of your Nagios XI Machine should tell you the NSClient++ verison of 10.90.30.21:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H  10.90.30.21

Re: failed to check_drivesize

Posted: Tue Aug 22, 2017 10:41 am
by scottwilkerson
I agree with @mcapra, you are going to want to filter out that partition that doesn't have a filesystem specified

Re: failed to check_drivesize

Posted: Thu Aug 24, 2017 4:51 am
by s.wiki
mcapra wrote:Try this:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H  10.90.30.21 -c check_drivesize -a "filter=type='fixed' AND drive NOT LIKE '\\?\\'" "warn=free<5%" "crit=free<0%"
With the main difference being the filter rule we are applying:

Code: Select all

"filter=type='fixed' AND drive NOT LIKE '\\?\\'"
If that doesn't work, can you share the version of NSClient++ being used on the 10.90.30.21 machine? This command executed from the CLI of your Nagios XI Machine should tell you the NSClient++ verison of 10.90.30.21:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H  10.90.30.21
Hi,
The result still same.
/usr/local/nagios/libexec/check_nrpe -H 10.90.30.21 -c check_drivesize -a "filter=type='fixed' AND drive NOT LIKE '\\?\\'" "warn=free<5%" "crit=free<0%"
Filter processing failed: Failed to get size for \\?\Volume{82fbb537-bc25-11e5-a89b-9c8e991f36a4}\: 1005: The volume does not contain a recognized file system.
Please make sure that all required file system drivers are loaded and that the volume is not corrupted.
: 0 < convert(0)|
/usr/local/nagios/libexec/check_nrpe -H 10.90.30.21
I (0.5.0.62 2016-09-14) seem to be doing fine...
Kindly assist,,thanks

Re: failed to check_drivesize

Posted: Thu Aug 24, 2017 2:42 pm
by scottwilkerson
I think Matt might have gotten an extra slash.

Can you try this instead

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H  10.90.30.21 -c check_drivesize -a "filter=type='fixed' AND drive NOT LIKE 'Volume'" "warn=free<5%" "crit=free<0%

Re: failed to check_drivesize

Posted: Thu Aug 24, 2017 11:50 pm
by s.wiki
scottwilkerson wrote:I think Matt might have gotten an extra slash.

Can you try this instead

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H  10.90.30.21 -c check_drivesize -a "filter=type='fixed' AND drive NOT LIKE 'Volume'" "warn=free<5%" "crit=free<0%

Hi,
I have tried a few times and the result are:

Code: Select all

# /usr/local/nagios/libexec/check_nrpe -H  10.90.30.21 -c check_drivesize -a "filter=type='fixed'" "warn=free<5%" "crit=free<0%" drive='\\?\Volume{82fbb537-bc25-11e5-a89b-9c8e991f36a4}\'
Filter processing failed: Failed to get size for \\?\Volume{82fbb537-bc25-11e5-a89b-9c8e991f36a4}\: 1005: The volume does not contain a recognized file system.
Please make sure that all required file system drivers are loaded and that the volume is not corrupted.
: 0 < convert(0)|
--result detects the volumes and fail as expected.

Code: Select all

# /usr/local/nagios/libexec/check_nrpe -H  10.90.30.21 -c check_drivesize -a "filter=type='fixed' AND drive NOT LIKE '\\?'" "warn=free<5%" "crit=free<0%" drive='\\?\Volume{82fbb537-bc25-11e5-a89b-9c8e991f36a4}\'
OK: No drives found|
--result excludes the volume as expected.

Code: Select all

# /usr/local/nagios/libexec/check_nrpe -H  10.90.30.21 -c check_drivesize -a "filter=type='fixed' AND drive NOT LIKE '\\?'" "warn=free<5%" "crit=free<0%" drive=*
Filter processing failed: Failed to get size for \\?\Volume{82fbb537-bc25-11e5-a89b-9c8e991f36a4}\: 1005: The volume does not contain a recognized file system.
Please make sure that all required file system drivers are loaded and that the volume is not corrupted.
: 0 < convert(0)|
--result still detects the volumes.
--expected result: not detecting the volume

I have tried the 'Volume' and it is still the same.

Kindly assist.

Thanks

Re: failed to check_drivesize

Posted: Fri Aug 25, 2017 10:43 am
by scottwilkerson
I did some more research and we may have been giving you incorrect commands, but lets try this

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H  10.90.30.21 -c check_drivesize -a "filter=type in ('fixed') AND name not like '\\?\'" "warn=free<5%" "crit=free<0%"
I wish I had a drive like that I could test against

Re: failed to check_drivesize

Posted: Sun Aug 27, 2017 11:17 pm
by s.wiki
Hi,
It is working as expected now. Thank you for your assistance. kindly close the case.
Thanks again.

Re: failed to check_drivesize

Posted: Mon Aug 28, 2017 7:53 am
by scottwilkerson
Awesome glad all is working now!