How to create a computer group in the R2 Authoring Console

First, a best practice tip.

Every management pack should have a group containing instances of Windows Computer objects.  This group should contain all Windows Computers that host some component of the application you are monitoring.  We use this group of Windows Computer objects for various reasons.

One very good way to use this group is for your application “Computer State View”.  Another reason we would want to provide the customer with this group of Windows Computer instances is for customization of other management packs that are also targeting your application servers.

For example, we might want to customize a monitor located in another management pack, for all computers hosting “Application X”.  The customer can easily do this without having to create a new group, because we gave them a group ready for these types of customizations in the “Application X” management pack…for free!

Next, how to create the group.

In the Authoring Console, it’s very easy to create this new group.

image

Easy, right?  But you’re not finished yet.  Now we need to discover those Windows Computer instances.  So we create our discovery.

image

Okay…so now what?  Not quite as easy as creating the class.

Select Custom Discovery.  Name the discovery and select the target.  The target will be the computer group class that you just created before this step.

image

Click on Discovered Classes tab, and add your seed discovery class.  This is the class that discovers all instances hosting some component of your application.

image

Next, click on the Configuration tab and click Browse for type link.  Find the Group Populator module, and name your new module Id.

image

Without fail, you will see this error.  Click close.

image

What’s this?  That’s kind of scary.  Click Edit.

image

If you get this box, just browse for notepad.exe and use that as your editor for now.  You can always change this later.  But if you’ve already gone this far, I’m sure you have an editor already configured!

image

You’ll see this bit of XML.  Highlight all except the top line, as I did here.

image

Now delete it.

Copy this bit of XML into the editor.

 

<RuleId>$MPElement$</RuleId>
<GroupInstanceId>$MPElement[Name="YOUR_APPLICATION.YOUR_COMPUTER_GROUP"]$</GroupInstanceId>
<MembershipRules>
<MembershipRule>
<MonitoringClass>$MPElement[Name="Windows!Microsoft.Windows.Computer"]$</MonitoringClass>
<RelationshipClass>$MPElement[Name="SC!Microsoft.SystemCenter.ComputerGroupContainsComputer"]$</RelationshipClass>
<Expression>
<Contains>
<MonitoringClass>$MPElement[Name="YOUR_APPLICATION.YOUR_SEED_CLASS"]$</MonitoringClass>
</Contains>
</Expression>
</MembershipRule>
</MembershipRules>
</Configuration>

 

Now replace two red lines in the above XML with your management pack specific information.

The computer group:
YOUR_APPLICATION.YOUR_COMPUTER_GROUP

The computer instances that we discovered for our seed class:
YOUR_APPLICATION.YOUR_SEED_CLASS

Close the editor, saving your changes, and you should see something like this.

image

Click okay, because you’re done my friend.  If you get any errors, start from the top.