SCOM 2012 – Reporting Off Operations Console Authored Groups

I was in a situation where I needed to create an availability report based on just a few of my SQL instances.  I quick created a group named “Test SQL Group” and then added a few DB engines into the group specifically:

image

Next, going over to the Availability report in the Generic Report Library, I selected my time frame for the past 24 hours, chose “Add Group”, and selected my group:

image

Fairly straightforward, however, the report comes back blank.  Swapping the group out for a group that already exists inside of SCOM, I run the report for “SQL Instances”.  This brings back availability data for every SQL instance in my lab including the two for which I was looking:

image

This doesn’t make much sense to me so I crack open the MP code and compare the “SQL Instance” group to my “Test SQL Group” I authored through the console:

Test SQL Group

image

SQL Instances

image

Right away, I notice the base class for the group.  In order to get this working quickly, I swap the base type for my custom group out to System.Group and add the reference to my MP.

<Reference Alias=”System”>
<ID>System.Library</ID>
<Version>6.1.7221.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference
>

And

<ClassType ID=”UINameSpace449ec2ec39cb4abdbf5baeec4f518ef1.Group” Accessibility=”Public”
Abstract=”false”
Base=”System!System.Group
Hosted=”false” Singleton=”true” Extension=”false” />

Unfortunately, System.Group is missing a containment relationship that is required in order to make the group function correctly inside of the SCOM console.  That relationship is also the relationship that needs to be used inside of the discovery.

<RelationshipTypes>
<RelationshipType ID=”UINameSpace449ec2ec39cb4abdbf5baeec4f518ef1ContainsDBEngine
Accessibility=”Public” Abstract=”false” Base=”System!System.Containment”>
<Source ID=”Source” MinCardinality=”0″ MaxCardinality=”2147483647″
Type=”UINameSpace449ec2ec39cb4abdbf5baeec4f518ef1.Group” />
<Target ID=”Target” MinCardinality=”0″ MaxCardinality=”2147483647″
Type=”MicrosoftSQLServerLibrary6510!Microsoft.SQLServer.DBEngine” />
</RelationshipType>
</RelationshipTypes>

I have to give the Relationship Type a unique ID and then specify my group (the actual name) for the type.  Once I have this, the discovery needs to be tweaked in order to use the new relationship:

<RelationshipClass>$MPElement[Name=”UINameSpace449ec2ec39cb4abdbf5baeec4f518ef1ContainsDBEngine“]$</RelationshipClass>

I saved, reimported the MP and then tried the report again.  This time, the report works just fine:

image

At this point, I test to make sure this issue isn’t occurring due to the fact that I explicitly added members to a custom group.  Instead, I add the members a new group named “Test SQL Group 2” but this time I use dynamic criteria.  The group has a base class of Microsoft.SystemCenter.InstanceGroup again.  When using this group to run the report, the report comes back blank in this situation as well.

A quick solution to get the Availability report to run based on a custom group is to convert that group to a System.Group rather than leaving it as an instance of Microsoft.SystemCenter.InstanceGroup.

Management Packs, Reporting, SC Operations Manager

Leave a Reply