Problems with disk size checks on Windows virtual machines

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Problems with disk size checks on Windows virtual machines

Postby admincauce » Mon Aug 26, 2019 2:18 am

Good Morning,

I have monitored several Linux virtual machines and several more Windows on my Nagios system. Checks on Windows machines work perfectly, but from time to time and on some windows machines, the check "check_disksize" gives me the following output:


Filter processing failed: Failed to get size for \? \ Volume {e69b2f28-217f-11e6-80d3-806e6f6e6963} \: 87: The parameter is incorrect.

This output is correctly recovered in the next check. But as I have everything notified by mail, emails come from this unkwnow state. Why are these checks on the size of the disk of Windows virtual machines?

Here is the definition of the service:

define service {
use generic-service, srv-pnp
hostgroup_name windows-servers
service_description Disks usage
check_command check_nrpe! check_drivesize "warn = free <20%" "crit = free <10%" drive = *
}

Thank you very much in advance.
admincauce
 
Posts: 32
Joined: Wed Sep 19, 2018 3:20 am

Re: Problems with disk size checks on Windows virtual machin

Postby mbellerue » Mon Aug 26, 2019 1:51 pm

Do you see any corresponding errors on the Windows side if you look in the file C:\Program Files\NSClient++\nsclient.txt ?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mbellerue
 
Posts: 779
Joined: Fri Jul 12, 2019 11:10 am

Re: Problems with disk size checks on Windows virtual machin

Postby mcapra » Tue Aug 27, 2019 1:35 pm

Which version of NSClient++ is running on the Windows VMs? It's going to influence how filters for your check_nrpe executions are written.

Here's a thread from the customer support section in which @lmiltchev offers some logic to filter out \\?\Volume records from the check_drivesize results:
viewtopic.php?f=16&t=53665&p=281424

Code: Select all
./check_nrpe -u -H 10.110.4.24 -t 60 -c check_drivesize -a "warn=used>=60%" "crit=used>=70%" drive=* "filter=drive_or_id not like 'Volume' and type not in ('CDROM')"


The filter argument is the "secret sauce" in this case:
Code: Select all
"filter=drive_or_id not like 'Volume' and type not in ('CDROM')"


That should just return non-CDROM drives that have an alphabetical label (A, B, C, D, etc). Not sure what if anything your hypervisor is doing with \\?Volume records that is perhaps special in some way.
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3584
Joined: Thu May 05, 2016 3:54 pm

Re: Problems with disk size checks on Windows virtual machin

Postby scottwilkerson » Wed Aug 28, 2019 7:40 am

Thanks @mcapra
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 16664
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Problems with disk size checks on Windows virtual machin

Postby admincauce » Wed Aug 28, 2019 9:16 am

Thank you very much for both answers.

I am looking at the version I have in one of the virtual machines where it is giving me check problems, and the version of the NSClient ++ is 0.5.0.62.

I am checking that the latest stable version is version 0.5.2.35 for Windows. I also understand that it is because of this version that the filter in the check does not work for me:

[root @ GESNAG00 bin] $ / usr / local / nagios / libexec / check_nrpe -n -H 10.200.5.3 -c check_drivesize -a drive = * "filter = drive_or_id not like 'Volume' and type not in ('CDROM') "
Exception processing request: Request contained arguments (not currently allowed, check the allow arguments option).

It would be advisable to update to the latest version of NSCliente on my Windows machines !?

Best regards.
admincauce
 
Posts: 32
Joined: Wed Sep 19, 2018 3:20 am

Re: Problems with disk size checks on Windows virtual machin

Postby scottwilkerson » Wed Aug 28, 2019 9:24 am

You need to allow arguments under the following section of your nsclient.ini

under
Code: Select all
[/settings/NRPE/server]

edit/add
Code: Select all
allow arguments = 1


then restart nsclient

this is the cause of
Code: Select all
Exception processing request: Request contained arguments (not currently allowed, check the allow arguments option).
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 16664
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Problems with disk size checks on Windows virtual machin

Postby admincauce » Wed Aug 28, 2019 9:46 am

Thanks for the reply.

Make changes in nrpe.ini and restart the service, execute again the comand and get the next error:

[root@GESNAG00 etc]$ /usr/local/nagios/libexec/check_nrpe -n -H 10.200.6.3 -c check_drivesize -a drive=* "filter=drive_or_id not like 'Volume'"
Exception processing request: Request command contained illegal metachars!


Something wrong in the filter options?

Regards
admincauce
 
Posts: 32
Joined: Wed Sep 19, 2018 3:20 am

Re: Problems with disk size checks on Windows virtual machin

Postby scottwilkerson » Wed Aug 28, 2019 10:00 am

Let's also add this line to the same section
Code: Select all
allow nasty characters = 1


It's because you have a * and ' in there
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 16664
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Problems with disk size checks on Windows virtual machin

Postby admincauce » Wed Aug 28, 2019 10:15 am

Thanks you so much!!!

It's work fine.

[root@GESNAG00 site]$ /usr/local/nagios/libexec/check_nrpe -n -H 10.200.6.3 -c check_drivesize -a drive=* "filter=name not like '?'"
OK All 3 drive(s) are ok|'\\?\Volume{735c63a6-1ce6-11e6-80d0-806e6f6e6963}\ used'=33.84375MB;279.99687;314.99648;0;349.99609 '\\?\Volume{735c63a6-1ce6-11e6-80d0-806e6f6e6963}\ used %'=10%;80;90;0;100 'C:\ used'=46.53652GB;47.72499;53.69062;0;59.65624 'C:\ used %'=78%;80;90;0;100 'D:\ used'=0B;0;0;0;0


Thanks you!!!!
admincauce
 
Posts: 32
Joined: Wed Sep 19, 2018 3:20 am

Re: Problems with disk size checks on Windows virtual machin

Postby scottwilkerson » Wed Aug 28, 2019 10:20 am

admincauce wrote:Thanks you so much!!!

It's work fine.

[root@GESNAG00 site]$ /usr/local/nagios/libexec/check_nrpe -n -H 10.200.6.3 -c check_drivesize -a drive=* "filter=name not like '?'"
OK All 3 drive(s) are ok|'\\?\Volume{735c63a6-1ce6-11e6-80d0-806e6f6e6963}\ used'=33.84375MB;279.99687;314.99648;0;349.99609 '\\?\Volume{735c63a6-1ce6-11e6-80d0-806e6f6e6963}\ used %'=10%;80;90;0;100 'C:\ used'=46.53652GB;47.72499;53.69062;0;59.65624 'C:\ used %'=78%;80;90;0;100 'D:\ used'=0B;0;0;0;0


Thanks you!!!!

Great!

Locking
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 16664
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core

Who is online

Users browsing this forum: Bing [Bot] and 24 guests