Collect agent processor utilization

Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeCollection (Rule)

Collects the "agent processor utilization" performance counter

Knowledge Base article:

Summary

This rule calculates the total CPU utilization of the Operations Manager agent and its related processes and then submits that as performance data under object “Health Service” and counter “agent processor utilization”.

This rule’s underlying script works by locating and sampling the CPU utilization for the Operations Manager agent process (HealthService.exe), its child monitoring host process (MonitoringHost.exe) and the child processes of those monitoring host processes (cscript.exe, PowerShell.exe, etc.). The script runs the calculation three times and writes the average of the three consecutive samples to the operations database and data warehouse.

See the Agent Performance view to review the data that has been sampled for the agents’ CPU utilization.

Agent Performance View

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="false" 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>00:00</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>