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”
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.
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.”
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”.
Select “Windows Service”
Give it a name and select the Management pack.
Changes here are not necessary for my stuff so I leave everything as is.
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.
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.