NSClient - ERROR: Invalid password.

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

NSClient - ERROR: Invalid password.

Post 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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: NSClient - ERROR: Invalid password.

Post 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.
Former Nagios Employee.
me.
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: NSClient - ERROR: Invalid password.

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: NSClient - ERROR: Invalid password.

Post 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.
Former Nagios Employee
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: NSClient - ERROR: Invalid password.

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: NSClient - ERROR: Invalid password.

Post 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.
Former Nagios Employee
Locked