Distributed Applications in a Snippet
A common request from customers is to be able to monitor an application and to display information about that application in a distributed application and on a variety of dashboards. So to do this effectively, you might need to create:
- A class for the application
- A registry based discovery for the application
- Groups \ relationships for:
- Computer Group for Application
- Instance Group for Application
- Health Service Watcher Group for Application
- Operating System Group for Application
- Dependency Roll ups for Group Health
- Distributed Application with relationships and Dependency Rolls ups
How long does it take to create all of this?
Alert and State View Dashboard
Manually create a Dashboard based on the groups
With the attached snippet, less than a minute.
So how does this work?
Start Visual Studio and create a new Project. In My example, I'm going to call this GD.MyApp1
Add a reference to the Microsoft.SystemCenter.InstanceGroup.Library Management Pack
Add a Snippet Template Item (Add New Item, Snippet Template). The default template will appear. Delete the contents and copy and paste the contents of this text file into the window and Save and Build
Save, Build and export (sealed) the Management Pack to a SCOM Dev environment to play with.
This delivers a simple service model for your application. You'll need to create some monitors targeted at the application class to see health roll up in the Distributed Application but the computer and health service groups and dashboard should populate immediately.
I'm really interested in feedback on this and if it is of interest then I can add snippets for other common scenarios:
My Application also has databases that need to be included in the Distributed Application
My Application also has websites that need to be included in the Distributed Application
I'll be starting a series of Visual Studio Authoring articles in the near future and will look to build this snippet as part of the series. I'll then look at how I converted the project into a snippet template and build up snippets for monitoring.
All information on this blog is provided on an as-is basis with no warranties and for informational purposes only. Use at your own risk.
The opinions and views expressed in this blog are those of the author and do not necessarily state or reflect those of my employer.