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.
Easy, right? But you’re not finished yet. Now we need to discover those Windows Computer instances. So we create our discovery.
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.
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.
Next, click on the Configuration tab and click Browse for type link. Find the Group Populator module, and name your new module Id.
Without fail, you will see this error. Click close.
What’s this? That’s kind of scary. Click Edit.
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!
You’ll see this bit of XML. Highlight all except the top line, as I did here.
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.
Click okay, because you’re done my friend. If you get any errors, start from the top.
1) Not your Friend.
2) You are never done once you start to author.
3) Good article, and don't mind my sarcasm. ;-)
It's kinda hard to understand but it's all worth it. Nice post.
Good walkthrough for this action. I am slowly getting up to speed with SCOM 2007 after much trial and tribulation. This forum is great to exchange info with others in the same boat and others who are riding the luxury liner (smile).
I have written many individual blog posts on creating and using groups. I wanted to take this post
can u explain what to use for the seed discovery class? i'm not sure what you are referring to here, i am just using the windows server class. what i want to do is create a group of windows computers that are sql servers.
i also don't understand the syntax required for the group instance id section of the xml - assuming the latter part is the group name, what would be the 1st part of the "name" - again you have your_application but again i don't understand what this is referring to?
sorry for all the q's - just a bit confusing for me - thx!
This particular post was targeted to those authoring a custom management pack and need to create a group of all Windows Computer objects that have any component of the application they will be monitoring installed. It's not really meant for general purpose group creation, but the same method can be used for creating any group of Windows Computers. I think I saw your post in the forums, too, and my question would first be why do you want to create a group of Windows Computer objects that have SQL installed? This group already exists in the SQL MP (it's the 'SQL Computers' group).
Anyway...to answer your basic question, the 'seed class' reference above is the FIRST class you discover in a management pack. Again, it would be any Windows Computer that has any component of the application you are interested in monitoring with your new management pack installed on it.
For instance, a common one is the Active Directory MP, where there is no group containing all Windows Computer objects that are domain controllers (there are only the typed groups, not a 'catch-all' group). In this case, the seed class we would reference to create a group of Windows Computers that have the domain controller role installed, we would reference the Microsoft.Windows.Server.AD.DomainControllerRole class which is in the Active Directory Server Common Library management pack and is the seed class for all domain controllers.
Hope that helps.
I apologize but I'm stuck in the Seed Class issue as well. I understand what is being stated, but using this example, am not able to get it to work at all. I've used a Seed Class that has a reference in my test MP (i.e., "Microsoft.Windows.Server.Computer"), but the Authoring Kit simply does not like it. I apologize and admit I'm a newbie to SCOM Authoriing but there are pieces missing from the example that does not allow one to be created without prior knowledge. Please assist.
Although this guidance can be used to create computer groups that reference other MP's, it is primarily geared towards authoring a custom MP. If you show me your XML, maybe I can provide more information. Otherwise, check out the authoring forums - there are a lot of people there willing to help.
There are a lot of great blogs out there that discuss creating various types of groups ( Kevin Holman
Thanks for the post. Got a quick question, how can I refine the group populator so it will be populated based on the value of class attribute?
As the example you mentioned in this post, if the "MyApplicationComputer" class has an attribute named "Environment", I want the group to be populate with computer which has this attribute set as "Production".
I used the procedure as you mentioned above. I did get the computer group. I created a view for the group and I could see the attribute "Environment" is fetched correctly. But it seems I can't make the group to be populated with "Prodction" server only.
I tried to modify group populator xml to enclude some criteria. But no success. Once I changed it, the group become empty.
Jonathan, i assume all these Authoring console posts will get remixes for how to do perform the same tasks in VSAE?
@John - funny you ask at this moment, because I was just thinking about that today. When I do, I will post to my new blog space @ http://scomskills.com/blog.