.NET Statistic/Avg execution time (ms) 수집

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

.NET Statistic/Avg execution time 성능 카운터(ms)를 수집합니다.

Knowledge Base article:

요약

정의된 기간당 평균 요청 시간이 모니터 임계값을 초과할 경우 인스턴스 상태가 비정상이 됩니다.

원인

성능 이벤트 수가 구성된 모니터 임계값을 초과하는 경우 트랜잭션 성능 경고가 생성됩니다.

서버 문제 또는 쿼리의 구조 및 복잡도 문제로 인해 과도하게 긴 데이터베이스 호출이 발생할 수 있습니다. 긴 파일 I/O 시간은 파일 서버의 문제 때문일 수 있습니다. 웹 서비스 또는 해당 웹 서비스가 상주하는 서버가 작동 중지되거나 웹 서비스 코드에 문제가 있어서 웹 서비스 성능 문제가 발생할 수 있습니다. 응용 프로그램의 긴 내부 실행 시간은 복잡하거나 비효율적인 코드 때문일 수 있습니다.

해결 방법

일반적인 응용 프로그램 성능 저하의 원인은 긴 데이터베이스 호출, 긴 웹 서비스 호출, 느린 .NET 원격 호출, 느린 COM+ 호출 또는 비효율적인 응용 프로그램 코드 때문일 수 있습니다.

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이 임계값 초과
.NET Statistic/Avg execution time 성능 카운터가 {0}밀리초의 구성된 임계값을 초과했습니다. 성능 카운터 값이 {1}밀리초였습니다.
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>