Collect .NET Statistic/Avg execution time (ms)

Microsoft.SystemCenter.Apm.Transaction.AvgRequestTimeMonitor (UnitMonitor)

Collect .NET Statistic/Avg execution time performance counter (ms)

Knowledge Base article:

Summary

The instance state becomes unhealthy if the average request time per defined time period exceeds the monitor threshold.

Causes

Transaction performance alerts are generated when the number of performance events exceeds the configured monitor threshold.

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

Typical application performance degradation could be due to a long database call, a long web service call, a slow .NET Remoting call, a slow COM+ call, or inefficient application code.

Element properties:

TargetMicrosoft.SystemCenter.Apm.Transaction
Parent MonitorSystem.Health.PerformanceState
CategoryCustom
EnabledFalse
Instance Name.NET Statistic
Counter NameAvg execution time
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeSystem.Performance.ConsecutiveSamplesThreshold
RemotableFalse
AccessibilityPublic
Alert Message
.NET Statistic/Avg execution time exceeded the threshold
The .NET Statistic/Avg execution time performance counter has exceeded the configured threshold of {0} ms. The performance counter value was {1} ms.
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.Apm.Transaction.AvgRequestTimeMonitor" Accessibility="Public" Enabled="false" Target="Microsoft.SystemCenter.Apm.Transaction" ParentMonitorID="Health!System.Health.PerformanceState" Remotable="false" Priority="Normal" TypeID="Performance!System.Performance.ConsecutiveSamplesThreshold" ConfirmDelivery="false">
<Category>Custom</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.Apm.Transaction.AvgRequestTimeMonitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="Microsoft.SystemCenter.Apm.TransactionBase"]/AvgRequestTimeMonitorThreshold$</AlertParameter1>
<AlertParameter2>$Data/Context/SampleValue$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Success" MonitorTypeStateID="ConditionFalse" HealthState="Success"/>
<OperationalState ID="Warning" MonitorTypeStateID="ConditionTrue" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<CounterName>Avg execution time</CounterName>
<ObjectName>.NET Statistic</ObjectName>
<InstanceName>$Target/Property[Type="Microsoft.SystemCenter.Apm.Transaction"]/CounterInstance$</InstanceName>
<AllInstances>false</AllInstances>
<Frequency>$Target/Property[Type="Microsoft.SystemCenter.Apm.TransactionBase"]/AvgRequestTimeMonitorInterval$</Frequency>
<Threshold>$Target/Property[Type="Microsoft.SystemCenter.Apm.TransactionBase"]/AvgRequestTimeMonitorThreshold$</Threshold>
<Direction>greater</Direction>
<NumSamples>3</NumSamples>
</Configuration>
</UnitMonitor>