Documentation
Snapshots-Check
Checks the disk space occupied by volume-snapshots.
Usage
$ check_netapp_pro.pl Snapshots -H <host> -b target|reserve [ ... ] [--help]
Description
This plugin checks the disk space used by snapshots. Depending on the --base
the total cumulated size of all snapshots is either compared to the size of the
snap-reserve or the size of the volume. The size of the volume is defined as
volume-size plus the snapreserve.
In other words:
If
--base=target
the total-size of the volume or aggregate would be 100%.If
--base=reserve
the size of the reserved space would be 100%.
The user is warned if the snapshots occupy more than a certain part of the snap-reserve or the total size of the volume.
If the metric is switched to absolute and dynamic thresholds are used, these variables are defined as follows:
MAX: volume-size plus the sna-reserve
VOL_SIZE: volume-size w/o any sna-reserve
(If the metric is relative, these VARs are all 100 - but you won't need them in this case.)
Skipping Volumes: Per default all volumes are checked. Volumes will be skipped, if at least one of the following is true:
- The size is smaller or equal to zero (volume restricted or offline)
- 'snapshot-blocks-reserved' is not defined
- 'size-used-by-snapshots' equals to 0
- Volume is excluded by means of
--exclude|-X
or not included in--include|-I
Use -v
to see which volumes are skipped.
Counting Volumes: By setting the --metric=number
one can count the number of
snapshots and define therefore alarms depending on that number. This does not work for
volumes which do not have snapshots at all!
To find volumes without snapshots you must use the check SnapshotLessVolume instead!
Simple Examples
Check all volumes and alert if the default values for the warning or critical thresholds are exceeded. The default-values are documented in the section for the --warning
- --critial
-switch.
Same as above but checks only the volume vol0.
Same as example 1, but the snapsize is calculated relative to the snap-reserve (and not the volume-size) Always results in a critical exit, if at least one volume has no snapreserve. (See examples below and --check_only
for a solution.)
Warn if snapshots use more than 15% of the volumes size, send a critical alert if they occupy more than 30%.
Warn if snapshots use more than 50% of the volumes snap-reserve, send a critical alert if they occupy more than 80%.
Warn if any volumes snapshots consume more than 50 Giga Byte (GiB), critical if more than 80 GiB.
Advanced Examples
Hint: The input for advanced examples is shortend. Replace the '...' below with ‑H <your filers ip or host-name>
Returns absolute values and warns if 60% of the volume is occupied by snapshots, critical alert if over 95%.
Check all volumes, which have a snap-reserve. Calculate the relative usage of snapshots based on the size of the snap-reserve.
Check all volumes which do not have a snap-reserve. Calculate the relative usage of snapshots based on the size of the volume.
Check all volumes for yesterdays snapshot-copies. Critical if not at least one snapshot from yesterday is found.
Check all volumes for snapshot-copies. Send a warning if there are no snapshots within the last 24 hours.
Check all volumes for snapshot-copies. Send a critical alarm if there are no snapshots within the last 48 hours.
Check all volumes for snapshots older than 14 days. Critical alert if one or more outdated snapshots are found.
Check all volumes for left-over snmv-snapshots (older than 1 day and the snapshot-name contains 'snmv').
Check all volumes. Warn for any volume, which has more than 5 snapshots. Send a critical alert if more than 10 snapshots were found.
This would not work as expected! Use the check SnapshotLessVolume to find volumes without snapshots.
Check all volumes for snapshots older than 7 days. Warns if these older snapshots occupy more than 10% of the volumes space.
Check all volumes for snapshots older than 7 days. Warns if these older snapshots occupy more than 10% of the volumes snap-reserve.
Exclude any snapshot made from NetApp’s SnapManager. This is a regular expression, so also snapshots with a dependency like 'busy,vclone' are excluded.
Check single snapshots size instead of the cumulated size of all snapshots per volume. Warn if at least one snapshots size is over 100 MiB.
Check the cumulated size of all snapshots on the whole filer. Warn if the sum of all snapshot-sizes is over 500 GiB.
Check the cumulated size of all snapshots whose name starts with my_svm. (In fact snapshots on the my_svm storage virtual machine.) Warn if the sum of all snapshot-sizes on this SVM gets over 300 MiB.