處理序監視:高控制代碼計數

Microsoft.Windows.Server.10.0.ProcessHandleCount.Alert (Rule)

當控制代碼計數增加過快時,此規則即會產生警示。

Knowledge Base article:

摘要

當控制代碼計數增加過快時,此規則即會產生警示。

注意:若此規則的閾值不同於「處理序監視:健全狀況狀態收集」規則的對應閾值,可能導致警示與處理序健全狀況狀態之間產生不一致。

為了避免產生過多警示,而實作了規則的最低閾值。最低閾值的預設值為 15%。閾值可透過在 Operations Manager 主控台覆寫規則來變更為任何值,但若變更為低於 15% 的值,根據預設,實際生效的閾值會是 15%。

使用者可在適當代理程式使用適當金鑰,建立 MinimalHandleCountIncreaseThreshold 登錄 DWORD (32 位元) 值,以變更最低閾值。有效的閾值會等於兩個值當中的最大值: 預設/透過 Operations Manager 主控台覆寫的閾值,以及登錄中設定的最低閾值。

下列登錄機碼會用於最低閾值:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Modules\Global\BaseOSProcessMonitoring

Element properties:

TargetMicrosoft.Windows.Server.10.0.ProcessMonitoring.ProcessSeed
CategoryCustom
EnabledFalse
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.Server.10.0.Process.HandleCountAlerting.DataSource Microsoft.Windows.Server.10.0.RunAs.CollectionRules
GenerateAlert WriteAction Microsoft.Windows.Server.10.0.GenerateAlertWriteAction Default
WA WriteAction Microsoft.Windows.Server.10.0.CloseAlertWriteAction Default

Source Code:

<Rule ID="Microsoft.Windows.Server.10.0.ProcessHandleCount.Alert" Target="Microsoft.Windows.Server.10.0.ProcessMonitoring.ProcessSeed" Enabled="false" Remotable="true" Priority="Normal" DiscardLevel="100" ConfirmDelivery="false">
<Category>Custom</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.Windows.Server.10.0.Process.HandleCountAlerting.DataSource" RunAs="Microsoft.Windows.Server.10.0.RunAs.CollectionRules">
<MonitoringConfiguration>$Target/Property[Type="WindowsServer!Microsoft.Windows.Server.ProcessSeed"]/ThresholdsByProcess$</MonitoringConfiguration>
<IntervalSeconds>120</IntervalSeconds>
<SampleCount>6</SampleCount>
<HandleCountIncreaseThreshold>20</HandleCountIncreaseThreshold>
<LogLevel>4</LogLevel>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="Microsoft.Windows.Server.10.0.GenerateAlertWriteAction">
<AlertMessageId>$MPElement[Name="Microsoft.Windows.Server.10.0.ProcessHandleCount.Alert.AlertMessage"]$</AlertMessageId>
<Threshold>$Data/HandleCountIncreaseThreshold$</Threshold>
<Metric>DoesHandleCountIncreaseTooFast</Metric>
</WriteAction>
<WriteAction ID="WA" TypeID="Microsoft.Windows.Server.10.0.CloseAlertWriteAction" Target="SCDW!Microsoft.SystemCenter.DataWarehouseConnectorServer">
<TimeoutSeconds>300</TimeoutSeconds>
<RuleId>$MPElement[Name="Microsoft.Windows.Server.10.0.ProcessHandleCount.Alert"]$</RuleId>
<Metric>DoesHandleCountIncreaseTooFast</Metric>
</WriteAction>
</WriteActions>
</Rule>