產生交易應用程式失敗 APM 事件的警示

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

Knowledge Base article:

摘要

若定義時間內的應用程式失敗事件總數超出監視閾值,執行個體的狀態會變為狀況不良。

原因

發生未處理的上層例外狀況而導致應用程式無法正常完成工作時,系統會產生應用程式例外狀況的警示。 警示詳細資料會顯示例外狀況擲回的類型及產生的呼叫堆疊。 應用程式例外狀況可能是由於應用程式程式碼中的錯誤所造成,需要分析函式中使用的堆疊追蹤和資料值。

解決方式

應用程式失敗警示是從應用程式中未處理的例外狀況中發出。 若要解決這些例外狀況,請檢查例外狀況的類型與該例外狀況的來源函式。 解決這些問題通常需要存取應用程式原始碼。

您可以使用 [警示內容] 索引標籤上 [警示描述] 中事件詳細資料中提供的連結來存取與此警示相關的其他詳細資訊。 該連結會在 [Application Diagnostics] 主控台中開啟事件。 [Application Diagnostics] 主控台內含與此事件相關的資訊,以及偵測到的相關及類似事件。

Element properties:

TargetMicrosoft.SystemCenter.Apm.WebPageTransaction
CategoryAlert
EnabledFalse
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableFalse
Alert Message
交易應用程式例外狀況
應用程式 {0} (在 {1} 上) 的交易 {5} 發生應用程式錯誤。 '{4}' 已擲回類型 '{2}' 的例外狀況 (含有 '{3}' 訊息)。 如需詳細資訊,請使用下列連結: $Url[Query='{6}']/APMEvent$

Member Modules:

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

Source Code:

<Rule ID="Microsoft.SystemCenter.Apm.WebPageTransaction.AlertAppFailureAspectRule" Enabled="false" ConfirmDelivery="false" Target="Microsoft.SystemCenter.Apm.WebPageTransaction" Remotable="false">
<Category>Alert</Category>
<DataSources>
<DataSource ID="LOBProvider" TypeID="Microsoft.SystemCenter.Apm.WebPageTransaction.LobDataProvider">
<Name>$Target/Host/Property[Type="AL!Microsoft.SystemCenter.Apm.ApplicationInstanceBase"]/ApplicationName$</Name>
<AspectType>applicationfailure</AspectType>
<RootName>$Target/Property[Type="Microsoft.SystemCenter.Apm.WebPageTransaction"]/PageName$</RootName>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="AlertWriteAction" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name='Microsoft.SystemCenter.Apm.WebPageTransaction.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>