收集 .NET CSM Apps/\% of Performance violations/sec

Microsoft.SystemCenter.Apm.CsmApplicationInstance.PerformanceRateMonitor (UnitMonitor)

收集 .NET CSM Apps/\% Performance violations/sec 性能计数器

Knowledge Base article:

摘要

如果每个指定时段内的客户端性能事件率超过监视器阈值,则实例状态将变为不正常。

原因

在性能事件率超过所配置的监视器阈值时,将生成应用程序客户端性能警报。

此计数器报告受监视的应用程序中的网页或 AJAX 调用超过了可接受的加载时间(秒)的次数。

过长的网络请求时间可能由不均衡的网络所引起。

复杂或低效的源代码可能会导致服务器处理时间很长。

大页面或大量的 java 脚本都可能会导致页面加载时间性能问题。

执行时间很长的 JavaScript 处理程序可能会导致 Window.OnLoad 较长的性能问题。

解决方法

页面加载调用时间长的原因通常包括,网络不平衡、服务器处理时间长、页面加载或 Window.OnLoad 时间较长。

Element properties:

TargetMicrosoft.SystemCenter.Apm.CsmApplicationInstance
Parent MonitorSystem.Health.PerformanceState
CategoryCustom
EnabledFalse
Instance Name.NET CSM Apps
Counter Name\% of Performance violations/sec
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeSystem.Performance.ConsecutiveSamplesThreshold
RemotableFalse
AccessibilityPublic
Alert Message
.NET CSM Apps/\% of Performance violations/sec 已超出阈值。
.NET CSM Apps/\% of Performance violations/sec 性能计数器超过了所配置的阈值 {0}\%。 性能计数器的值为 {1}\%。
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.Apm.CsmApplicationInstance.PerformanceRateMonitor" Accessibility="Public" Enabled="false" Target="Microsoft.SystemCenter.Apm.CsmApplicationInstance" ParentMonitorID="Health!System.Health.PerformanceState" Remotable="false" Priority="Normal" TypeID="Performance!System.Performance.ConsecutiveSamplesThreshold" ConfirmDelivery="false">
<Category>Custom</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.Apm.CsmApplicationInstance.PerformanceRateMonitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="AL!Microsoft.SystemCenter.Apm.ApplicationInstanceBase"]/PerformanceRateMonitorThreshold$</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>% of Performance violations/sec</CounterName>
<ObjectName>.NET CSM Apps</ObjectName>
<InstanceName>$Target/Property[Type="Microsoft.SystemCenter.Apm.CsmApplicationInstance"]/CounterInstance$</InstanceName>
<AllInstances>false</AllInstances>
<Frequency>$Target/Property[Type="AL!Microsoft.SystemCenter.Apm.ApplicationInstanceBase"]/PerformanceRateMonitorInterval$</Frequency>
<Threshold>$Target/Property[Type="AL!Microsoft.SystemCenter.Apm.ApplicationInstanceBase"]/PerformanceRateMonitorThreshold$</Threshold>
<Direction>greater</Direction>
<NumSamples>3</NumSamples>
</Configuration>
</UnitMonitor>