Checks how long tamperproof snapshot protection (SnapLock or snapshot locking) remains active on a volume.
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 expiry-time -H <host> [...] [--help]
This plugin evaluates the volume-level SnapLock expiry time (snaplock.expiry_time) and alarms when the remaining protection time gets too short. It considers two kinds of volumes; all other volumes are silently skipped:
snaplock.type other than non_snaplock).snapshot_locking_enabled, Ontap 9.12.1 or later). These are regular volumes whose snapshots are locked one by one, typically SnapMirror destinations which lock the snapshots on arrival. Their expiry time is the one of the snapshot which is locked longest. So with a daily transfer and a lock of 7 days the remaining time stays between 6 and 7 days; if it drops, no newly locked snapshot has arrived. With the default --warning=7d such a volume is always WARNING, so set the thresholds below the lock period, e.g. --warning=5d --critical=3d.Related checks, each answering one question:
… tamperproof locking-enabled: on which volumes is snapshot locking not enabled at all?… tamperproof expired: which volumes have already expired? Use it together with --expired=skip here, if expired volumes should be judged apart from volumes which expire soon.The thresholds are durations (e.g. 7d, 2d, 1d — see Durations). The check compares the remaining time against --warning / --critical using --comparison=le by default, i.e. it alarms at or below the given remaining time.
If the expiry time lies in the past (protection already expired) or is missing/unparsable, the remaining time is treated as 0s and the volume becomes CRITICAL with a corresponding message. A volume with snapshot locking enabled but without any locked snapshot has no expiry time and is reported as no locked snapshot.
This check requires Ontap 9.10.1 or later (see Ontap Compatibility). Volumes with snapshot locking are considered on Ontap 9.12.1 or later.
--warning / --critical: Duration thresholds for the remaining protection time. Defaults: --warning=7d, --critical=1d.--comparison: Comparison operator, defaults to le (lower-or-equal). Equal warning and critical thresholds are allowed; in that case the critical threshold wins.--scope: Which protected volumes are checked: both (default), snaplock (SnapLock volumes only) or snapshot-locking (volumes with snapshot locking only).--no-expiry: How to treat a volume without expiry time, e.g. snapshot locking enabled but no locked snapshot: critical (default; 0s remaining is compared with the thresholds), ok or skip.--expired: How to treat a volume whose protection has already expired: critical (default; 0s remaining is compared with the thresholds), ok or skip.--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.For all other parameters consult --help on the commandline.
Check the volumes of the SVM svm_prod with the default thresholds. The remaining protection time is well above the default thresholds, so the result is OK:
$ check_netapp_snapshot volume tamperproof expiry-time -H filer --include='~^svm_prod\.'
NETAPP TAMPERPROOF SNAPSHOT EXPIRY OK - 1 volume checked
5 instances skipped because of --include/--exclude settings
svm_prod.vol_archive01: expires in 6.0 week
The remaining protection time has dropped below the warning threshold (7d):
$ check_netapp_snapshot volume tamperproof expiry-time -H filer --warning=7d --critical=1d --include='~^svm_prod\.'
NETAPP TAMPERPROOF SNAPSHOT EXPIRY WARNING - 1 volume checked, 1 WARNING
5 instances skipped because of --include/--exclude settings
svm_prod.vol_archive01: expires in 3.0 day (WARNING)
Protection has already expired. The remaining time is clamped to 0s and the result is CRITICAL:
$ check_netapp_snapshot volume tamperproof expiry-time -H filer --warning=7d --critical=1d --include='~^svm_prod\.'
NETAPP TAMPERPROOF SNAPSHOT EXPIRY CRITICAL - 1 volume checked, 1 CRITICAL
5 instances skipped because of --include/--exclude settings
svm_prod.vol_archive01: expired at 2026-06-23T08:00:00Z (CRITICAL)
Check only a single volume by its instance name:
$ check_netapp_snapshot volume tamperproof expiry-time -H filer --include=svm_prod.vol_archive01
NETAPP TAMPERPROOF SNAPSHOT EXPIRY OK - 1 volume checked
5 instances skipped because of --include/--exclude settings
svm_prod.vol_archive01: expires in 6.0 week
A SnapMirror destination whose snapshots are locked for 7 days on arrival. Alarm if no newly locked snapshot has arrived for two days (5d remaining) and skip retired volumes:
$ check_netapp_snapshot volume tamperproof expiry-time -H filer --scope=snapshot-locking --include='~^svm_dp\.' --exclude='~_old_' --warning=5d --critical=3d
NETAPP TAMPERPROOF SNAPSHOT EXPIRY CRITICAL - 3 volumes checked, 1 CRITICAL
1 instances skipped because of --include/--exclude settings
svm_dp.sv_db02_vol01: no locked snapshot (no snaplock expiry time) (CRITICAL)
svm_dp.sv_app01_vol01: expires in 6.4 day
svm_dp.sv_db01_vol01: expires in 6.4 day
Only judge the remaining time of volumes which are still protected. Expired volumes and volumes without a locked snapshot are skipped and counted in the output:
$ check_netapp_snapshot volume tamperproof expiry-time -H filer --scope=snapshot-locking --expired=skip --no-expiry=skip --warning=5d --critical=3d
NETAPP TAMPERPROOF SNAPSHOT EXPIRY OK - 2 volumes checked
1 volume skipped (no expiry time, --no-expiry=skip)
1 expired volume skipped (--expired=skip)
svm_dp.sv_app01_vol01: expires in 6.4 day
svm_dp.sv_db01_vol01: expires in 6.4 day