Page 1 of 1

need plugin to check Host for a failed Windows service

Posted: Wed Oct 12, 2011 5:52 pm
by lyle
On a Windows Host, we sometimes had the windows "Task Manager" service die, so I looked around for a plugin to check this.

check_all_services.wsf (aka Check Automatic Services for Windows) from Nagios Exchange seemed to be what I need and more, since it checks all windows services that are started automatically. But I get false positives from services that evidently start up on demand, like "Performance Logs and Alerts". I can enter exceptions for some of them, and that works.

But the biggest problem seems to be with "Microsoft .NET Framework" services, where the service name includes the specific version that's running. I'm told that versions will change with Windows updates, so it starts to be maintenance to list the exceptions. Calling the plugin with exceptions that include wildcards doesn't seem to work.

Maybe I'm going down the wrong alley here, and should be using a different plugin and/or looking for specific Services that have failed.

Any advice on approach and which plugin to try is appreciated. Thanks...Lyle

Re: need plugin to check Host for a failed Windows service

Posted: Thu Oct 13, 2011 10:48 am
by nscott
Do the services/processes in the Windows Server wizard not do this for you acceptably? If not then perhaps this doc will give you a good idea for:

Procs:

http://www.nsclient.org/nscp/wiki/guide ... check_proc

Services:

http://www.nsclient.org/nscp/wiki/CheckServiceState

Re: need plugin to check Host for a failed Windows service

Posted: Thu Oct 13, 2011 11:50 am
by lyle
Thanks for the reply, Nicholas, but your links refer to using the internal CheckServiceState and CheckProcState commands within NSClient++

I'm using the NRPE client on Windows in this case, so am looking for advice on an external plugin.

...Lyle

Re: need plugin to check Host for a failed Windows service

Posted: Thu Oct 13, 2011 11:54 am
by nscott
Ah,

Ok, well you can use NRPE with NSClient++ if you want. At any rate, if you have a plugin that is working properly right now, you can edit it to return a string (as indicated above) with the additional performance data.

Re: need plugin to check Host for a failed Windows service

Posted: Thu Oct 13, 2011 4:08 pm
by lyle
Thanks again for the reply, Nicholas.

If I'm not mistaken, when you say I "can use NRPE with NSClient++", you mean the server can talk to the NSClient++ client via the NRPE *protocol*. In my case, I've got an NRPE client, not an NSClient++ client.

If you'll take a look at my original post, you'll see that I can make exceptions with the plugin I'm using, but it's problematic when .NET services change their name with every update.

Any advice on the best plugin the NRPE client can use to tell the state of a Windows service?

...Lyle

Re: need plugin to check Host for a failed Windows service

Posted: Thu Oct 13, 2011 4:36 pm
by lmiltchev
I believe that in most cases people use NSClient++ when they want to monitor a Windows box. You can also use "agentless" monitoring with WMI if you wish.

You can check this link for more info:

http://assets.nagios.com/downloads/nagi ... indows.php

If you decide to go NSClient++ route, you may also want to see this:

http://assets.nagios.com/downloads/nagi ... Client.pdf