Apache 虚拟主机每秒请求数总计

Microsoft.ApacheHTTPServer.VirtualHost.Unix.RequestsPerSecond.Monitor (UnitMonitor)

Apache 虚拟主机每秒请求数总计监视器

Knowledge Base article:

摘要

Apache 虚拟主机的每秒请求量较高。Apache HTTP 服务器性能可能会受到负面影响。

每秒请求数是虚拟主机每秒处理的 HTTP 请求量。Apache 虚拟主机使用子进程处理传入 HTTP 请求。

此监视器阈值是按照轮询过程中返回给代理的平均值分析的,其中“样本数”参数控制平均值计算中所包含的样本数。

原因

不正常状态表示每秒请求量当前较高。这可能是由于虚拟主机上的流量增加所引起的。默认阈值可能不适合于每个 Apache HTTP 服务器实例。

解决方法

要解决虚拟主机上每秒请求数较高的情况,请选择以下一个或多个选项:

配置

默认配置

参数

默认值

阈值

100

样本数

3

替代可用于更改以上为所有实例或为特定实例或组定义的参数值

Element properties:

TargetMicrosoft.ApacheHTTPServer.VirtualHost.Unix
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Oss.WSMan.Performance.Average.Filtered.Threshold.MonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Apache 虚拟主机每秒请求数较高
虚拟主机的当前每秒请求数 ({0}/s) 较高。
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.ApacheHTTPServer.VirtualHost.Unix.RequestsPerSecond.Monitor" Accessibility="Public" Target="Microsoft.ApacheHTTPServer.VirtualHost.Unix" TypeID="Oss!Microsoft.Oss.WSMan.Performance.Average.Filtered.Threshold.MonitorType" ParentMonitorID="Health!System.Health.PerformanceState" Enabled="onStandardMonitoring">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.ApacheHTTPServer.VirtualHost.Unix.RequestsPerSecond.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Value$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState HealthState="Success" MonitorTypeStateID="UnderThreshold" ID="UnderThreshold"/>
<OperationalState HealthState="Warning" MonitorTypeStateID="OverThreshold" ID="OverThreshold"/>
</OperationalStates>
<Configuration>
<TargetSystem>$Target/Host/Host/Property[Type="Unix!Microsoft.Unix.Computer"]/NetworkName$</TargetSystem>
<Uri>http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/Apache_HTTPDVirtualHostStatistics?__cimnamespace=root/apache</Uri>
<Filter/>
<SplitItems>true</SplitItems>
<Interval>300</Interval>
<ObjectName>Apache Virtual Host</ObjectName>
<CounterName>Requests per Second</CounterName>
<InstanceName>$Target/Property[Type="Microsoft.ApacheHTTPServer.VirtualHost"]/InstanceID$</InstanceName>
<InstanceProperty>/DataItem/WsManData/*[local-name(.)='Apache_HTTPDVirtualHostStatistics']/*[local-name(.)='InstanceID']</InstanceProperty>
<Value>$Data/WsManData/*[local-name(.)='Apache_HTTPDVirtualHostStatistics']/*[local-name(.)='RequestsPerSecond']$</Value>
<Threshold>100</Threshold>
<NumSamples>3</NumSamples>
</Configuration>
</UnitMonitor>