Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 '192.168.36.177' -s 'secret-password' -p 12489 -v CPULOAD -w 80 -c 90 -l 5,80,90,10,80,90


Check USED DISK SPACE

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

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

share|improve this question
    
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 '11 at 16:22

2 Answers 2

up vote 0 down vote accepted

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:

debug_level=-1
# DEBUG VERBOSITY
# This option determines how verbose the debug log out will be.
# Values: 0 = Brief output
#         1 = More detailed
#         2 = Very detailed
debug_verbosity=2
# DEBUG FILE
# This option determines where Nagios should write debugging information.   
debug_file=/usr/local/nagios/var/nagios.debug
share|improve this answer
    
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? –  Caterpillar Aug 3 '11 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$
    }
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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