Generate Alert for Transaction Application Failure APM Event

Microsoft.SystemCenter.Apm.WebServiceTransaction.AlertAppFailureAspectRule (Rule)

Knowledge Base article:

Summary

The instance state becomes unhealthy if the total number of application failure events per defined time period exceeds the monitor threshold.

Causes

Application exception alerts result from unhandled and top-level exceptions that prevent the application from completing a task. The alert details display the type of exception thrown and the resulting call stack. Application exceptions are due to errors in the application code and require analysis of the stack trace and data values used in functions.

Resolutions

Application failure alerts arise from unhandled exceptions in the application. To resolve these exceptions, check the exception type and the function that the exception was thrown from. Resolution of these types of problems typically requires access to application source code.

You can access additional details about this alert by using the link to the event details available in the Alert Description and on the Alert Context tab. The link opens the event in the Application Diagnostics console. The Application Diagnostics console contains information specific to this event as well as to related and similar events that have been detected.

Element properties:

TargetMicrosoft.SystemCenter.Apm.WebServiceTransaction
CategoryAlert
EnabledFalse
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableFalse
Alert Message
Transaction Application Exception
Transaction {5} for application {0} on {1} has had an application failure occur. An exception of type '{2}' with a message of '{3}' was thrown in '{4}'. For additional details please use the following link: $Url[Query='{6}']/APMEvent$

Member Modules:

ID Module Type TypeId RunAs 
LOBProvider DataSource Microsoft.SystemCenter.Apm.WebServiceTransaction.LobDataProvider Default
AlertWriteAction WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.SystemCenter.Apm.WebServiceTransaction.AlertAppFailureAspectRule" Enabled="false" ConfirmDelivery="false" Target="Microsoft.SystemCenter.Apm.WebServiceTransaction" Remotable="false">
<Category>Alert</Category>
<DataSources>
<DataSource ID="LOBProvider" TypeID="Microsoft.SystemCenter.Apm.WebServiceTransaction.LobDataProvider">
<Name>$Target/Host/Property[Type="AL!Microsoft.SystemCenter.Apm.ApplicationInstanceBase"]/ApplicationName$</Name>
<AspectType>applicationfailure</AspectType>
<RootName>$Target/Property[Type="Microsoft.SystemCenter.Apm.WebServiceTransaction"]/WebServiceName$/$Target/Property[Type="Microsoft.SystemCenter.Apm.WebServiceTransaction"]/WebServiceMethod$</RootName>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="AlertWriteAction" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name='Microsoft.SystemCenter.Apm.WebServiceTransaction.AlertAppFailureAspectRule.AlertMessage']$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="AL!Microsoft.SystemCenter.Apm.ApplicationInstanceBase"]/ApplicationName$</AlertParameter1>
<AlertParameter2>$Target/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter2>
<AlertParameter3>$Data/EventData/exceptionclass$</AlertParameter3>
<AlertParameter4>$Data/EventData/message$</AlertParameter4>
<AlertParameter5>$Data/EventData/name$</AlertParameter5>
<AlertParameter6>$Target/Property[Type="AL!Microsoft.SystemCenter.Apm.TransactionBase"]/TransactionName$</AlertParameter6>
<AlertParameter7>$Data/EventData/ViewDetail$</AlertParameter7>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/EventData/eventConsolidationHash$</SuppressionValue>
</Suppression>
<Custom1>ApplicationFailure</Custom1>
</WriteAction>
</WriteActions>
</Rule>