Monitoring a Windows Service with SCOM 2012 R2

ahoy sailor!

Actually this is Part 2 of a SCOM series focussing monitors and rules. Originally my challenge was to set up a monitor for Citrix Print Manager Service. A customer of mine has a constellation where this service crashes nearly once a week. I’ve spent so many lines in explaining the difference between monitors and rules so I decided to write a second post.

Alright let’s start.

1. Go to Authoring – Management Pack Objects – Monitors

2. Right Click Monitors – Create Monitor – Unit Monitor…

1

3. In Monitor Type open Windows Services node and choose Basic Service Monitor. Select or create a custom Management Pack.

2

 

4. Name the Monitor (my recommendation is a unique prefix which should be a part of every custom rule/monitor/group-Servername-ServiceName) and insert a description.

When selecting the Monitor target do a little brainstorming on where you wanna use this Monitor. If you will only use it for 2008R2 servers only select these machines as monitor target. If you need the monitor working on all OS types select Windows Server like I did.

Parent Monitor could be a aggregate rollup monitor for example as we’ve learned in the previous post.

I chose Availability because what I actually do monitor is the availability for this task. So this fits here. Please undo the Monitor is enabled checkbox by default. If you leave this one enabled SCOM is trying to monitor the service on every machine in your environment.

3

 

5. Ok next is Service Details. It’s freakin’ important to choose the service and not to type in the service name. So do a click on “…”, type in the servername and select the service.

4

5

6. On Configure Health we work with the default, which is a two-state condition monitor setting.

6.

7. We enable alerting for this monitor and write down a custom text and hit on create.

7

8. For testing purposes we set an override for one specific server. So search for the Monitor and hit right on it and choose Overrides > Override the Monitor > For a specific object of class: Windows Server xxx Computer. The upcoming window shows you all servers on where this service is running. Choose one and hit ok.  A second window appears where you do have to check the override checkbox in the line of enabled and need to set the override value to true.

8

9

9.Alright it’s testing time. Go to Monitoring > Windows Computers do a right click on the “test”server and Open>Helath Explorer for [testserver]. Close the very annoying Scope…

10

… and find your newly created monitor under Availabilty – hopefully in a healthy state

11

10. Now stop the service on the server and see if the monitor turns to critical.

 

…ooookay…so what do we need to set up next? A simple recovery task would solve the customers need here so let’s do this.

11. Go back to Authoring > Monitors  – Look for your Monitor do a right click in the correct group and hit on > properties > Diagnostic and Recovery > Configure recovery taks and >Add > Recovery for critical health state

12

12. Run Command

13

13. Type in a Recovery name and a description. If you wanna follow my recommendation you check the “Recalculate monitor state after recovery finishes”. If the recovery is successful the monitor returns to a healthy state the next time that it detects the required information from the destination server(s).

14

14. I recommend you to work with the net services commands.

15

This is it!

16

Next Part of this series is a best practice recommendation for monitoring a Windows Service.

 

Yo Ho, Yo Ho! A pirate’s life for me.

*Captain

Submit a comment on “Monitoring a Windows Service with SCOM 2012 R2”

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