Unable to check windows volume space

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jpastore
Posts: 2
Joined: Fri Feb 17, 2017 12:30 pm

Unable to check windows volume space

Post 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?
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Unable to check windows volume space

Post 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\\'
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jpastore
Posts: 2
Joined: Fri Feb 17, 2017 12:30 pm

Re: Unable to check windows volume space

Post by jpastore »

I did try that and I get the same error message.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Unable to check windows volume space

Post by cdienger »

On the Windows machine, run "diskpart" and then "list volume" to get a list of valid volumes and upload the results.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Unable to check windows volume space

Post by rkennedy »

To add to what @cdienger mentioned, is E: a mapped drive or a local drive?
Former Nagios Employee
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Unable to check windows volume space

Post by mcapra »

Thanks @rkennedy!

@jpastore let us know if you have additional questions.
Former Nagios employee
https://www.mcapra.com/
Locked