It is not recommended to snapshot production VMs. VM Snapshots also have negative impacts on VM and host performance. Instead of alerting on snapshots creation, this monitor checks the age of any snapshots and alert when the snapshot has existed for a period of time.
This monitor generates a warning alert if a snapshot age has reached 8 hours and a critical alert if the age has reached 24 hours.
Review the snapshots and delete the if they are no longer required.
Target | QND.Hyperv.2012R2.VM | ||
Parent Monitor | System.Health.ConfigurationState | ||
Category | AvailabilityHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | MatchMonitorHealth | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | QND.Hyperv2012R2.VMSnapshot.MT | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="QND.Hyperv2012R2.VMSnapshotAge.Status" Accessibility="Public" Enabled="true" Target="QND.Hyperv.2012R2.VM" ParentMonitorID="Health!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="QND.Hyperv2012R2.VMSnapshot.MT" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="QND.Hyperv2012R2.VMSnapshotAge.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Property[@Name='OldestSnapshotAgeHours']$</AlertParameter1>
<AlertParameter2>$Data/Context/Property[@Name='SnapshotHistory']$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Healthy" MonitorTypeStateID="Healthy" HealthState="Success"/>
<OperationalState ID="Warning" MonitorTypeStateID="Warning" HealthState="Warning"/>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Error"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>7200</IntervalSeconds>
<SyncTime/>
<TimeoutSeconds>120</TimeoutSeconds>
<TraceLevel>2</TraceLevel>
<VMId>$Target/Property[Type='QND.Hyperv.2012R2.VM']/VirtualMachineId$</VMId>
<SnapshotAgeHoursWarningThreshold>8</SnapshotAgeHoursWarningThreshold>
<SnapshotAgeHoursErrorThreshold>24</SnapshotAgeHoursErrorThreshold>
</Configuration>
</UnitMonitor>