Generate Alert for Transaction Performance APM Event

Microsoft.SystemCenter.Apm.FunctionTransaction.AlertPerformanceAspectRule (Rule)

Knowledge Base article:

Summary

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

Causes

Application performance alerts are generated when the execution time exceeds the configured alerting threshold. The alert details break down the execution time by percentage spent in various types of function calls. Excessively long database calls might be due to either a problem with the server or with the structure and complexity of the query. Long file I/O times might be due to problems with the file server. Web Services performance issues might occur because the Web Service or the server it resides on is down or there is a problem in the Web Service code. Long internal execution times for applications might result from complex or inefficient code.

Resolutions

Application performance alerts are generated when the execution time exceeds the configured threshold. Typical application performance degradation causes could be due to a long database call, long web service call, slow .NET Remote call or COM+ call, or inefficient application 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.FunctionTransaction
CategoryAlert
EnabledFalse
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableTrue
Alert Message
Transaction Performance Exception
Transaction {3} for application {1} on {2} has exceeded the configured threshold {0} ms. For additional details please use the following link: $Url[Query='{4}']/APMEvent$

Member Modules:

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

Source Code:

<Rule ID="Microsoft.SystemCenter.Apm.FunctionTransaction.AlertPerformanceAspectRule" Enabled="false" ConfirmDelivery="true" Target="Microsoft.SystemCenter.Apm.FunctionTransaction">
<Category>Alert</Category>
<DataSources>
<DataSource ID="LOBProvider" TypeID="Microsoft.SystemCenter.Apm.FunctionTransaction.LobDataProvider">
<Name>$Target/Host/Property[Type="Microsoft.SystemCenter.Apm.ApplicationInstanceBase"]/ApplicationName$</Name>
<AspectType>performance</AspectType>
<RootName>$Target/Property[Type="Microsoft.SystemCenter.Apm.FunctionTransaction"]/FunctionName$</RootName>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="AlertWriteAction" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertName/>
<AlertDescription/>
<AlertMessageId>$MPElement[Name='Microsoft.SystemCenter.Apm.FunctionTransaction.AlertPerformanceAspectRule.AlertMessage']$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="Microsoft.SystemCenter.Apm.Transaction"]/PerformanceThreshold$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="Microsoft.SystemCenter.Apm.ApplicationInstanceBase"]/ApplicationName$</AlertParameter2>
<AlertParameter3>$Target/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter3>
<AlertParameter4>$Target/Property[Type="Microsoft.SystemCenter.Apm.TransactionBase"]/TransactionName$</AlertParameter4>
<AlertParameter5>$Data/EventData/ViewDetail$</AlertParameter5>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/EventData/eventConsolidationHash$</SuppressionValue>
</Suppression>
<Custom1>Performance</Custom1>
</WriteAction>
</WriteActions>
</Rule>