Checks on which volumes snapshot locking (tamperproof snapshots) is not enabled.
This check is beta. It covers SnapLock volumes and volumes with snapshot locking (tamperproof snapshots). Its behaviour and options may change in a later release, depending on feedback from production use. Please tell us which options you use and what you miss.
$ check_netapp_snapshot volume tamperproof locking-enabled -H <host> [...] [--help]
Snapshot locking protects the snapshots of a regular volume against deletion until their expiry time. It is enabled per volume (snapshot_locking_enabled). This plugin reports every checked volume with its state:
| Volume | Result |
|---|---|
| snapshot locking enabled | OK |
| snapshot locking disabled | CRITICAL |
| state not reported by Ontap (e.g. offline volumes) | UNKNOWN (see --no-field) |
| SnapLock volume | skipped (see --snaplock) |
SnapLock volumes (snaplock.type other than non_snaplock) are skipped by default: they are protected by SnapLock itself and do not use snapshot locking. Their number is printed in the output.
Usually not every volume has to be protected (root volumes, sources of a SnapMirror relationship, …). Select the volumes with --include / --exclude, e.g. all volumes of the SVM which holds the SnapMirror destinations.
This check only tells whether snapshot locking is enabled. Whether locked snapshots exist and how long they stay protected is checked by … tamperproof expiry-time, which volumes have already expired by … tamperproof expired.
This check requires Ontap 9.12.1 or later (see Ontap Compatibility).
--include / --exclude: Filter on the instance name <svm>.<volume> (e.g. svm1.vol_data). A value without ~ must match the whole instance name; to filter on the volume name alone use a pattern like --include='~\.vol_data$'. See Regular Expressions.--snaplock: How to treat SnapLock volumes: skip (default), ok or critical. With critical every volume without snapshot locking is an alarm, whatever else protects it.--no-field: How to treat volumes for which Ontap does not report the snapshot locking state, e.g. offline volumes: unknown (default), skip or critical.--alarm-limit: Set it to WARNING if a volume without snapshot locking should only be a warning.For all other parameters consult --help on the commandline.
Check the volumes of the SVM svm_dp without its root volume:
$ check_netapp_snapshot volume tamperproof locking-enabled -H filer --include='~^svm_dp\.' --exclude=svm_dp.svm_dp_root
NETAPP TAMPERPROOF SNAPSHOT LOCKING CRITICAL - 5 volumes checked, 1 CRITICAL
2 instances skipped because of --include/--exclude settings
2 SnapLock volumes skipped (protected by SnapLock, not by snapshot locking)
svm_dp.sv_db03_vol01: snapshot locking disabled (CRITICAL)
svm_dp.sv_app01_vol01: snapshot locking enabled
svm_dp.sv_db01_vol01: snapshot locking enabled
svm_dp.sv_db02_vol01: snapshot locking enabled
svm_dp.sv_app01_old_vol01: snapshot locking enabled
Only show the volumes with a problem:
$ check_netapp_snapshot volume tamperproof locking-enabled -H filer --include='~^svm_dp\.' --show-instances=CRITICAL,UNKNOWN
NETAPP TAMPERPROOF SNAPSHOT LOCKING CRITICAL - 6 volumes checked, 2 CRITICAL
1 instances skipped because of --include/--exclude settings
2 SnapLock volumes skipped (protected by SnapLock, not by snapshot locking)
svm_dp.sv_db03_vol01: snapshot locking disabled (CRITICAL)
svm_dp.svm_dp_root: snapshot locking disabled (CRITICAL)
Report every volume without snapshot locking, SnapLock volumes included, and do not let offline volumes turn the result UNKNOWN:
$ check_netapp_snapshot volume tamperproof locking-enabled -H filer --snaplock=critical --no-field=skip
NETAPP TAMPERPROOF SNAPSHOT LOCKING CRITICAL - 8 volumes checked, 4 CRITICAL
1 volume skipped (snapshot locking state not available, --no-field=skip)
svm_prod.vol_archive01: SnapLock volume (compliance), no snapshot locking (CRITICAL)
svm_dp.sv_archive01: SnapLock volume (enterprise), no snapshot locking (CRITICAL)
svm_dp.sv_db03_vol01: snapshot locking disabled (CRITICAL)
svm_dp.svm_dp_root: snapshot locking disabled (CRITICAL)
svm_dp.sv_app01_vol01: snapshot locking enabled
svm_dp.sv_db01_vol01: snapshot locking enabled
svm_dp.sv_db02_vol01: snapshot locking enabled
svm_dp.sv_app01_old_vol01: snapshot locking enabled