Hyper-V MPE 2016 VHD Error Count Monitor

HyperV.MPE.2016.VHD.ErrorCount.Monitor (UnitMonitor)

Knowledge Base article:

Summary

There are two Hyper-V storage counter sets because of how storage works in Hyper-V. In Hyper-V we provide two virtual storage buses for VM’s. One is IDE and one is SCSI. The Virtual IDE counters show up in the “Hyper-V Virtual IDE Controller” counter set unless Integration Services are loaded and then you will see the activity for both virtual IDE and SCSI in the “Hyper-V Virtual Storage Device” counter set. If you don’t have integration services installed the only the “Hyper-V Virtual IDE Controller” will show the VM disk activity.

The Error count should always be zero for the virtual storage device.

Element properties:

TargetHyperV.MPE.2016.VMs.VHDs
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Instance NameHyper-V Virtual Storage Device
Counter NameError Count
Frequency3000
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeSystem.Performance.ThresholdMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Hyper-V MPE 2016 Alert: VHD Error Count Monitor

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

Source Code:

<UnitMonitor ID="HyperV.MPE.2016.VHD.ErrorCount.Monitor" Accessibility="Public" Enabled="true" Target="HVMPE2016Dis!HyperV.MPE.2016.VMs.VHDs" ParentMonitorID="SHLib!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="SPerf!System.Performance.ThresholdMonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="HyperV.MPE.2016.VHD.ErrorCount.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/Value$</AlertParameter4>
<AlertParameter5>$Data/Context/TimeSampled$</AlertParameter5>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="UnderThreshold" MonitorTypeStateID="UnderThreshold" HealthState="Success"/>
<OperationalState ID="OverThreshold" MonitorTypeStateID="OverThreshold" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Host/Host/Property[Type="MSWinLib!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<CounterName>Error Count</CounterName>
<ObjectName>Hyper-V Virtual Storage Device</ObjectName>
<InstanceName>$Target/Property[Type="HVMPE2016Dis!HyperV.MPE.2016.VMs.VHDs"]/VHDName$</InstanceName>
<AllInstances>false</AllInstances>
<Frequency>3000</Frequency>
<Threshold>0</Threshold>
</Configuration>
</UnitMonitor>