Problem getting load cpu of Windos 2000 with NSClient

Hello,

I’m using Nagios 2.0b2. I also have installed NSCLient in a Windows 2000.
I’ve added this line to the file checkcommands.cfg:

‘check_nt_cpuload’ command definition

define command {
command_name check_nt_cpuload
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v CPULOAD -l $ARG1$
}

and I’ve added this line to the file services.cfg:

define service{
use gs
host_name ITD057
service_description check_nt_cpuload
check_command check_nt_cpuload!10,80,95!60,80,95!1440,80,95
max_check_attempts 10
normal_check_interval 5
retry_check_interval 3
check_period 24x7
notification_interval 30
notification_period 24x7
notification_options w,c,r
contact_groups gsystems
}

The problem is I always get this message as return: CPU Load 0% (10 min average). And this is not true, because the computer is working, so the CPU load should be bigger than 0%.

I’m also using NSCLient to get the space on the disk, and it works fine. So, I think there is a problem with my config on the cpu load service.

Thank you for your help.

not sure about this one…
here’s my checkcommand:
$USER1$/check_nt -H $HOSTADDRESS$ -v CPULOAD -l $ARG1$,$ARG2$,$ARG3$

and the service checked…
check_nt_cpu!10!80!90

This one works… seems like you could have some parameter wrong…

Luca

You’re right. Seems there are 2 versions of sintaxis for checkcommands.cfg. One with 1 parameter, and other with 3 parameters.
Anyway, I think the problem is each argument says a time interval, togheter with a warning and critical value. So, I think even in the case the load of the CPU is high, is this state is just for a few moments, after 5 minutes the load CPU will return 0.

I’m not sure, but I think this is my case.

I have tried adding this and I get this error:

Error: Service check command ‘check_nt_cpu’ specified in service ‘check_nt_cpuload’ for host ‘revsrv01’ not defined anywhere!
Checked 488 services.

What am I Missing?

you have a sytax error in your services.cfg file for the service called “'check_nt_cpuload” It should have told you the exact line that the error is on, so just do a vi +158 services.cfg if the error is on line 158.

You have defined the check in the services.cfg file as “check_nt_cpu” when your checkcommands.cfg has no check called that. It should have been “check_nt_cpuload” in services.cfg or else change the commands.cfg to “check_nt_cpu”. Your choice.