The following is my call to check_nrpe, to get the disk utilization of a Windows server mountpoint…
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.