Page 1 of 1

Unable to check windows volume space

Posted: Thu Mar 30, 2017 7:51 am
by jpastore
Hello,

I am trying to check the space left on a mounted volume in windows. If I run the following I can see all available volumes.

/usr/local/nagios/libexec/check_wmi_plus.pl -H server -u 'user' -p 'pass' -m checkvolsize -a .

But when I try to check one specific volume with

/usr/local/nagios/libexec/check_wmi_plus.pl -H server -u 'user' -p 'pass' -m checkvolsize -a 'E:\path\to\volume\'

Nagios does not return any results and when I run it from the CLI I get the error

Trailing \ in regex m/E:\path\to\volume\/ at /usr/local/nagios/libexec/check_wmi_plus.pl line 5405.

Am I doing something wrong with this?

Re: Unable to check windows volume space

Posted: Thu Mar 30, 2017 2:53 pm
by cdienger
Try the following to escape the back slashes:

/usr/local/nagios/libexec/check_wmi_plus.pl -H server -u 'user' -p 'pass' -m checkvolsize -a 'E:\\path\\to\\volume\\'

Re: Unable to check windows volume space

Posted: Mon Apr 03, 2017 6:58 am
by jpastore
I did try that and I get the same error message.

Re: Unable to check windows volume space

Posted: Mon Apr 03, 2017 9:33 am
by cdienger
On the Windows machine, run "diskpart" and then "list volume" to get a list of valid volumes and upload the results.

Re: Unable to check windows volume space

Posted: Mon Apr 03, 2017 10:36 pm
by rkennedy
To add to what @cdienger mentioned, is E: a mapped drive or a local drive?

Re: Unable to check windows volume space

Posted: Tue Apr 04, 2017 11:07 am
by mcapra
Thanks @rkennedy!

@jpastore let us know if you have additional questions.