Page 1 of 1

NSClient - ERROR: Invalid password.

Posted: Thu Oct 22, 2015 3:23 pm
by kwhogster
Raspberry PI Respbian Jesse
Apache2
Nagios 4.1.1

When I look at all the Services I see this error in the Status Column "NSClient - ERROR: Invalid password. "

I checked on each host C:\Program Files\NSClient++\nsclient.ini

; PASSWORD - Password used to authenticate against server
password = xxxxxxxx

Password is the same on all no special characters all lower case characters and numbers no spaces etc.

where on the Nagios Setup do i check?

any command line to run?

Thoughts

Re: NSClient - ERROR: Invalid password.

Posted: Thu Oct 22, 2015 3:42 pm
by hsmith
Check in any of your service definitions that use check_nt. The -s flag is going to be what should have the password following it.

Re: NSClient - ERROR: Invalid password.

Posted: Thu Oct 22, 2015 3:57 pm
by kwhogster
Here is example of my Service definitions in my windows.cfg

define service{
use generic-service
host_name SERV011
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}
define service{
use generic-service
host_name SERV011
service_description Uptime
check_command check_nt!UPTIME
}


Is this what you are talking about?

Thoughts

Re: NSClient - ERROR: Invalid password.

Posted: Thu Oct 22, 2015 4:56 pm
by rkennedy
Here's information from our documentation. You'll need to modify the check_nt command to use a password. Have you done this already?
If you specified a password in the NSClient++ configuration file on the Windows machine, you'll need to modify the check_nt command definition to include the password. Open the commands.cfg file for editing.

vi /usr/local/nagios/etc/objects/commands.cfg

Change the definition of the check_nt command to include the "-s <PASSWORD>" argument (where PASSWORD is the password you specified on the Windows machine) like this:

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

Save the file.

Re: NSClient - ERROR: Invalid password.

Posted: Thu Oct 22, 2015 5:52 pm
by kwhogster
That was it

Thanks

Made this change

# 'check_nt' command definition
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
}

New
# 'check_nt' command definition
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s mypass -v $ARG1$ $ARG2$
}


Services are now checking the servers

Problem solved


Thanks again

Re: NSClient - ERROR: Invalid password.

Posted: Fri Oct 23, 2015 9:13 am
by rkennedy
You're welcome. I will now close this thread, but feel free to open another if you need more assistance in the future.