failed to check_drivesize

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
s.wiki
Posts: 82
Joined: Sat Mar 04, 2017 11:02 am

failed to check_drivesize

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: failed to check_drivesize

Post 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
Former Nagios employee
https://www.mcapra.com/
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: failed to check_drivesize

Post by scottwilkerson »

I agree with @mcapra, you are going to want to filter out that partition that doesn't have a filesystem specified
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
s.wiki
Posts: 82
Joined: Sat Mar 04, 2017 11:02 am

Re: failed to check_drivesize

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: failed to check_drivesize

Post 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%
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
s.wiki
Posts: 82
Joined: Sat Mar 04, 2017 11:02 am

Re: failed to check_drivesize

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: failed to check_drivesize

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
s.wiki
Posts: 82
Joined: Sat Mar 04, 2017 11:02 am

Re: failed to check_drivesize

Post by s.wiki »

Hi,
It is working as expected now. Thank you for your assistance. kindly close the case.
Thanks again.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: failed to check_drivesize

Post by scottwilkerson »

Awesome glad all is working now!
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked