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?
Unable to check windows volume space
Re: Unable to check windows volume space
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\\'
/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.
Re: Unable to check windows volume space
I did try that and I get the same error message.
Re: Unable to check windows volume space
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.
Re: Unable to check windows volume space
To add to what @cdienger mentioned, is E: a mapped drive or a local drive?
Former Nagios Employee
Re: Unable to check windows volume space
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/