Storing views in a sealed MP for web monitors

If you use the built-in web availability monitors, you can store views for them in a sealed mp. You just need to add the right class to a group and off you go.

Generally, the group will live in a monitoring mp that already exists. In this example I'll use my VMware.WorkspaceOne.Monitoring mp.

Now we need to find this class we need.

Run this to see the current web availability monitors. Note this matches Authoring > Management Pack Templates > Web Application Availability Monitoring.

get-scomclass -name Microsoft.SystemCenter.WebApplicationSolutions.SingleUrlTest | Get-SCOMClassInstance | sort displayname

That's great but we need to see the Name/URL pair listed in each one so we can add them to a group. To see that run this:

get-scomclass -name Microsoft.SystemCenter.WebApplicationTest.WebTest | Get-SCOMClassInstance | sort DisplayName

For my purposes this is returned in DisplayName:

AirWatch Web Console [Web Monitoring]

Now just create a group and update the regex string in the expression to add the instance (in red below). Here's the group discovery:

<Discovery ID="VMware.Discovery.CBWebConsole" Enabled="true" Target="VMware.Group.AirWatchWebConsole" ConfirmDelivery="false" Remotable="true" Priority="Normal">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryRelationship TypeID="MSIGL!Microsoft.SystemCenter.InstanceGroupContainsEntities" />
</DiscoveryTypes>
<DataSource ID="GroupPopulationDataSource" TypeID="SystemCenter!Microsoft.SystemCenter.GroupPopulator">
<RuleId>$MPElement$</RuleId>
<GroupInstanceId>$MPElement[Name="VMware.Group.AirWatchWebConsole"]$</GroupInstanceId>
<MembershipRules>
<MembershipRule>
<MonitoringClass>$MPElement[Name="WebApplicationTest!Microsoft.SystemCenter.WebApplicationTest.WebTest"]$</MonitoringClass>
<RelationshipClass>$MPElement[Name="MSIGL!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass>
<Expression>
<RegExExpression>
<ValueExpression>
<Property>$MPElement[Name="System!System.Entity"]/DisplayName$</Property>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>(?i:^AirWatch Web Console)</Pattern>
</RegExExpression>
</Expression>
</MembershipRule>
</MembershipRules>
</DataSource>
</Discovery>

Then create your state view and you're done:








Comments