Ubuntu – NSClient++ authentication problem with nagios3

nagiosUbuntu

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?

Best Answer

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