I was developing architecture where I discover couple hosted objects on agents which are contained in one System.Group. This group is a singleton and I used Microsoft.SystemCenter.GroupPopulator as a Data Source for discovery populating group with hosted objects.
<ClassTypes>
<ClassType ID="SingletonGroup" Base="System!System.Group"
Accessibility="Public" Abstract="false"
Hosted="false" Singleton="true">
</ClassType>
...
<Discovery ID="SingletonGroupDiscovery" Enabled="true"
Target="SingletonGroup"
ConfirmDelivery="true" Remotable="true" Priority="Normal">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="SingletonGroup" />
</DiscoveryTypes>
<DataSource ID="DiscoveryDataSource"
TypeID="SC!Microsoft.SystemCenter.GroupPopulator">
<RuleId>$MPElement$</RuleId>
<GroupInstanceId>$Target/Id$</GroupInstanceId>
<MembershipRules>
<MembershipRule>
<MonitoringClass>$MPElement[Name="HostedObject1"]$</MonitoringClass>
<RelationshipClass>$MPElement[Name="Relationship.SingletonGroupContainsHostedObject1"]$</RelationshipClass>
</MembershipRule>
<MembershipRule>
<MonitoringClass>$MPElement[Name="HostedObject2"]$</MonitoringClass>
<RelationshipClass>$MPElement[Name="Relationship.SingletonGroupContainsHostedObject2"]$</RelationshipClass>
</MembershipRule>
</MembershipRules>
</DataSource>
</Discovery>
There was an option to create specific class instead of inheriting from System.Group, but then it would be necessary to implement discovery which creates relationships between group and hosted object, so I've picked a way with basic System.Group to keep things simple.
Implementation was easy and fast, then a quick verification that all objects and relations are being created, and done!
The next day tester informed me that he can't get health roll up from hosted objects to the group. That was confusing cause I didn't expect any troubles with that part - I had all necessary Dependency Monitors implemented.
So I had to ask myself a question: is it possible to roll up health from objects created and hosted by agent to a group which is auto-populated singleton.
Today I can answer this question positively. I've spend some time verifying this in dev environment. Health DOES ROLL UP.
But what was the problem in Test environment? Why health wasn't rolled up in a reasonable time?
That is a complicate problem, dear diary. I will answer these questions in a different post.
Right now I can say that it was not a problem of Management Pack code.
<ClassTypes>
<ClassType ID="SingletonGroup" Base="System!System.Group"
Accessibility="Public" Abstract="false"
Hosted="false" Singleton="true">
</ClassType>
...
<Discovery ID="SingletonGroupDiscovery" Enabled="true"
Target="SingletonGroup"
ConfirmDelivery="true" Remotable="true" Priority="Normal">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="SingletonGroup" />
</DiscoveryTypes>
<DataSource ID="DiscoveryDataSource"
TypeID="SC!Microsoft.SystemCenter.GroupPopulator">
<RuleId>$MPElement$</RuleId>
<GroupInstanceId>$Target/Id$</GroupInstanceId>
<MembershipRules>
<MembershipRule>
<MonitoringClass>$MPElement[Name="HostedObject1"]$</MonitoringClass>
<RelationshipClass>$MPElement[Name="Relationship.SingletonGroupContainsHostedObject1"]$</RelationshipClass>
</MembershipRule>
<MembershipRule>
<MonitoringClass>$MPElement[Name="HostedObject2"]$</MonitoringClass>
<RelationshipClass>$MPElement[Name="Relationship.SingletonGroupContainsHostedObject2"]$</RelationshipClass>
</MembershipRule>
</MembershipRules>
</DataSource>
</Discovery>
There was an option to create specific class instead of inheriting from System.Group, but then it would be necessary to implement discovery which creates relationships between group and hosted object, so I've picked a way with basic System.Group to keep things simple.
Implementation was easy and fast, then a quick verification that all objects and relations are being created, and done!
The next day tester informed me that he can't get health roll up from hosted objects to the group. That was confusing cause I didn't expect any troubles with that part - I had all necessary Dependency Monitors implemented.
So I had to ask myself a question: is it possible to roll up health from objects created and hosted by agent to a group which is auto-populated singleton.
Today I can answer this question positively. I've spend some time verifying this in dev environment. Health DOES ROLL UP.
But what was the problem in Test environment? Why health wasn't rolled up in a reasonable time?
That is a complicate problem, dear diary. I will answer these questions in a different post.
Right now I can say that it was not a problem of Management Pack code.
No comments:
Post a Comment