Hyper-V MPE 2016 Virtual Machine Health Summary (Failed VMs)

HyperV.MPE.2016.SRHV.VirtualMachineHealthSummary.Monitor (UnitMonitor)

Knowledge Base article:

Summary

This monitor detects if your VMs are in failed state

Element properties:

TargetMicrosoft.Windows.HyperV.2016.ServerRole
Parent MonitorSystem.Health.AvailabilityState
CategoryPerformanceHealth
EnabledTrue
Instance NameHyper-V Virtual Machine Health Summary
Counter NameHealth Critical
Frequency120
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeSystem.Performance.ConsecutiveSamplesThreshold
RemotableTrue
AccessibilityPublic
Alert Message
Hyper-V MPE 2016 Alert: Virtual Machine Health Summary (Failed VMs)

Instance {0}
Object {1}
Counter {2}
Has a value {3}
RunAsDefault

Source Code:

<UnitMonitor ID="HyperV.MPE.2016.SRHV.VirtualMachineHealthSummary.Monitor" Accessibility="Public" Enabled="true" Target="MSWinHV2016Dis!Microsoft.Windows.HyperV.2016.ServerRole" ParentMonitorID="SHLib!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="SPerf!System.Performance.ConsecutiveSamplesThreshold" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="HyperV.MPE.2016.SRHV.VirtualMachineHealthSummary.Monitor_AlertMessageResourceID">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/InstanceName$</AlertParameter1>
<AlertParameter2>$Data/Context/ObjectName$</AlertParameter2>
<AlertParameter3>$Data/Context/CounterName$</AlertParameter3>
<AlertParameter4>$Data/Context/SampleValue$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="ConditionFalse" MonitorTypeStateID="ConditionFalse" HealthState="Success"/>
<OperationalState ID="ConditionTrue" MonitorTypeStateID="ConditionTrue" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Property[Type="MSWinLib!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<CounterName>Health Critical</CounterName>
<ObjectName>Hyper-V Virtual Machine Health Summary</ObjectName>
<InstanceName/>
<AllInstances>false</AllInstances>
<Frequency>120</Frequency>
<Threshold>1</Threshold>
<Direction>greater</Direction>
<NumSamples>5</NumSamples>
</Configuration>
</UnitMonitor>