Supervisa el uso de CPU en la partición primaria
Este monitor realiza un seguimiento del rendimiento de la CPU del host. El uso de CPU ha superado el umbral.
Las cargas de trabajo de particiones primarias y máquinas virtuales que se ejecutan en el host están consumiendo niveles críticos de recursos de CPU en el host.
Migre máquinas virtuales a otro host o reduzca el consumo de CPU de la carga de trabajo de particiones primarias. Para que Virtual Machine Manager equilibre automáticamente los clústeres de hosts, habilite la optimización dinámica. Para obtener más información acerca de la optimización dinámica, vea la documentación de Virtual Machine Manager.
Target | Microsoft.SystemCenter.VirtualMachineManager.2012.HyperVHost | ||
Parent Monitor | System.Health.AvailabilityState | ||
Category | Custom | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | MatchMonitorHealth | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.SystemCenter.VirtualMachineManager.2012.Performance.ScriptBasedConsecutiveSamplesTwoThresholdsMonitorType | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<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>
' 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:\\" & hostComputerName & "\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 " & 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
</ScriptBody>
<ObjectName>win32_PerfFormattedData_Perfos_Processor</ObjectName>
<CounterName>PercentProcessorTime</CounterName>
<InstanceName>_Total</InstanceName>
<Value>$Data/Property[@Name='Utilization']$</Value>
</Configuration>
</UnitMonitor>