Problems with disk size checks on Windows virtual machines
-
- Posts: 34
- Joined: Wed Sep 19, 2018 3:20 am
Problems with disk size checks on Windows virtual machines
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.
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.
Re: Problems with disk size checks on Windows virtual machin
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Problems with disk size checks on Windows virtual machin
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:
https://support.nagios.com/forum/viewto ... 5&p=281424
The filter argument is the "secret sauce" in this case:
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.
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:
https://support.nagios.com/forum/viewto ... 5&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')"
Code: Select all
"filter=drive_or_id not like 'Volume' and type not in ('CDROM')"
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
-
- Posts: 34
- Joined: Wed Sep 19, 2018 3:20 am
Re: Problems with disk size checks on Windows virtual machin
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.
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.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Problems with disk size checks on Windows virtual machin
You need to allow arguments under the following section of your nsclient.ini
under
edit/add
then restart nsclient
this is the cause of
under
Code: Select all
[/settings/NRPE/server]
Code: Select all
allow arguments = 1
this is the cause of
Code: Select all
Exception processing request: Request contained arguments (not currently allowed, check the allow arguments option).
-
- Posts: 34
- Joined: Wed Sep 19, 2018 3:20 am
Re: Problems with disk size checks on Windows virtual machin
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
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
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Problems with disk size checks on Windows virtual machin
Let's also add this line to the same section
It's because you have a * and ' in there
Code: Select all
allow nasty characters = 1
-
- Posts: 34
- Joined: Wed Sep 19, 2018 3:20 am
Re: Problems with disk size checks on Windows virtual machin
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!!!!
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!!!!
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Problems with disk size checks on Windows virtual machin
Great!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!!!!
Locking