check_nt usage

Have tried searching for an answer to this with no success…
Running Ubuntu 9.04/nagios 3.0.6-2ubuntu1.1/nsclient 0.3.7. Have several Windows machines being monitored with partial success - Successfully monitoring CPU Loads/Uptime and a few others, but when trying to monitor drive space, I get wrong -l argument and status UNKNOWN. I have my check_nt command setup as:
define command {
command_name check_nt
command_line /usr/lib/nagios/plugins/check_nt -H ‘$HOSTADDRESS$’ -p 12489 -s password -v ‘$ARG1$’ ‘$ARG2$’
}

and Drive usage as:
define service{
use generic-service
host_name MyPC
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
}

Also, I am having no success with monitoring services, getting No service/process specified
My definition is:
define service{
use generic-service
host_name seagp-jb,seagpts1,seagpfs1
service_description W3SVC
check_command check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
}

Assuming that it is probably caused by the same prob on my part…

Any assistance appreciated…
Thanks, John.

Hi John,

Did you find a solution for this? I have exactly the same problem but using KUbuntu 9.10/nagios 3.0.6/nsclient 0.3.7

On my test machine I got something working with the following quotes around the end arguments (but I wasn’t using any password):

but this seems totally inconsistent for other commands, this doesn’t need it:

and drive usage does:

So, with this working happily on my test machine I try and install it on my live server (using a plaintext password), and this doesn’t work! The following are working:

CLIENTVERSION, UPTIME, MEMUSE

but for USEDDISKSPACE I get the following in Nagios (but running check_nt from the command line it works fine):

  • Usage:check_nt -H host -v variable -p port] -w warning] -c critical]-l params] -d SHOWALL] -t timeout] *

Any ideas anyone, this is driving me nuts.

FYI, in my nt.cfg my check_nt is defined as:

define command { command_name check_nt command_line /usr/lib/nagios/plugins/check_nt -H '$HOSTADDRESS$' -p 12489 -s PASSWORD -v '$ARG1$' '$ARG2$' '$ARG3$' '$ARG4$' '$ARG5$' '$ARG6$' }

-TrevK

Hi,

FYI, I have removed password checking and it is now working using this form:

-TrevK