Problem passing UNC path


#1

The following is my call to check_nrpe, to get the disk utilization of a Windows server mountpoint…

check_command check_nrpe_disk_util!80!90!’\\\\DYNSQLSVR001\\M\\$\\Data01’

The commands.cfg directive is as follows:

command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckDriveSize -a ShowAll MinWarnFree=$ARG1$ MinCritFree=$ARG2$ Drive=$ARG3$

I can run this check manually and it works fine.

It took me a while to figure out the escape requirements in the service check definition (i.e. 8 's to represent 2 when the check is run). However, when nagios executes the check, it seems that it is appending a $ to the UNC string, as the result is

UNKNOWN: Could not get free space for: \DYNSQLCL001\M$\Data01$ \DYNSQLSVR001\M$\Data01$ reason: 123: The filename, directory name, or volume label syntax is incorrect.

So, the trailing ‘$’ seems to be my issue, though I am not certain. A check of /var/log/nagios/nagios.log seems to show that it is in fact trying to check the UNC with the last $ in it.

Any ideas much appreciated.


#2

I was able to get the check to “function” properly like this…

check_command check_nrpe_disk_util!80!90!’\\DYNSRVCL001\M$$\Data01’

However, it is not returning the disk space available for the mountpoint \DYNSVRCL001\M$\Data01

It is returning the disk space available for m:\

M$\Data01 is a Windows “Mounted Volume” and has it’s own size. It is not simply a subdirectory of M:\

Does check_nrpe not support the checking of mounted volumes?