System Center 2012 Virtual Machine Manager Host Parent Partition CPU Utilization

Microsoft.SystemCenter.VirtualMachineManager.2012.HostParentPartitionCPUUtilizationMonitor (UnitMonitor)

Monitors the CPU utilization on the parent partition

Knowledge Base article:

Summary

This monitor tracks the CPU performance of the host. The CPU usage has exceeded the threshold.

Causes

The virtual machines and parent partition workloads running on the host are consuming critical levels of the CPU resources on the host.

Resolutions

Either migrate virtual machines to a different host or reduce parent partition workload CPU consumption. To have Virtual Machine Manger automatically balance host clusters, enable dynamic optimization. For more information about dynamic optimization, see the Virtual Machine Manager documentation.

Element properties:

TargetMicrosoft.SystemCenter.VirtualMachineManager.2012.HyperVHost
Parent MonitorSystem.Health.AvailabilityState
CategoryCustom
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SystemCenter.VirtualMachineManager.2012.Performance.ScriptBasedConsecutiveSamplesTwoThresholdsMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Host Parent Partition CPU Utilization high
The parent partition CPU utilization is {1} and has exceeded the warning or critical levels for {0}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.VirtualMachineManager.2012.HostParentPartitionCPUUtilizationMonitor" Accessibility="Public" Target="VMM2012Discovery!Microsoft.SystemCenter.VirtualMachineManager.2012.HyperVHost" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" TypeID="Microsoft.SystemCenter.VirtualMachineManager.2012.Performance.ScriptBasedConsecutiveSamplesTwoThresholdsMonitorType">
<Category>Custom</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.VirtualMachineManager.2012.HostParentPartitionCPUUtilizationMonitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter1>
<AlertParameter2>$Data/Context/SampleValue$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="CPUUtilizationReachedWarning" MonitorTypeStateID="ConditionWarn" HealthState="Warning"/>
<OperationalState ID="CPUUtilizationReachedError" MonitorTypeStateID="ConditionError" HealthState="Error"/>
<OperationalState ID="CPUUtilizationIsSuccess" MonitorTypeStateID="ConditionSuccess" HealthState="Success"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>180</IntervalSeconds>
<TimeoutSeconds>180</TimeoutSeconds>
<WarningThreshold>80</WarningThreshold>
<CriticalThreshold>90</CriticalThreshold>
<NumSamples>3</NumSamples>
<Arguments>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</Arguments>
<ScriptBody><Script>
' Copyright (c) Microsoft Corporation. All rights reserved.
' VBScript source code
' HostParentPartitionCPUUtilizationProvider.vbs
Option Explicit

SetLocale("en-us")

' This Script is used to check the Host Parent partition CPU utilization
' Alert when the utilization of this partition is high:
' Warning: WarningThreshold%, like 80%
' Critical: CriticalThreshold, like 90%
Dim oArgs, hostComputerName, objWMIService, colItems, objItem, performanceUtilization
Dim oAPI, oBag

Set oAPI = CreateObject("MOM.ScriptAPI")
Set oArgs = Wscript.Arguments

' Check to see if the required script arguments are there
' 1 argument is requried
' If 1 argument does not exist, log a script event
If oArgs.Count = 1 Then
hostComputerName = oArgs(0)
Set oBag = oAPI.CreatePropertyBag()
Set objWMIService = GetObject("winmgmts:\\" &amp; hostComputerName &amp; "\root\CIMV2")

Set colItems = objWMIService.ExecQuery("Select * from win32_PerfFormattedData_Perfos_Processor where name = '_Total'")
for each objItem in colItems
performanceUtilization = objItem.PercentProcessorTime
Next

performanceUtilization = CInt(performanceUtilization)

Call oBag.AddValue("Utilization", performanceUtilization)
Call oBag.AddValue("WarningThreshold", 80)
Call oAPI.LogScriptEvent("HostParentCPUUtilizationCounter.vbs", 101, 0, "HostParentCPUUtilizationCounter is " &amp; performanceUtilization)

Call oAPI.Return(oBag)
Else
Call oAPI.LogScriptEvent("HostParentCPUUtilizationCounter.vbs", 101, 0, "HostParentCPUUtilizationCounter was not called with 1 argument and was not executed.")
End If
</Script></ScriptBody>
<ObjectName>win32_PerfFormattedData_Perfos_Processor</ObjectName>
<CounterName>PercentProcessorTime</CounterName>
<InstanceName>_Total</InstanceName>
<Value>$Data/Property[@Name='Utilization']$</Value>
</Configuration>
</UnitMonitor>