Nsclient returns 0 for results


I am running nagios 2.4 on a FC 4 server. I have nsclient 2.0.1 installed on several windows 2003 Terminal Servers with SP1. I have made the change to the DEP for the nsclient to work. I have had it monitoring CPU, Memory, # of TS users, and Disk. All checks are working except 3 of them on 1 server. The results I see are 0 for CPU, Memory, and TS Users which I know is wrong. But for disk it reports the correct results. This is the same when I run the check from the command line. I have restarted the nsclient service. I have also tried to switch the port that I am using in case there was a conflict but got the same results. Again I know the check commands are correct because they use to work and I have them working on other servers.

I have restarted the terminal server but get the same results.

I also see an error in the event viewer:

NSClient CollectData: Call to retrieve counter value for \Processor(_total)% Processor Time failed, returning status code 4294967295.

Anyone have any ideas on what might have caused this. If you want any additional info please let me know.


\Processor(_total)% Processor Time
Looks like the backslashes are a problem . Try it without them.


Thank you for the response, however there are no backslashes that I can remove. Here is what my check command looks like for the cpu.

‘check_nt cpu’ command definition

define command{
command_name check_nt_cpu
command_line $USER1$/check_nt -H $HOSTADDRESS$ -v CPULOAD -l 1,90,95,60,80,95

And here is the service check command

Service definition

define service{
use generic-service ; Name of service template to use

    host_name                       panther3
    service_description             CPU load
    is_volatile                     0
    check_period                    24x7
    max_check_attempts              3
    normal_check_interval           1
    retry_check_interval            1
    contact_groups                  nt-admins
    notification_interval           120
    notification_period             24x7
    notification_options            w,u,c,r
    check_command                   check_nt_cpu

And I am using these same commands on multiple server and I am only getting the problem on one servers my other ones return the correct values.


Have you tried calling check_nt directly; before wiring it into nagios?

./check_nt -H -p 1248 -v COUNTER -l “\Server\Server Sessions”,“Server Sessions: %.f” -w 20 -c 30

In your case I expect (but didn’t test) that these should work:
./check_nt -H -p 1248 -v COUNTER -l “\Processor(_total)% Processor Time” -w 20 -c 30
./check_nt -H -p 1248 -v COUNTER -l “\Processor(_total)\% Processor Time” -w 20 -c 30

Out of curiosity, why did you choose nsclient over NC_Net? I ~thought~ both were currently stagnant, but NC_Net was “fresher”. Where did you get the updated(?) version of nsclient?