进程监视:高内存百分比

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

当内存百分比过高时,此规则将生成警报。

Knowledge Base article:

摘要

当特定进程消耗的内存过高时,此规则将生成警报。

注意:请注意,如果此规则的阈值与“进程监视: 运行状态收集”规则的相应阈值不同,则可能导致警报与进程运行状态之间不一致。

为了避免生成过多的警报,使用了规则的最小阈值。最小阈值的默认值为 7%。可通过重写在操作管理控制台中针对规则将阈值更改为任何值,但如果将其更改为低于 7% 的值,则默认情况下,有效阈值将为 7%。

用户可通过在适当代理和适当密钥上创建 MinimalMemoryPercentageThreshold 注册表 DWORD (32 位) 值来更改最小阈值。有效阈值将等于两个值的最大值: 通过操作管理控制台的默认/重写阈值和在注册表中设置的最小阈值。

以下注册表项用于最小阈值:

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.MemoryPercentageAlerting.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.ProcessMemoryPercentage.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.MemoryPercentageAlerting.DataSource" RunAs="Microsoft.Windows.Server.10.0.RunAs.CollectionRules">
<MonitoringConfiguration>$Target/Property[Type="WindowsServer!Microsoft.Windows.Server.ProcessSeed"]/ThresholdsByProcess$</MonitoringConfiguration>
<IntervalSeconds>67</IntervalSeconds>
<SampleCount>6</SampleCount>
<MemoryPercentageThreshold>50</MemoryPercentageThreshold>
<LogLevel>4</LogLevel>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="Microsoft.Windows.Server.10.0.GenerateAlertWriteAction">
<AlertMessageId>$MPElement[Name="Microsoft.Windows.Server.10.0.ProcessMemoryPercentage.Alert.AlertMessage"]$</AlertMessageId>
<Threshold>$Data/MemoryPercentageThreshold$</Threshold>
<Metric>IsMemoryPercentageTooHigh</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.ProcessMemoryPercentage.Alert"]$</RuleId>
<Metric>IsMemoryPercentageTooHigh</Metric>
</WriteAction>
</WriteActions>
</Rule>