need plugin to check Host for a failed Windows service

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
lyle
Posts: 158
Joined: Sun Nov 21, 2010 3:05 am

need plugin to check Host for a failed Windows service

Post 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
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

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

Post 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
Nicholas Scott
Former Nagios employee
lyle
Posts: 158
Joined: Sun Nov 21, 2010 3:05 am

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

Post 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
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

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

Post 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.
Nicholas Scott
Former Nagios employee
lyle
Posts: 158
Joined: Sun Nov 21, 2010 3:05 am

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

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

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

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked