Best Practice for monitoring a Windows Service

Pirate,

this is Part 3 of a SCOM series focussing monitors and rules. In my last post about Monitoring a Windows Service with SCOM 2012 R2 I’ve talked about how to set up a monitor for a specific service and how you can do something like a first level recovery. The way I showed you is a good way if you are about to monitor a specific service on a bunch of same class servers. Maybe you remember that I’ve set up the Monitor target to “Windows Server”

2014-09-03 17_07_29-scom - wwscom000326 - Remote Desktop Connection

Selecting “Windows Server” for new monitors will distribute the monitor to every windows instance in the whole management group respectively whole environment. Saying if you chose “Windows Server” here and check the “Monitor is enabled” box the service will be monitored on every server even though the service doesn’t exist on a server. Please keep your hands off!

Got that so far?

Another way you could set up the monitor is to select “Windows Server” and to leave the “Monitor is enabled” checkbox unchecked, right? Afterwards you could set an override to a specific object of class or for a group.

 

2014-12-16 19_52_40-wwscom000326 - Remote Desktop Connection

Aye… that’s a way to do it but if you are using SCOM Health Explorer you will face into a loooot of white circles because the requirements to monitor that service will be distributed to every Windows Server. No matter if you want to monitor that service on the server or not, as I said.  So thats not a good way to set up your environment, too.

 

So what to do?

The answer in most of these cases is create your own class!

In Operations Manager there are multiple methods that you can use to create a new class that can be used as a target for monitors and rules. I’ll show you what you’ve got to do.

1. Create a new group and add the servers you are about to monitor. Good news here: “Certain monitoring wizards will require a group to be specified. This specifies the group of computers that will be searched to determine if they have the component that the wizard is monitoring. For example, if you run the Windows Service monitoring wizard, you specify the name of a service to monitor. The wizard will search all computers in the target group that have the service installed. Only those computers with the service will be monitored.”

2014-12-16 20_21_06-wwscom000326 - Remote Desktop Connection

 

Just another remark on this point: Pleeeeeease seperate your customizations, rules, monitors, tasks etc. by management pack. Don’t ever, ever, ever, erver put everything together in one ore two managmenet packs. Thats just a mess and you will face into problems when upgrading management packs way quicker than you expect today.

 

So once you’ve created a new group and added the explicit members. Hit on “Management Pack Templates” and click on “Add Monitoring Wizard”.

2014-12-16 20_37_52-wwscom000326 - Remote Desktop Connection

Select “Windows Service”

2014-12-16 20_42_07-wwscom000326 - Remote Desktop Connection

Give it a name and select the Management pack.

2014-12-16 20_43_21-wwscom000326 - Remote Desktop Connection
Chose the service by hitting on “…” and search for the server. Target the group which we’ve installed in the first step.

2014-12-16 20_44_43-wwscom000326 - Remote Desktop Connection

Changes here are not necessary for my stuff so I leave everything as is.

2014-12-16 20_49_51-wwscom000326 - Remote Desktop Connection

And “create”

2014-12-16 20_51_04-wwscom000326 - Remote Desktop Connection

So what we’ve created is a new Class with a Service Running State monitor which is just monitoring the service on the machines in the group.

2014-12-16 21_15_00-wwscom000326 - Remote Desktop Connection
Actually this should cover over need so far but to show you the point I’ll create another unit monitor:

2014-12-16 21_43_49-wwscom000326 - Remote Desktop Connection

 

So here comes the big point: Instead of “Windows Server” we are able to select “IT-Pirate Citrix Print Manager Service” class which only affects systems within our group and this is actually my “Best Practice” advice on how to monitor a windows service.

*Captain.
More infromations:

TechNet: Selecting a target & Creating a new target

 

Submit a comment on “Best Practice for monitoring a Windows Service”

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2022 IT-Pirate