MailIn Generic Alert Rule

SCOM.Addons.MailIn.Generic.Alert.Rule (Rule)

Creates generic alerts for E-Mails that are sent to SCOM.

Element properties:

TargetSCOM.Addons.MailIn.MonitoringServer
CategoryAlert
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableTrue
Alert Message
MailIn Generic Alert ( {1} )

From:
{1}

Subject:
{0}

Body:
{2}

MetaInfo:
{3}

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource SCOM.Addons.MailIn.Alert.Rule.Datasource Default
CD ConditionDetection System.ExpressionFilter Default
WA WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="SCOM.Addons.MailIn.Generic.Alert.Rule" Enabled="true" Target="SCOM.Addons.MailIn.MonitoringServer" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="SCOM.Addons.MailIn.Alert.Rule.Datasource">
<IntervalSeconds>600</IntervalSeconds>
<SyncTime/>
<TimeoutSeconds>120</TimeoutSeconds>
<EmlDirectory>C:\inetpub\mailroot\drop</EmlDirectory>
<EmlArchive>C:\Temp\MailArchive</EmlArchive>
<NoOfLinesFromTop>100</NoOfLinesFromTop>
<XMLConfigFilePath>C:\Temp\SCOM.Addons.MailIn.MonitorItemList.xml</XMLConfigFilePath>
</DataSource>
</DataSources>
<ConditionDetection ID="CD" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='Result']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">BAD</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
<WriteActions>
<WriteAction ID="WA" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="SCOM.Addons.MailIn.Generic.Alert.Rule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/Property[@Name='mSubject']$</AlertParameter1>
<AlertParameter2>$Data/Property[@Name='mFrom']$</AlertParameter2>
<AlertParameter3>$Data/Property[@Name='mBody']$</AlertParameter3>
<AlertParameter4>$Data/Property[@Name='mMetaInfo']$</AlertParameter4>
</AlertParameters>
<Suppression/>
</WriteAction>
</WriteActions>
</Rule>