Nagios & NSClient++

Solved
Meu-ku Posted messages 105 Status Member -  
 Siss0ko -
Hello,
I have a problem, I'm getting on Nagios this "NSClient - ERROR: Invalid password"
While under NSClient no password is defined.

Here is what I placed in my "command.cfg" file from Nagios.

define command{
command_name check_nt
command_line $USER1$/check_nt -H 192.168.0.53 -p 12489 -v $ARG1$ $ARG2$
}

Would you like any other "copy-paste" from a specific configuration file???

Thank you in advance for your answers, if there are any ;-)
Configuration: Windows XP Firefox 2.0.0.12

8 answers

vandaal
 
Hello,
I am working on Nagios for a project and I found the solution to your problem...
You need to define a password in the NSC.ini file at the following line:

;# USE THIS FILE
; Use the INI file as opposed to the registry if this is 0 and the use_reg in the registry is set to 1
; the registry will be used instead.
use_file=1
allowed_hosts=192.168.1.10
password="PASSWORD TO DEFINE"

Then I configured the command.cfg file (default file in Nagios...), by adding "-s "PASSWORD TO DEFINE" like this:

define command{
command_name check_nt
command_line $USER1$/check_nt -H 192.168.0.53 -p 12489 -v $ARG1$ $ARG2$ -s "PASSWORD TO DEFINE"
}

I hope I have helped you... remember to check your firewalls (exception on port 12489).

One last tip to test if nsclient++ responds correctly to TCP requests:

1: Go to the folder: cd /usr/lib/nagios/plugins/
2: Type the following command: ./check_nt -H CLIENTIPADDRESS -v 12489 -s "DEFINED PASSWORD"

Good luck!
7