收集代理处理器使用率

Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeCollection (Rule)

收集 "agent processor utilization" 性能计数器的数据

Knowledge Base article:

摘要

此规则计算 Operations Manager 代理及其相关进程的总 CPU 使用率,然后提交该数据作为“运行状况服务”对象和 "agent processor utilization" 计数器下面的性能数据。

此规则的基本脚本的工作方式如下: 确定 Operations Manager 代理进程(HealthService.exe)、其子监视主机进程(MonitoringHost.exe)以及这些监视主机进程的子进程(cscript.exe、PowerShell.exe 等)的 CPU 使用率,并对其进行采样。此脚本运行三次计算,并将三个连续样本的平均值写入到操作数据库和数据仓库。

请参阅代理性能视图以查看针对代理的 CPU 使用率进行采样的数据。

代理性能视图

Element properties:

TargetMicrosoft.SystemCenter.HealthService
CategoryPerformanceCollection
EnabledTrue
Alert GenerateFalse
RemotableFalse

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeCounterDataSource Default
WriteToDB WriteAction Microsoft.SystemCenter.CollectPerformanceData Default
WriteToDW WriteAction Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData Default

Source Code:

<Rule ID="Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeCollection" Enabled="true" Target="SCLibrary!Microsoft.SystemCenter.HealthService" ConfirmDelivery="true" Remotable="false" Priority="Normal" DiscardLevel="100">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeCounterDataSource">
<IntervalSeconds>321</IntervalSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
<SyncTime/>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerName>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SCLibrary!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>