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.
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:
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?
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: