How to check service on remote computer?

Hi, I have problem when trying to monitor a particular service on a remote computer running XP Professional.

Service name: NoticeGate
Display name: FaxPress Inbound Email Gateway

I tried using this command <check_nt -H $HOSTADDRESS$ -p 1248 -v SERVICESTATE -l “NoticeGate”> but Nagios is unable to monitor the service.

May I know whether there is any solution for such problem? Thank you.

It’s most likely a spelling difference, i.e. the service may not actually be NoticeGate". Just double check.

Note: The name listed in the services isn’t necessarily what the service is really called.

You need to look in:
HKLM\SYSTEM\CurrentControlSet\Services

and try to find your service there.

Hmm, good windows tip. Thx for helping out Big…

Hi BigWhitey, I think the service name is the same in the registry. I have captured the screenshot for your reference. But is the command correct?


check for the exact service name in the services part of the managemnt console. then try a
net stop “servicename” or net start…
that should give a clue about the exact service name.

Luca

FYI, I like to create a custom check command for checking services on windows with this:
define command{
command_name check_nt_service
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v SERVICESTATE -
d SHOWALL -l $ARG1$
}

Just feed it in your service(s) as ARG1$ like this:

check_command check_nt_service!Fwsrv,isactrl,W3Proxy,w
3schdwn

luca had a good tip about using “net start …”.

What is the error you get when you try to monitor the service?

Note: You can also find the servicename by opening services snapin, right-clicking on the service in question and looking at its properties. The “Service Name” field should be what it is called.

Hi Luca, I tried doing your way, 'net start/stop ', and I think the service name is correct, which is NoticeGate, because I have no problem stopping and starting it.

Hi BigWhitey, I created the custom check command as you mentioned above, but I still encounter same error message, that is ‘Connection refused by host’. May I also know whether there’s a place where I can find out what these -p -v -d -l mean in this check_nt command, because I need to understand how the other commands work? :slight_smile:

check_nt --help gives a complete help guide.

Hi BigWhitey,

I have used your check command, but am unable to check any services. I am guessing this is to do with authentication. I can’t find where I parse the Windows username and password for my Nagios machine. I get the following error:

Name or service not known
could not fetch information from server

I hope you can help,

Cheers.

[quote=“BigWhitey”]FYI, I like to create a custom check command for checking services on windows with this:
define command{
command_name check_nt_service
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v SERVICESTATE -
d SHOWALL -l $ARG1$
}

Just feed it in your service(s) as ARG1$ like this:

check_command check_nt_service!Fwsrv,isactrl,W3Proxy,w
3schdwn

luca had a good tip about using “net start …”.

What is the error you get when you try to monitor the service?[/quote]