Monitors the host memory utilization
This monitor tracks how much memory on the host is being used, in megabytes. The available memory for the host is less than the threshold.
The virtual machines running on the host are consuming critical levels of host memory.
To free additional host memory, migrate a virtual machine to another host. To have Virtual Machine Manager automatically load-balance host clusters, enable the dynamic optimization feature. For information about dynamic optimization, see the Virtual Machine Manager documentation.
Target | Microsoft.SystemCenter.VirtualMachineManager.Discovery.HyperVHost | ||
Parent Monitor | System.Health.AvailabilityState | ||
Category | AvailabilityHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | MatchMonitorHealth | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.SystemCenter.VirtualMachineManager.Performance.PowershellBasedConsecutiveSamplesTwoThresholdsMonitorType | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.SystemCenter.VirtualMachineManager.HostMemoryUtilizationMonitor" Accessibility="Public" Target="VMMDiscovery!Microsoft.SystemCenter.VirtualMachineManager.Discovery.HyperVHost" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" TypeID="Microsoft.SystemCenter.VirtualMachineManager.Performance.PowershellBasedConsecutiveSamplesTwoThresholdsMonitorType">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.VirtualMachineManager.HostMemoryUtilizationMonitor.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="MemoryUtilizationReachedWarning" MonitorTypeStateID="ConditionWarn" HealthState="Warning"/>
<OperationalState ID="MemoryUtilizationReachedError" MonitorTypeStateID="ConditionError" HealthState="Error"/>
<OperationalState ID="MemoryUtilizationIsSuccess" MonitorTypeStateID="ConditionSuccess" HealthState="Success"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>180</IntervalSeconds>
<TimeoutSeconds>180</TimeoutSeconds>
<WarningThreshold>90</WarningThreshold>
<CriticalThreshold>95</CriticalThreshold>
<NumSamples>3</NumSamples>
<hostComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</hostComputerName>
<ScriptBody> # Copyright (c) Microsoft Corporation. All rights reserved.
# Powershell source code
# HostMemoryUtilizationCounter.ps1
# This Script is used to check the Host memory utilization
# Alert when the utilization of this partition is high:
# Warning: WarningThreshold%, like 80%
# Critical: CriticalThreshold, like 90%
param($hostComputerName)
$momAPI = new-object -comObject MOM.ScriptAPI
$error.Clear();
$oBag = $momAPI.CreatePropertyBag();
$colItems = gcim Win32_OperatingSystem;
foreach($objItem in $colItems){
if($objItem.TotalVisibleMemorySize -gt 0){
$performanceUtilization = (($objItem.TotalVisibleMemorySize - $objItem.FreePhysicalMemory)/$objItem.TotalVisibleMemorySize)*100;
}
}
if($performanceUtilization -lt 0){
$performanceUtilization = 0;
}
$performanceUtilization = [int]$performanceUtilization;
$oBag.AddValue("Utilization",$performanceUtilization);
$oBag; </ScriptBody>
<ObjectName>win32_PerfFormattedData_Perfos_Memory</ObjectName>
<CounterName>PercentCommittedBytesInUse</CounterName>
<InstanceName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</InstanceName>
<Value>$Data/Property[@Name='Utilization']$</Value>
</Configuration>
</UnitMonitor>