Use this Knowledge Script to monitor virtual machine snapshots. This script raises an event when the number of all snapshots, the size of all snapshots, or the age of a snapshot or a reverted snapshot exceed the thresholds you set. This script generates data streams for the number of all snapshots, the size of all snapshots, and the age of a snapshot or a reverted snapshot.
NOTE:This script will not generate events for virtual machines that have a parent host in maintenance mode.
vSphere virtual machine
By default, this script runs daily.
Set the following parameters as needed:
Parameter |
How to Set It |
---|---|
General Settings |
|
Job Failure Notification |
|
Raise event when snapshot metrics are not available? |
Select Yes to raise an event if none of your monitored virtual machines contain any snapshots. If even one of your monitored virtual machines has a snapshot, or if some snapshots are deleted, the script will not raise an event. The default is unselected. |
Event severity when snapshot metrics are not available |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which none of your monitored virtual machines contain any snapshots. The default is 15. |
Event severity when AppManager failed to get metrics |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which virtual machine snapshot metrics are not available. The default is 15. |
Event severity when AppManager failed to log in |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which AppManager failed to log in to vCenter. The default is 5. |
Event severity when VmSnapshotUsage job failed unexpectedly |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which the VmUptime job fails unexpectedly. The default is 5. |
Additional Settings |
|
Event Details |
|
Event detail format |
Select either HTML Table or Plain Text as the format for event detail. The default is HTML Table. |
Monitor Snapshots |
|
Event Notification |
|
Raise event if number of snapshots exceeds threshold? |
Select Yes to raise an event if the number of snapshots exceeds the threshold you set. The default is Yes. |
Threshold -- Maximum number of snapshots |
Specify the maximum number of snapshots that can be present before raising an event. The default is 0. |
Event severity when number of snapshots exceeds threshold |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which the number of snapshots exceeds the threshold. The default is 15. |
Raise event if the size of all snapshots exceeds threshold? |
Select Yes to raise an event if the size of all snapshots exceeds the threshold you set. The default is unselected. |
Threshold -- Maximum size of all snapshots |
Specify the maximum size of all snapshots that can exist before raising an event. The default is 10 GB. |
Event severity when the size of all snapshots exceeds threshold |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which the size of all snapshots exceeds the threshold. The default is 15. |
Raise event if age of a snapshot exceeds threshold? |
Select Yes to raise an event if the time between now and the time when the snapshot was first created exceeds the threshold you set. The default is unselected. |
Threshold -- Maximum age of a snapshot |
Specify the maximum amount of time that can pass since the creation of a snapshot before raising an event. The default is 30 days. |
Event severity when age of a snapshot exceeds threshold |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which the time between now and time when the snapshot was first created exceeds the threshold. The default is 15. |
Raise event if the time since a snapshot was last reverted exceeds threshold? |
Select Yes to raise an event if the time since a snapshot was last reverted exceeds the threshold. The default is unselected. |
Threshold -- Maximum time since a snapshot was last reverted |
Specify the maximum amount of time that can pass between now and when a snapshot was last reverted before raising an event. The default is 30 days. |
Event severity when the time since a snapshot was last reverted exceeds threshold |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which the time since a snapshot was last reverted exceeds the threshold. The default is 15. |
Data Collection |
|
Collect data for the number of snapshots? |
Select Yes to collect data about the number of all snapshots for charts and reports. The default is unselected. |
Collect data for the size of all snapshots? |
Select Yes to collect data about the size of all snapshots for charts and reports. The default is unselected. |
Collect data for the age of snapshots? |
Select Yes to collect data about the age of snapshots for charts and reports. The default is unselected. |
Collect data for the age of reverted snapshots? |
Select Yes to collect data about the age of reverted snapshots for charts and reports. The default is unselected. |