Page 1 of 2

Service Not Found

Posted: Fri Apr 19, 2013 1:21 pm
by sheld0r
I'm currently troubleshooting an issue with a service. It's stating that the service is not found. I'm still new to Nagios, but this is what I've done so far.

-Verify that the NSClient++ is installed and running.
-Correct password is used on the NSClient++
-Verified service name is correct. Service name listed on server under Services is BlackBerry Router. I tried also using the .exe at the end.
-Under CCM, I ran a command line check as:
COMMAND: /usr/local/nagios/libexec/check_nt -H 192.168.100.73 -s "r3con_1" -p 12489 -v SERVICESTATE -l BlackBerryDispatcher.exe -d SHOWALL
OUTPUT: BlackBerryDispatcher.exe: Not found


I'm not sure of any other logging I could check. What am I missing? Everything seems to check out okay.

Re: Service Not Found

Posted: Fri Apr 19, 2013 1:39 pm
by slansing
Lets start with checking a service we know is there with out a doubt, please run the following from the nagios XI server's command line:

Code: Select all

/usr/local/nagios/libexec/check_nt -H 192.168.100.73 -s "r3con_1" -p 12489 -v SERVICESTATE -l spooler -d SHOWALL 
Let us know what the return is, then try this one:

Code: Select all

/usr/local/nagios/libexec/check_nt -H 192.168.100.73 -s "r3con_1" -p 12489 -v SERVICESTATE -l BlackBerryDispatcher -d SHOWALL 

Re: Service Not Found

Posted: Fri Apr 19, 2013 3:07 pm
by sheld0r
Here is the output:

Code: Select all

[root@nagios /]# /usr/local/nagios/libexec/check_nt -H 192.168.100.73 -s "r3con_1" -                 p 12489 -v SERVICESTATE -l spooler -d SHOWALL
 spooler: Started

[root@nagios /]# /usr/local/nagios/libexec/check_nt -H 192.168.100.73 -s "r3con_1" -p 12489 -v SERVICESTATE -l BlackBerryDispatcher -d SHOWALL
 BlackBerryDispatcher: Not found

Re: Service Not Found

Posted: Fri Apr 19, 2013 3:15 pm
by scottwilkerson
Can you run the following from the window cmd.exe

Code: Select all

net start | find "BlackBerryDispatcher"

Re: Service Not Found

Posted: Fri Apr 19, 2013 3:23 pm
by sheld0r
It takes the command, but it doesn't return anything. But no error. So I assume it started the command successfully.

Re: Service Not Found

Posted: Fri Apr 19, 2013 3:29 pm
by sreinhardt
You would be correct, it ran the command and nothing matched the search term. If you open the properties of the blackberry dispatcher service window, what is the Service Name? That is what you need to use with nsclient to find the proper service.

start->run->services.msc->find BBDispatcher service and right click properties-> At the top of the new window should show Service Name.

On nagios:

/usr/local/nagios/libexec/check_nt -H 192.168.100.73 -s "r3con_1" -p 12489 -v SERVICESTATE -l [Service Name from previous steps] -d SHOWALL
(Do not include brackets in that, simply to contain it all in one line to display for you.)

Re: Service Not Found

Posted: Fri Apr 19, 2013 3:34 pm
by sheld0r
Service Name: BlackBerry Dispatcher

I have it set for exactly that name. That's odd that it's not working.

Re: Service Not Found

Posted: Fri Apr 19, 2013 3:40 pm
by slansing
Are you sure that it does have a space in the service name? I do not believe that windows would register it as a valid service, it may have a space in it's display name however.

If it does indeed have a space, wrap the service name in single quotes and run the check from the command line again:

Code: Select all

/usr/local/nagios/libexec/check_nt -H 192.168.100.73 -s "r3con_1" -p 12489 -v SERVICESTATE -l 'service name that has a space in it'

Re: Service Not Found

Posted: Fri Apr 19, 2013 3:46 pm
by sheld0r
That's the ticket!! It worked!

Code: Select all

COMMAND: /usr/local/nagios/libexec/check_nt -H 192.168.100.73 -s "r3con_1" -p 12489 -v SERVICESTATE -l 'BlackBerry Dispatcher' -d SHOWALL 
OUTPUT:  BlackBerry Dispatcher: Started
So when their is indeed a space, you need to add single quotes ..got it!

Re: Service Not Found

Posted: Fri Apr 19, 2013 3:48 pm
by sheld0r
Thank you very much for the help!!!!