.NET Statistic/Avg.Request Time (ms) の収集

Microsoft.SystemCenter.Apm.Transaction.CollectAvgDurationTime (Rule)

.NET Statistic/Avg.Request Time パフォーマンス カウンター (ミリ秒) を収集します。

Knowledge Base article:

概要

このルールは、トランザクションの .NET Statistic Avg execution time パフォーマンス カウンターを収集します。

このカウンターは、トランザクションによる平均要求処理時間 (ミリ秒) を記録します。各要求の処理時間の測定は、要求がアプリケーションに到達した時点で開始し、要求が正常に完了したかコード内のどこかで失敗した時点で停止します。この処理時間の合計を監視対象の要求の合計数で割ったものが平均時間になります。この平均時間が常に 10000 ミリ秒を超えている場合は、調査する必要のある障害が発生しています。

このカウンターは、アプリケーション パフォーマンスの監視が有効な場合だけ使用することができます。

データベースの呼び出しに長時間かかる場合は、サーバーの問題や、クエリの構造と複雑さが原因の可能性があります。ファイル I/O 時間が長い場合は、ファイル サーバーに問題があることが考えられます。Web サービスのパフォーマンスの問題は、Web サービス、またはそのサービスが常駐しているサーバーがダウンしているか、Web サービスのコードの問題が原因で発生することがあります。アプリケーションの内部実行時間が長い場合は、コードが複雑なことや効率がよくないことが考えられます。

Element properties:

TargetMicrosoft.SystemCenter.Apm.Transaction
CategoryPerformanceCollection
EnabledTrue
Instance Name.NET Statistic
Counter NameAvg execution time
Frequency300
Alert GenerateFalse
RemotableFalse

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource System.Performance.DataProvider Default
WriteToDB WriteAction Microsoft.SystemCenter.CollectPerformanceData Default
WriteToDW WriteAction Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData Default

Source Code:

<Rule ID="Microsoft.SystemCenter.Apm.Transaction.CollectAvgDurationTime" Enabled="true" Target="Microsoft.SystemCenter.Apm.Transaction" ConfirmDelivery="false" Remotable="false" Priority="Normal" DiscardLevel="100">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Performance!System.Performance.DataProvider">
<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>300</Frequency>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>