Zbieranie wartości licznika Aplikacje .NET/średni czas żądania (ms)

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

Knowledge Base article:

Podsumowanie

Stan wystąpienia staje się nieprawidłowy, jeśli średni czas żądania w ustalonym okresie przekracza próg monitora.

Przyczyny

Alerty wydajności aplikacji są generowane, jeśli liczba zdarzeń wydajności przekracza skonfigurowany próg monitora.

Zbyt długie wywołania bazy danych mogą być spowodowane problemami z serwerem lub strukturą i złożonością kwerendy. Długie czasy trwania plikowych operacji we/wy mogą wynikać z problemów z serwerem plików. Problemy z wydajnością usług sieci Web mogą wynikać z niedziałania usługi bądź serwera, na którym jest uruchamiana, lub problemów z kodem usługi. Zbyt długie czasy wykonania aplikacji mogą być wynikiem złożonego lub mało wydajnego kodu.

Rozwiązania

Typowy spadek wydajności aplikacji może być spowodowany długim wywołaniem bazy danych, długim wywołaniem usługi sieci Web, powolnym wywołaniem funkcji zdalnych .NET, powolnym wywołaniem modelu COM+ lub nieefektywnością kodu aplikacji.

Element properties:

TargetMicrosoft.SystemCenter.Apm.ApplicationInstance
Parent MonitorSystem.Health.PerformanceState
CategoryCustom
EnabledFalse
Instance Name.NET Apps
Counter NameAvg. Request Time
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeSystem.Performance.ConsecutiveSamplesThreshold
RemotableFalse
AccessibilityPublic
Alert Message
Próg licznika Aplikacje .NET/średni czas żądania przekroczył próg
Licznik Aplikacje .NET Apps/średni czas żądania przekroczył skonfigurowany próg wynoszący {0} ms. Wartość licznika wynosiła {1} ms.
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.Apm.ApplicationInstance.AvgRequestTimeMonitor" Accessibility="Public" Enabled="false" Target="Microsoft.SystemCenter.Apm.ApplicationInstance" ParentMonitorID="Health!System.Health.PerformanceState" Remotable="false" Priority="Normal" TypeID="Performance!System.Performance.ConsecutiveSamplesThreshold" ConfirmDelivery="false">
<Category>Custom</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.Apm.ApplicationInstance.AvgRequestTimeMonitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="Microsoft.SystemCenter.Apm.ApplicationInstanceBase"]/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/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<CounterName>Avg. Request Time</CounterName>
<ObjectName>.NET Apps</ObjectName>
<InstanceName>$Target/Property[Type="Microsoft.SystemCenter.Apm.ApplicationInstance"]/CounterInstance$</InstanceName>
<AllInstances>false</AllInstances>
<Frequency>$Target/Property[Type="Microsoft.SystemCenter.Apm.ApplicationInstanceBase"]/AvgRequestTimeMonitorInterval$</Frequency>
<Threshold>$Target/Property[Type="Microsoft.SystemCenter.Apm.ApplicationInstanceBase"]/AvgRequestTimeMonitorThreshold$</Threshold>
<Direction>greater</Direction>
<NumSamples>3</NumSamples>
</Configuration>
</UnitMonitor>