NetApp Monitoring

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|-Xor 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

[S1] ./check_netapp_pro.pl Snapshots -H filer --base=target --target_type=volume

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.

NETAPP_PRO SNAPSHOTS OK - 16 snapshots on 2 volumes checked.
vol0: 9.0% / 8 snapshots
lun1: 2.7% / 8 snapshots
| lun1=3%;80;95;0;100 vol0=9%;80;95;0;100
[S2] ./check_netapp_pro.pl Snapshots -H filer --base=target --target_type=volume -I ^vol0$

Same as above but checks only the volume vol0.

NETAPP_PRO SNAPSHOTS OK - 8 snapshots on 1 volume checked.
vol0: 9.0% / 8 snapshots
| vol0=9%;80;95;0;100
[S3] ./check_netapp_pro.pl Snapshots -H filer --base=reserve --target_type=volume

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.)

NETAPP_PRO SNAPSHOTS CRITICAL - 16 snapshots on 2 volumes checked.
vol0: 180.3% / 8 snapshots (CRITICAL)
lun1: 54.7% / 8 snapshots
| lun1=55%;80;95;0;100 vol0=180%;80;95;0;100
[S4] ./check_netapp_pro.pl Snapshots -H filer --base=reserve --target_type=volume -w 15 -c 30

Warn if snapshots use more than 15% of the volumes size, send a critical alert if they occupy more than 30%.

[S5] ./check_netapp_pro.pl Snapshots -H filer --base=reserve --target_type=volume -w 50 -c 80 --base=reserve

Warn if snapshots use more than 50% of the volumes snap-reserve, send a critical alert if they occupy more than 80%.

[S6] ./check_netapp_pro.pl Snapshots -H filer --base=reserve --target_type=volume --metric=absolute -w 50 -c 80 --factor=Gi

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>

[A1] ./check_netapp_pro.pl Snapshots ... --metric=absolute -w =MAX*60/100 -c =MAX*95/100

Returns absolute values and warns if 60% of the volume is occupied by snapshots, critical alert if over 95%.

[A2] ./check_netapp_pro.pl Snapshots ... --base=reserve --check_only=with_reserve

Check all volumes, which have a snap-reserve. Calculate the relative usage of snapshots based on the size of the snap-reserve.

[A3] ./check_netapp_pro.pl Snapshots ... --base=target --check_only=no_reserve

Check all volumes which do not have a snap-reserve. Calculate the relative usage of snapshots based on the size of the volume.

[A4] ./check_netapp_pro.pl Snapshots ... --metric=number --younger_than=24h -w 1 -c 1 --comparison=lt

Check all volumes for yesterdays snapshot-copies. Critical if not at least one snapshot from yesterday is found.

[A5] ./check_netapp_pro.pl Snapshots ... --metric=number --metric=number -w 1 -c 0 --younger_than=24h --comparison=lt

Check all volumes for snapshot-copies. Send a warning if there are no snapshots within the last 24 hours.

[A6] ./check_netapp_pro.pl Snapshots ... --metric=number --metric=number -w 1 -c 1 --younger_than=48h --comparison=lt

Check all volumes for snapshot-copies. Send a critical alarm if there are no snapshots within the last 48 hours.

[A7] ./check_netapp_pro.pl Snapshots ... --metric=number --older_than=14d -w 0 -c 0

Check all volumes for snapshots older than 14 days. Critical alert if one or more outdated snapshots are found.

[A8] ./check_netapp_pro.pl Snapshots ... --metric=number --older_than=1d --name_matches=snmv -w 0 -c 0

Check all volumes for left-over snmv-snapshots (older than 1 day and the snapshot-name contains 'snmv').

[A9] ./check_netapp_pro.pl Snapshots ... --base=reserve --target_type=volume --metric=number -w 5 -c 10

Check all volumes. Warn for any volume, which has more than 5 snapshots. Send a critical alert if more than 10 snapshots were found.

NETAPP_PRO SNAPSHOTS WARNING - 16 snapshots on 2 volumes checked.
No SVC-ACK relevant changes in reason.
lun1: 8.0 / 8 snapshots (WARNING)
vol0: 8.0 / 8 snapshots (WARNING)
| lun1=8;5;10;0; vol0=8;5;10;0;
[A10] ./check_netapp_pro.pl Snapshots ... --base=reserve --target_type=volume --metric=number -w 1 -c 0 --comparison=lt

This would not work as expected! Use the check SnapshotLessVolume to find volumes without snapshots.

[A11] ./check_netapp_pro.pl Snapshots ... --metric=relative --older_than=7d -w 10 -c 50

Check all volumes for snapshots older than 7 days. Warns if these older snapshots occupy more than 10% of the volumes space.

[A12] ./check_netapp_pro.pl Snapshots ... --metric=relative --older_than=7d -w 10 -c 50 --base=reserve

Check all volumes for snapshots older than 7 days. Warns if these older snapshots occupy more than 10% of the volumes snap-reserve.

[A13] ./check_netapp_pro.pl Snapshots ... --exclude_dependency=vclone

Exclude any snapshot made from NetApp’s SnapManager. This is a regular expression, so also snapshots with a dependency like 'busy,vclone' are excluded.

[A14] ./check_netapp_pro.pl Snapshots ... --single --metric=absolute --factor=Mi -w 100 -c 150

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.

NETAPP_PRO SNAPSHOTS WARNING - 38 snapshots on 4 volumes checked.
sim83-01:vol0:hourly.3: 118.0MiB (WARNING)
sim83-01:vol0:hourly.4: 88.7MiB
sim83-01:vol0:nightly.1: 87.2MiB
sim83-01:vol0:hourly.2: 63.8MiB
sim83-01:vol0:nightly.0: 49.7MiB
sim83-01:vol0:hourly.0: 48.1MiB
sim83-01:vol0:hourly.1: 47.9MiB
sim83-01:vol0:hourly.5: 4.0MiB
vserv01:vol0:weekly.2016-07-04_1003: 0.3MiB
vserv01:vol0:weekly.2016-07-25_1836: 0.2MiB
vserv01:vol0:hourly.2016-07-07_0905: 0.2MiB
vserv01:vol0:hourly.2016-07-25_1905: 0.2MiB
vserv01:vol0:hourly.2016-07-07_1005: 0.2MiB
vserv01:vol0:daily.2016-07-07_0747: 0.1MiB
vserv01:vol0:hourly.2016-07-07_0747: 0.1MiB
vserv01:vol0:hourly.2016-07-07_0805: 0.1MiB
vserv01:vol0:daily.2016-07-25_1836: 0.1MiB
vserv01:vol0:hourly.2016-07-25_1836: 0.1MiB
vserv01:vol11:daily.2016-07-07_0747: 0.1MiB
vserv01:vol11:hourly.2016-07-07_0805: 0.1MiB
vserv01:vol11:hourly.2016-07-07_0905: 0.1MiB
vserv01:vol11:hourly.2016-07-07_1005: 0.1MiB
vserv01:vol11:weekly.2016-07-04_1003: 0.1MiB
vserv01:vol11:weekly.2016-07-25_1836: 0.1MiB
vserv01:vol12:daily.2016-07-07_0747: 0.1MiB
vserv01:vol12:hourly.2016-07-07_0805: 0.1MiB
vserv01:vol12:hourly.2016-07-07_0905: 0.1MiB
vserv01:vol12:hourly.2016-07-07_1005: 0.1MiB
vserv01:vol12:weekly.2016-07-04_1003: 0.1MiB
vserv01:vol12:weekly.2016-07-25_1836: 0.1MiB
vserv01:vol11:hourly.2016-07-25_1905: 0.1MiB
vserv01:vol12:hourly.2016-07-25_1905: 0.1MiB
vserv01:vol11:hourly.2016-07-07_0747: 0.1MiB
vserv01:vol11:hourly.2016-07-25_1836: 0.1MiB
vserv01:vol12:hourly.2016-07-07_0747: 0.1MiB
vserv01:vol12:hourly.2016-07-25_1836: 0.1MiB
vserv01:vol11:daily.2016-07-25_1836: 0.1MiB
vserv01:vol12:daily.2016-07-25_1836: 0.1MiB
| vol0_hourly.0=50429952B;104857600;157286400;0;2147483648 vol0_hourly.1=50245632B;104857600;157286400;0;2147483648 (...)
[A15] ./check_netapp_pro.pl Snapshots ... --metric=absolute --math=total --factor=Gi -w 500 -c 750

Check the cumulated size of all snapshots on the whole filer. Warn if the sum of all snapshot-sizes is over 500 GiB.

NETAPP_PRO SNAPSHOTS WARNING - # TODO please add example output here!
[A16] ./check_netapp_pro.pl Snapshots ... --metric=absolute --math=total --include=^my_svm --factor=Mi -w 300 -c 450

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.

NETAPP_PRO SNAPSHOTS WARNING - # TODO please add example output here!

© Copyright 2009-2023 Ingo Lantschner • Phone: +43-664-143 84 18 • contact@netapp-monitoring.info • en/help/Snapshots.html • last update: 2023-03-07