check_nt reporting back bad 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
CSSI
Posts: 20
Joined: Fri Jun 07, 2013 3:15 pm

check_nt reporting back bad password

Post by CSSI »

Something strange started happening, my CPU Load check started reporting back bad password despite none of my other checks doing the same.


I'm not sure why

Code: Select all

define service{
use      generic-service
host_name   dupree
service_description  Memory Usage
check_command  check_nt!MEMUSE!-w 80 -c 90 -s MyPassword
}
is working just fine yet this:

Code: Select all

define service{
use      generic-service
host_name   dupree
service_description  CPU Load
check_command  check_nt!CPULOAD!-l 5,80,90 -s MyPassword
}
Is reporting back with a bad password

Any ideas?

Thanks in advance!

On the server I'm checking it is reporting from the log

Code: Select all

Data: None&2&5
Invalid password (none)
Also from the terminal

Code: Select all

./check_nt -v CPULOAD -l 5,80,90 -d SHOWALL destinationip -p 12489 -s myPassword
It reports back just fine
Last edited by CSSI on Tue Jun 25, 2013 8:19 am, edited 2 times in total.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_nt reporting back bad password

Post by slansing »

Have you tried changing the NSclient++ password, then restarting NSclient++. Then, setting the new password in your check_command line? Something is wrong between the two, and since it works on one of your services.. have you checked to make sure you did not add any whitespace or invalid characters?
CSSI
Posts: 20
Joined: Fri Jun 07, 2013 3:15 pm

Re: check_nt reporting back bad password

Post by CSSI »

Changed the password in nsclient. Restarted the service, even rebooted the server. Changed the passwords in the check_command line on all my checks. Still everything is reporting okay except for my CPULOAD which is still working just fine via the terminal
CSSI
Posts: 20
Joined: Fri Jun 07, 2013 3:15 pm

Re: check_nt reporting back bad password

Post by CSSI »

Okay, creating a separate service that performs the same action and is copied word for word, except has a different description works fine.

I went ahead and commented out the old one and changed the new service's description to the old one but then it started having the same issue with the invalid description.

That boggles my mind. I went ahead and just ended up having the description slightly different since that will do for now.

But I really don't understand what is occurring.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_nt reporting back bad password

Post by slansing »

How odd :shock: Can you share the two different descriptions with us? Curious to know what is going on here.
CSSI
Posts: 20
Joined: Fri Jun 07, 2013 3:15 pm

Re: check_nt reporting back bad password

Post by CSSI »

Found the issue. There was another service with the exact same description in another config that had the host set to the wrong host.

So it was appearing in this host's list of checks and it was overriding the check in this hosts config. I suppose since it was loaded first?

But yes, weird issue.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_nt reporting back bad password

Post by slansing »

Ahh! That would certainly do it, thanks for the update!
Locked