Visual Studio Management Pack Authoring Series - Part 6 - Create a Health Service Watcher Group (class and discovery)

Lets create our Health Service Watcher group - this will be a group of Health Service Watcher objects that are running our application. I have built in a dependency roll up monitor so that the health of the group will be calculated based on the worst state of any member of the group.

Right Click GroupClassAndDiscovery and choose Add, New Item

Add Empty Management Pack Fragment and choose a name of GDMyAppHSWGroup

Copy and Paste this code between the <ManagementPackFragment></ManagementPackFragment> tags

You'll need to do a find \ replace for 2 items. The first changes the class namespace for the application class and discovery. The second changes the Display Name. 

1. Class Namespace and Discovery

Find What: GD.Application

Replace With: GD.MyApp

2. Display Name

Find What: GD Application Server

Replace With: GD My App Server

We should now be able to test this:

1. Build the Project and make sure it builds successfully.

2. Click Start to export the Management Pack to the default Management Group

3. Go to Authoring, Groups and check out the Group Members


4. Go to Monitoring, Discovered Inventory and scope for the HSW group

Notice that the health roll up (dependency roll up monitor) means that the Health Service Watcher Group does have a health state (worst state of member).

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.