Last week I wrote a post about adding health states of services to state views. The orginal blogpost can be found here. Today I created some improvements to the the orginal MP. The following improvements are made:
- Optimization of naming conventions inside the MP
- Instance Group Type changed from ComputerGroup to InstanceGroup
- New Dependancy rollup monitor added to the Instance Group
Optimization of the naming conventions
In the orginal version of the MP I used SSH_Testpack as a default namespace. I changed this to SSH so that this MP can be used on more than only test environments 😉
Instance Group Type changed
In the orginal version of the MP ComputerGroup was used as a base class instead of InstanceGroup. My purpose with this group was to only show the discovered SSH instances and not the UNIX computer role. In the new version I changed the base class of the instance group to ‘Microsoft.SystemCenter.InstanceGroup’. Because of this change a new reference management pack was needed. The ‘Microsoft.SystemCenter.InstanceGroup.Library’ needs to be added to the references. The following part of the XML code is changed:
Classtypes:
EntityTypes> <ClassTypes> <ClassType ID="SSH.Class" Base="Unix!Microsoft.Unix.ComputerRole" Accessibility="Public" Abstract="false" Hosted="true" Singleton="false"> <Property ID="RoleName" Type="string" Key="true" /> </ClassType> <ClassType ID="SSH.Instance.Group" Accessibility="Public" Abstract="false" Base="SCIG!Microsoft.SystemCenter.InstanceGroup" Hosted="false" Singleton="true" Extension="false" /> </ClassTypes> </EntityTypes> </TypeDefinitions>
Group Discoveries
<Discovery ID="SSH.SSH.Group.Instance.Discovery" Target="SSH.Instance.Group" Enabled="true" ConfirmDelivery="false" Remotable="true" Priority="Normal"> <Category>Discovery</Category> <DiscoveryTypes> <DiscoveryClass TypeID="SSH.Class" /> </DiscoveryTypes> <DataSource ID="DS" TypeID="SC!Microsoft.SystemCenter.GroupPopulator"> <RuleId>$MPElement$</RuleId> <GroupInstanceId>$MPElement[Name="SSH.Instance.Group"]$</GroupInstanceId> <MembershipRules> <MembershipRule> <MonitoringClass>$MPElement[Name="SSH.Class"]$</MonitoringClass> <RelationshipClass>$MPElement[Name="SCIG!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass> </MembershipRule> </MembershipRules> </DataSource> </Discovery>
Dependency rollup monitor added to the Instance Group
One of my targets was to use this instance group inside Distributed Applications. Using dynamic groups inside your Distributed Applications can make your Distributed Applications dynamic (Credits to Tom Klaver for the idea). The health state of the group members are not rolled up to the group health state. So to get this working we need to add a dependency rollup monitor to the instance group. The following XML code will create the needed dependency monitor:
<DependencyMonitor ID="SSH.SSH.Instance.Group.Dependency.Monitor" Accessibility="Internal" Enabled="true" Target="SSH.Instance.Group" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" RelationshipType="SCIG!Microsoft.SystemCenter.InstanceGroupContainsEntities" MemberMonitor="Health!System.Health.AvailabilityState"> <Category>AvailabilityHealth</Category> <Algorithm>WorstOf</Algorithm> <MemberUnAvailable>Error</MemberUnAvailable> </DependencyMonitor>
With the above changes this MP is more useful inside your SCOM environments. You can download the unsealed version here. Please note the disclaimer of my site before you import the MP!