Partager via


Visual Studio Management Pack Authoring Series - Part 5 - Create a Computer Group (class and discovery)

Lets create our computer group - this will be a group of computer 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 GDMyAppComputerGroup

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 computer group

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

Disclaimer:
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.

Comments

  • Anonymous
    August 25, 2015
    As promised, here is a run through of authoring Management Packs using Visual Studio and the Operations
  • Anonymous
    September 04, 2015
    The Computer Group that I created as part of the initial authoring series grouped together computer objects
  • Anonymous
    September 07, 2015
    Part 3 created an instance group rather than a computer group.
    https://technet.microsoft.com/en-us/library/hh212842.aspx

    Let me know if I have misunderstood the question.

    Regards

    Graham