產生交易連線能力 APM 事件的警示

Microsoft.SystemCenter.Apm.MvcTransaction.AlertConnectivityAspectRule (Rule)

Knowledge Base article:

摘要

若定義時間內的連線事件總數超出監視閾值,執行個體的狀態會變為狀況不良。

原因

應用程式發生連線錯誤而導致應用程式流程無法正常進行時,系統會產生連線警示。警示詳細資料欄位會顯示描述,其中包含失敗函式的名稱與作業內容以供您針對問題進行疑難排解。設定例外狀況通常是由於在解決問題時,未經過存取原始程式碼而直接在環境或設定進行變更所造成的。此類的問題可能與無法存取或不正確的資料庫伺服器、Web 服務、不存在的檔案等有關。

解決方式

存取外部資源時出現問題而造成未處理的例外狀況時,系統會產生連線警示。若要解決這些問題,請檢查下列各項

1) 警示和事件的描述,

2) 作業目標,例如 Microsoft SQL Server,

3) 嘗試執行的方法 (例如連線到伺服器),以及

4) 安全性內容連線與執行身分識別詳細資料。請使用此資訊來確認環境和設定,以確保外部資源的可用性。

Element properties:

TargetMicrosoft.SystemCenter.Apm.MvcTransaction
CategoryAlert
EnabledFalse
Alert GenerateTrue
Alert SeverityError
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.MvcTransaction.LobDataProvider.ExceptionAspect Default
AlertWriteAction WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.SystemCenter.Apm.MvcTransaction.AlertConnectivityAspectRule" Enabled="false" ConfirmDelivery="false" Target="Microsoft.SystemCenter.Apm.MvcTransaction" Remotable="false">
<Category>Alert</Category>
<DataSources>
<DataSource ID="LOBProvider" TypeID="Microsoft.SystemCenter.Apm.MvcTransaction.LobDataProvider.ExceptionAspect">
<Name>$Target/Host/Property[Type="AL!Microsoft.SystemCenter.Apm.ApplicationInstanceBase"]/ApplicationName$</Name>
<AspectType>connectivity</AspectType>
<ControllerName>$Target/Property[Type="Microsoft.SystemCenter.Apm.MvcTransaction"]/ControllerName$</ControllerName>
<ActionName>$Target/Property[Type="Microsoft.SystemCenter.Apm.MvcTransaction"]/ActionName$</ActionName>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="AlertWriteAction" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>2</Severity>
<AlertMessageId>$MPElement[Name='Microsoft.SystemCenter.Apm.MvcTransaction.AlertConnectivityAspectRule.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>Connectivity</Custom1>
</WriteAction>
</WriteActions>
</Rule>