Comparing Product Connector Subscriptions to Email Notification Subscriptions


 

Many years ago – SCOM was updated to have better granular control over Notification Subscriptions in the UI.  We saw many improvements using controls based on group, class, specific rule or monitor, along with other criteria:

image

 

However – the Product Connector subscription wizard was never updated.  Sad smile

 

image

 

This is unfortunate, because both product connectors and email notification subscriptions are actually identical behind the scenes.  The UI is just a wrapper to create XML.  The modules behind the scenes are the same:    Microsoft.SystemCenter.SubscribedAlertProvider

 

You are not limited by the UI’s limitations, however.  While more time consuming – you can use the same criteria and expressions in product connectors, as you would in an email notification.  One of the simplest “tricks” to making this easy, is to create a disabled notification subscription that mirrors each product connector subscription you want – then export the Microsoft.SystemCenter.Notifications.Internal MP (Notifications Internal Library), and copy the expressions over to your product connector subscriptions.  Then simply increment your notifications internal library MP version, and reimport.  (Always save a backup first!)

 

Here are some common examples:

 

Class (raised by ANY instance of a given class):

<Types> <TypeId>7d5bddb4-c5c3-ee48-c42a-4c8d047825d0</TypeId> </Types>

Group (raised by any instance contained by the group):

<Groups> <GroupId>457c209e-d14b-0721-be20-c3bf55447dab</GroupId> </Groups>

Specific instance of a class (raised by a single specific instance of a specific class):

<Criteria> <Expression> <SimpleExpression xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ValueExpression> <Property>BaseManagedEntityId</Property> </ValueExpression> <Operator>Equal</Operator> <ValueExpression> <Value>20a8fddb-88f6-1329-4771-0c4f73279542</Value> </ValueExpression> </SimpleExpression> </Expression> </Criteria>

Monitor and Rule (note the OR):

<Criteria> <Expression> <Or xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Expression> <SimpleExpression> <ValueExpression> <Property>ProblemId</Property> </ValueExpression> <Operator>Equal</Operator> <ValueExpression> <Value>b59f78ce-c42a-8995-f099-e705dbb34fd4</Value> </ValueExpression> </SimpleExpression> </Expression> <Expression> <SimpleExpression> <ValueExpression> <Property>RuleId</Property> </ValueExpression> <Operator>Equal</Operator> <ValueExpression> <Value>8060f053-dc84-330d-c7d0-3c659f9b7ca7</Value> </ValueExpression> </SimpleExpression> </Expression> </Or> </Expression> </Criteria>

Specific rule, and only a specific instance of a class (note the AND)

<Criteria> <Expression> <And xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Expression> <SimpleExpression> <ValueExpression> <Property>RuleId</Property> </ValueExpression> <Operator>Equal</Operator> <ValueExpression> <Value>8060f053-dc84-330d-c7d0-3c659f9b7ca7</Value> </ValueExpression> </SimpleExpression> </Expression> <Expression> <SimpleExpression> <ValueExpression> <Property>BaseManagedEntityId</Property> </ValueExpression> <Operator>Equal</Operator> <ValueExpression> <Value>20a8fddb-88f6-1329-4771-0c4f73279542</Value> </ValueExpression> </SimpleExpression> </Expression> </And> </Expression> </Criteria>

All the other typical criteria stuff:

<Criteria> <Expression> <And xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Expression> <SimpleExpression> <ValueExpression> <Property>Severity</Property> </ValueExpression> <Operator>Equal</Operator> <ValueExpression> <Value>2</Value> </ValueExpression> </SimpleExpression> </Expression> <Expression> <SimpleExpression> <ValueExpression> <Property>Priority</Property> </ValueExpression> <Operator>Equal</Operator> <ValueExpression> <Value>2</Value> </ValueExpression> </SimpleExpression> </Expression> <Expression> <SimpleExpression> <ValueExpression> <Property>ResolutionState</Property> </ValueExpression> <Operator>Equal</Operator> <ValueExpression> <Value>249</Value> </ValueExpression> </SimpleExpression> </Expression> <Expression> <SimpleExpression> <ValueExpression> <Property>AlertName</Property> </ValueExpression> <Operator>Like</Operator> <ValueExpression> <Value>%foo%alertname%</Value> </ValueExpression> </SimpleExpression> </Expression> <Expression> <SimpleExpression> <ValueExpression> <Property>AlertDescription</Property> </ValueExpression> <Operator>Like</Operator> <ValueExpression> <Value>%foo%description%</Value> </ValueExpression> </SimpleExpression> </Expression> <Expression> <SimpleExpression> <ValueExpression> <Property>CustomField1</Property> </ValueExpression> <Operator>Like</Operator> <ValueExpression> <Value>%footextincustomfield%</Value> </ValueExpression> </SimpleExpression> </Expression> </And> </Expression> </Criteria>

 

Note:  Keep in mind, just like many times when you edit the XML directly in a way not supported by the UI – you can no longer use the UI to edit these subscriptions.  You will see an error if you try to view/edit these using the SCOM console after customizing them.  You can delete them using the UI however.


Comments (0)

Skip to main content