Generate Alert for Transaction Connectivity APM Event

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

Knowledge Base article:

Summary

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

Causes

Connectivity alerts are generated as a result of connectivity errors from the application that prevent normal application flow. The alert details field displays a description that contains the name of the failed function and operations context for troubleshooting the issue. Configuration exceptions are due to problems that are typically solved by environment or configuration changes without accessing the source code. This kind of problem could be related to an inaccessible or incorrect database server, web service, or non-existed file.

Resolutions

Connectivity alerts come from unhandled exceptions due to problems accessing external resources. To resolve these problems, check

1) the description of the alert and events,

2) operation targets, for example Microsoft SQL server,

3) method that tried to execute, for example connect to a server and

4) security context connection and execution identity details. Using this information, verify the environment and configuration to ensure the external resource availability.

Element properties:

TargetMicrosoft.SystemCenter.Apm.FunctionTransaction
CategoryAlert
EnabledFalse
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
Transaction Connectivity Exception
Transaction {5} for application {0} on {1} has had a connectivity failure occur. An exception of type '{2}' with a message of '{3}' was thrown in '{4}'. For additional details please use the following link: $Url[Query='{6}']/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.AlertConnectivityAspectRule" 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>connectivity</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>2</Severity>
<AlertName/>
<AlertDescription/>
<AlertMessageId>$MPElement[Name='Microsoft.SystemCenter.Apm.FunctionTransaction.AlertConnectivityAspectRule.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>Connectivity</Custom1>
</WriteAction>
</WriteActions>
</Rule>