Check_NT missing?


Ok, I am sorry if this has been covered already, but I have been looking for several days without an answer. I am new to Nagios and Linux as well. I have only been using them for about a week now. I am an experienced Windows administrator.

I have Nagios installed, up and running well. I followed instructions where I could find them. I am currently attempting to setup NSClient ++ to monitor my windows servers. When I run the verification I get the following message back.

Error: Service check command ‘check_nt’ specified in service ‘UpTime’ for host ‘host’ not defined anywhere!

the message is the same no matter what function I am trying to check, UPTIME, CPUUSAGE, CLIENTVERSION, etc.

I believe that my problem is that check NT is not defined in my commands.cfg file. I have not found any good examples of a command.cfg file that defines check_nt however. I have plenty of commands for checking the actual services, just nothing for the actual check_nt command.

I am not sure if I am on the right track or not. Could someone please give me a hint as to which way I should go. I do not think they are incorrect, btu I am going to post my code snipet from the services anyway.

Service definition

define service{
host_name rdytest
service_description UpTime
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups server_admins
notification_interval 120
notification_period 24x7
notification_options c,r
check_command check_nt!UPTIME

Thanks for any help.


Heres an example command definition that i use to use in my checkcommands.cfg file:

define command{
command_name check_nt_disk
command_line /usr/local/nagios/libexec/check_nt -H $HOSTADDRESS$ -p 1248 -v FREEDISKSPACE -l $ARG1$ -w $ARG2$ -c $ARG3$


and the corresponding service check check_command definition:
check_command check_nt_disk!c!10!1

This passes ‘c’ as ARG1, ‘10’ as ARG2, and ‘1’ as ARG3.

To find out what you can throw at your check_nt plugin, do this:
/usr/local/nagios/libexec/check_nt --help

replace the path with wherever your check_nt plugin is. If you dont know where it is, try out this:
$ updatedb
–wait for a bit–
$ locate check_nt

You should also look at your NSClient documentation to see what commands it accepts, what info it can return, etc.

Heres another example:
Service definition:
check_command check_nt_cpu!10,30,50,60,95,100
define command{
command_name check_nt_cpu
command_line /usr/local/nagios/libexec/check_nt -H $HOSTADDRESS$ -p 1248 -v CPULOAD -l $ARG1$

NSClient should be accepting the CPULOAD, FREEDISKSPACE, etc as built in parameters. This should be listed in the documentation for it.

This info might be a little bit off since i don’t monitor windows boxes anymore, but you should get the idea from these examples.