Generate Alert for Application Failure CSM Event

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

Knowledge Base article:

Summary

The object state is changed to unhealthy when the total number of client-side exception events in the specified interval exceeds the monitor threshold.

Causes

Alerts from client-side application failures result from unhandled JavaScript exceptions that occur in the Internet browser. The alert details display information about the exception, along with its stack trace and additional browser state data captured at the time of the exception. Client-side exceptions are caused by errors in the application code, and understanding their causes requires analysis of the exception stack trace and data supplied with the alert details.

Resolutions

To resolve unhandled JavaScript exceptions in a client-side application, review the exception data details supplied with the alert. Typically, resolving application exceptions 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 will open 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.CsmApplicationInstance
CategoryAlert
EnabledFalse
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableFalse
Alert Message
Client Application Exception
{0} has been detected in application {1} on {2}. For additional details please use the following link: $Url[Query='{3}']/APMEvent$

Member Modules:

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

Source Code:

<Rule ID="Microsoft.SystemCenter.Apm.CsmApplicationInstance.AlertAppFailureAspectRule" Enabled="false" ConfirmDelivery="false" Target="Microsoft.SystemCenter.Apm.CsmApplicationInstance" Remotable="false">
<Category>Alert</Category>
<DataSources>
<DataSource ID="LOBProvider" TypeID="Microsoft.SystemCenter.Apm.Csm.LobDataProvider">
<Name>$Target/Property[Type="AL!Microsoft.SystemCenter.Apm.ApplicationInstanceBase"]/ApplicationName$ (Client)</Name>
<AspectType>applicationfailure</AspectType>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="AlertWriteAction" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name='Microsoft.SystemCenter.Apm.CsmApplicationInstance.AlertAppFailureAspectRule.AlertMessage']$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventData/problemDescription$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="AL!Microsoft.SystemCenter.Apm.ApplicationInstanceBase"]/ApplicationName$</AlertParameter2>
<AlertParameter3>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter3>
<AlertParameter4>$Data/EventData/ViewDetail$</AlertParameter4>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/EventData/eventConsolidationHash$</SuppressionValue>
</Suppression>
<Custom1>ApplicationFailure</Custom1>
</WriteAction>
</WriteActions>
</Rule>