Often times, monitors raise alerts when the monitor goes into an unhealthy state. When such alerts are defined inside the management pack XML, these alerts must be able to access data inside the monitor in order to be functional. As a best practice, when an alert makes references to the monitor data, is should use the construction “$Data/Context/< Xpath>” instead of $Data/< Xpath>.
If the incorrect construct is used, the alert will not be able to access the necessary data from the monitor. As a result, the alert will not be raised.
Using the Authoring Console:
1. The Authoring Console will automatically create XPathreferences that use the correct constructs.
2.
Using XML:
<
WriteActions
>
<
WriteAction
ID
=
"
WriteToDB"
TypeID
="
SC!Microsoft.SystemCenter.CollectEvent"
/>
<
WriteAction
ID
=
"
WriteToCertSvcEvents"
TypeID
="
Microsoft.Windows.CertificateServices.CARole.CertSvcEvents.Publisher"
/>
<
WriteAction
ID
=
"
Alert"
TypeID
="
Health!System.Health.GenerateAlert"
>
<
Priority
>
2
</
Priority
>
<
Severity
>
2
</
Severity
>
<
AlertMessageId
>
$MPElement[Name="AlertMessageID4f12f8d124ed4ece99544c9a9730fa37"]$
</
AlertMessageId
>
<
AlertParameters
>
<
AlertParameter1
>
$Data/Context/EventDescription$
</
AlertParameter1
>
</
AlertParameters
>
</ WriteActions >