Page 1 of 1

check_nt reporting back bad password

Posted: Mon Jun 24, 2013 8:33 am
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

Re: check_nt reporting back bad password

Posted: Mon Jun 24, 2013 9:16 am
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?

Re: check_nt reporting back bad password

Posted: Tue Jun 25, 2013 8:19 am
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

Re: check_nt reporting back bad password

Posted: Tue Jun 25, 2013 8:41 am
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.

Re: check_nt reporting back bad password

Posted: Tue Jun 25, 2013 9:43 am
by slansing
How odd :shock: Can you share the two different descriptions with us? Curious to know what is going on here.

Re: check_nt reporting back bad password

Posted: Tue Jun 25, 2013 2:29 pm
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.

Re: check_nt reporting back bad password

Posted: Tue Jun 25, 2013 2:31 pm
by slansing
Ahh! That would certainly do it, thanks for the update!