產生交易安全性 APM 事件的警示

Microsoft.SystemCenter.Apm.WcfTransaction.AlertSecurityAspectRule (Rule)

Knowledge Base article:

摘要

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

原因

應用程式試圖存取外部資源而發生授權、驗證或權限問題時,系統會產生安全性警示。警示詳細資料欄位會顯示描述,其中包含所存取資源的失敗函式名稱與作業內容,供您針對問題進行疑難排解。安全性例外狀況通常是由於在解決問題時,未經過存取原始程式碼而直接在環境或設定進行變更所造成的。此類的問題可能是由於存取資料庫伺服器、Web 服務、IO 資源或 Active Directory 時的驗證、授權或權限問題所造成。

解決方式

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

1) 警示和事件的描述;

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

3) 動作 - 用來在資源上執行的方法,例如連線到伺服器;

4) 安全性內容 - 連線、使用者和識別詳細資料。檢閱這些項目後,請更新應用程式設定或伺服器/網域端的帳戶、密碼或權限。

Element properties:

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

Member Modules:

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

Source Code:

<Rule ID="Microsoft.SystemCenter.Apm.WcfTransaction.AlertSecurityAspectRule" Enabled="false" ConfirmDelivery="true" Target="Microsoft.SystemCenter.Apm.WcfTransaction">
<Category>Alert</Category>
<DataSources>
<DataSource ID="LOBProvider" TypeID="Microsoft.SystemCenter.Apm.WcfTransaction.LobDataProvider">
<Name>$Target/Host/Property[Type="Microsoft.SystemCenter.Apm.ApplicationInstanceBase"]/ApplicationName$</Name>
<AspectType>security</AspectType>
<RootName>$Target/Property[Type="Microsoft.SystemCenter.Apm.WcfTransaction"]/ClassName$/$Target/Property[Type="Microsoft.SystemCenter.Apm.WcfTransaction"]/MethodName$</RootName>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="AlertWriteAction" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>2</Severity>
<AlertName/>
<AlertDescription/>
<AlertMessageId>$MPElement[Name='Microsoft.SystemCenter.Apm.WcfTransaction.AlertSecurityAspectRule.AlertMessage']$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="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="Microsoft.SystemCenter.Apm.TransactionBase"]/TransactionName$</AlertParameter6>
<AlertParameter7>$Data/EventData/ViewDetail$</AlertParameter7>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/EventData/eventConsolidationHash$</SuppressionValue>
</Suppression>
<Custom1>Security</Custom1>
</WriteAction>
</WriteActions>
</Rule>