New KB: Configuring Operations Manager 2007 R2 Product Connector Subscription Advanced Criteria

hotfix Just an FYI on a new KB we published today.  This will eventually show up here but I thought I'd post a heads up since it may take another day or two before the link is live.  As with all Knowledge Base articles we publish, when it does go live you should always refer to the original article to make sure you have the latest version.

=====

Summary

System Center Operations Manager 2007 R2 introduced a new feature to allow more granular criteria to be specified for Notification Subscriptions. This functionality was not incorporated into the Product Connector Subscription UI although it is possible to overcome this by modifying the Notification Internal Library management pack XML itself.

More Information

Even though the Product Connector subscription UI does not expose the granular criteria selection, it is the same module processing the subscriptions for Notifications and for Product Connectors. Configuring this can be done by exporting the Notifications Internal Library management pack and modifying the XML directly.

Below is an example on how to accomplish this. Our specific goal will be to trigger a subscription based on an alert that was generated by a specific monitor, but any criteria can be utilized. The monitor that will be used in this case will be the “Health Service Heartbeat Failure” monitor.

1) First start by creating a new Notification Subscription, make note of the Subscription Name as it will be used later. At the criteria selection, select “created by specific rules or monitors” and choose the “Health Service Heartbeat Failure” monitor. Ensure the subscription is created as disabled (uncheck Enabled at the Summary).

2) Next create a Product Connector Subscription, again make note of the Subscription Name. The defaults can be used for the criteria in this subscription as it will be overwritten it in the XML.

3) Locate the Notification Internal Library MP and export it.

4) Open the exported XML, and search for the Notification Subscription Name that was created in Step 1. For example:

<DisplayString ElementID="Subscriptiona6daa4cb_ea23_4aaf_bb85_5e6c0e6a1737">
<Name>Heartbeat Monitor Notification</Name>
</DisplayString>

5) Note the ElementID, and search for it from the beginning of the file to find the rule definition that contains the criteria:

<Rule ID="Subscriptiona6daa4cb_ea23_4aaf_bb85_5e6c0e6a1737" Enabled="false" …

6) A few lines below should be the <criteria> start tag, copy everything until the end:

</criteria> tag.
<Criteria>
<Expression>
<SimpleExpression xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema">
<ValueExpression>
<Property>ProblemId</Property>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>b59f78ce-c42a-8995-f099-e705dbb34fd4</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Criteria>

7) Search for the Product Connector Subscription name created in Step 2:

<DisplayString ElementID="ProductConnectorSubscription28b7e39e_1572_42ac_aeec_f1397ce408e0">
<Name>Heartbeat Monitor Subscription</Name>
<Description />
</DisplayString>

8) Note the ElementID, and search for it from the beginning of the file to find the rule definition that the criteria will be pasted into.

9) A few lines below should the <criteria> start tag, replace everything up to the </criteria> end tag with the lines copied in Step 6. The completed rule definition for the Product Connector should look similar to the following:

<Rule ID="ProductConnectorSubscription28b7e39e_1572_42ac_aeec_f1397ce408e0" Enabled="true" Target="SystemCenter!Microsoft.SystemCenter.RootManagementServer" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>ConnectorFramework</Category>
<DataSources>
<DataSource ID="DS" RunAs="SystemCenter!Microsoft.SystemCenter.DatabaseWriteActionAccount" TypeID="SystemCenter!Microsoft.SystemCenter.SubscribedAlertProvider">
<AlertChangedSubscription Property="Any">
<Criteria>
<Expression>
<SimpleExpression xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema">
<ValueExpression>
<Property>ProblemId</Property>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>b59f78ce-c42a-8995-f099-e705dbb34fd4</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Criteria>
<ExpirationStartTime>01/01/0001 00:00:00</ExpirationStartTime>
<PollingIntervalMinutes>1</PollingIntervalMinutes>
<UserSid>S-1-5-21-1230445152-263632811-3800586462-500</UserSid>
<LanguageCode>ENU</LanguageCode>
<ExcludeNonNullConnectorIds>false</ExcludeNonNullConnectorIds>
<RuleId>$MPElement$</RuleId>
<TargetBaseManagedEntityId>$Target/Id$</TargetBaseManagedEntityId>
</AlertChangedSubscription>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WA" TypeID="SystemCenter!Microsoft.SystemCenter.ConnectorFrameworkAlertWriteAction">
<ConnectorId>{aabbccdd-1111-2222-3333-0305e82c3301}</ConnectorId>
</WriteAction>
</WriteActions>
</Rule>

10) Save and close the modified XML, and import it into Operations Manager. If any errors result in attempting to import the MP, be sure to check the XML.

11) Lastly, if no further changes are planned for the Subscription criteria, remove the Notification Subscription created in Step 1.

KNOWN ISSUES

Once the Product Connector Subscription has been modified to include criteria not exposed in the UI, the console can no longer be used view or edit that particular subscription although it can be used to remove that subscription.

J.C. Hornbeck | System Center Knowledge Engineer

clip_image001 clip_image002