I have installed & configured NSClient++ in windows xp host and set the default password to test which will be there in C:\Program Files\NSClient++\NSC.ini.

The nagios is showing windows services but it says NSClient - ERROR: Invalid password.

I am using the default password which is there in NSC.ini file. and it works when I run the below command from linux box and I have enabled the port too.

Check CPU Load

/usr/lib/nagios/plugins/check_nt -H '' -s 'secret-password' -p 12489 -v CPULOAD -w 80 -c 90 -l 5,80,90,10,80,90


/usr/lib/nagios/plugins/check_nt -H '' -s 'secret-password' -p 12489 -v USEDDISKSPACE -d SHOWALL -l c

Please anyone can tell me where might I have gone wrong?

  • Just as a side note you might also want to look at a plugin that uses WMI to do your checks, it means you dont need an agent on the windows machine. there is a good one at thibault.info/node/2
    – beakersoft
    Aug 2, 2011 at 16:22

2 Answers 2


This likely means that that somehow "secret-password" is not being passed properly to Nagios when it runs the command. Sometimes it can be strange expansion issues or quoting issues.

I recommend enabling debuging in Nagios to see what command is actually being run:

# This option determines how verbose the debug log out will be.
# Values: 0 = Brief output
#         1 = More detailed
#         2 = Very detailed
# This option determines where Nagios should write debugging information.   
  • Thanks I enabled the debug mode & I came to know that the default password was not working. I changed the password in the both ends from secret-password to some single string password. Then It started working. But dont you think its weired. It should work with what ever password we assign right? Aug 3, 2011 at 3:24

It is likely that you haven't set the password in check_nt command definition:

define command{
    command_name    check_nt
    command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s s3cret -v $ARG1$ $ARG2$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.