check_netapp_snapshot volume size

Checks the storage space occupied by snapshots on the volumes of a NetApp filer.

Description

This plugin checks the space used by snapshots on volumes in relation to the volumes size or the snapshot-reserve size (--base=volume|reserve). Other subcommands eg. aggregate may follow on request later.

The naming of volumes in this check follows this rule: <aggregate-name>.<vserver-name>.<volume-name>.

The patterns given to the --exclude and --include parameters are matched against the instances (volumes) full-name (e.g. ‘aggr0.vserv_a.vol0’). This enables the checking of volumes on specific aggregates or vservers. See also the section Advanced Examples.

Important Parameters

  • --ignore-snapshot-count to mitigate false negatives. Do not exit with UNKNOWN, if the number of snapshots in the volume-snapshot-store does not match with the snapshot_count returned by Ontaps private API.

Examples

Simple Examples

$ check_netapp_snapshot volume size -H filer
NETAPP SNAPSHOT CRITICAL - 6 volumes checked, 3 CRITICAL, 2 WARNING
50 snapshots on 6 volumes checked
aggr2.vserv_b.vol2: 12.13% (CRITICAL)
aggr2.vserv_b.vol1: 11.23% (CRITICAL)
aggr1.vserv_a.vol0: 12.01% (CRITICAL)
aggr2.vserv_b.vol0: 9.47% (WARNING)
aggr1.vserv_a.vol1: 9.88% (WARNING)
aggr0_sim96cluster_01.sim96cluster-01.vol0: 0.00%
| 'aggr0_sim96cluster_01.sim96cluster-01.vol0'=0%;5;10;0; 'aggr1.vserv_a.vol0'=12.01%;5;10;0; 'aggr1.vserv_a.vol1'=9.88%;5;10;0; 'aggr2.vserv_b.vol0'=9.47%;5;10;0; 'aggr2.vserv_b.vol1'=11.23%;5;10;0; 'aggr2.vserv_b.vol2'=12.13%;5;10;0;```

Checks all snapshots on all volumes on all aggregates. Returns CRITICAL if at least one of the volumes space used by snapshots is above 10% of this volumes size (this is the default).


$ check_netapp_snapshot volume size -H filer -w 20 -c 40
NETAPP SNAPSHOT OK - 6 volumes checked
50 snapshots on 6 volumes checked
aggr2.vserv_b.vol2: 12.13%
aggr2.vserv_b.vol1: 11.23%
aggr2.vserv_b.vol0: 9.47%
aggr1.vserv_a.vol1: 9.88%
aggr1.vserv_a.vol0: 12.01%
aggr0_sim96cluster_01.sim96cluster-01.vol0: 0.00%
| 'aggr0_sim96cluster_01.sim96cluster-01.vol0'=0%;20;40;0; 'aggr1.vserv_a.vol0'=12.01%;20;40;0; 'aggr1.vserv_a.vol1'=9.88%;20;40;0; 'aggr2.vserv_b.vol0'=9.47%;20;40;0; 'aggr2.vserv_b.vol1'=11.23%;20;40;0; 'aggr2.vserv_b.vol2'=12.13%;20;40;0;

Same as above but with much higher thresholds of 20% for warning and 40% for critical.


$ check_netapp_snapshot volume size -H filer --base=reserve -w 70 -c 85
NETAPP SNAPSHOT CRITICAL - 5 volumes checked, 5 CRITICAL
50 snapshots on 5 volumes checked
aggr0_sim96cluster_01.sim96cluster-01.vol0 cannot be checked with --base=reserve, because the snapshot-reserve is undefined
aggr2.vserv_b.vol2: 242.58% (CRITICAL)
aggr2.vserv_b.vol1: 224.61% (CRITICAL)
aggr2.vserv_b.vol0: 189.45% (CRITICAL)
aggr1.vserv_a.vol1: 197.66% (CRITICAL)
aggr1.vserv_a.vol0: 240.23% (CRITICAL)
| 'aggr1.vserv_a.vol0'=240.23%;70;85;0; 'aggr1.vserv_a.vol1'=197.66%;70;85;0; 'aggr2.vserv_b.vol0'=189.45%;70;85;0; 'aggr2.vserv_b.vol1'=224.61%;70;85;0; 'aggr2.vserv_b.vol2'=242.58%;70;85;0;

Again, all snapshots on all volumes are checked on all aggregates, but the size used by the snapshots is compared to the snapshot reserve of the volume (and not the size of the volume). This also results in a volume being skipped because that volume has no snapshot reserve defined.

The high numbers with over 100% show that the snapshots of this volume have grown far beyond the space originally reserved for the snapshots.

Advanced Examples

Checking volume-snapshots on specific aggregates or virtual servers only.

$ check_netapp_snapshot volume size -H sim96 --include=~^aggr1\.
NETAPP SNAPSHOT CRITICAL - 2 volumes checked, 1 CRITICAL, 1 WARNING
20 snapshots on 2 volumes checked
4 volumes skipped by exclude/include expression(s)
aggr1.vserv_a.vol0: 12.01% (CRITICAL)
aggr1.vserv_a.vol1: 9.88% (WARNING)
| 'aggr1.vserv_a.vol0'=12.01%;5;10;0; 'aggr1.vserv_a.vol1'=9.88%;5;10;0;

Checks only snapshots on volumes which are located in aggregate aggr1.


$ check_netapp_snapshot volume size -H sim96 --include=~^aggr1\.vserv_a\.
NETAPP SNAPSHOT CRITICAL - 2 volumes checked, 1 CRITICAL, 1 WARNING
20 snapshots on 2 volumes checked
4 volumes skipped by exclude/include expression(s)
aggr1.vserv_a.vol0: 12.01% (CRITICAL)
aggr1.vserv_a.vol1: 9.88% (WARNING)
| 'aggr1.vserv_a.vol0'=12.01%;5;10;0; 'aggr1.vserv_a.vol1'=9.88%;5;10;0;

Checks only snapshots on volumes which are located in aggregate aggr1 and are part of the vserver vserv_a. (Same result in this case, since aggr1 has only one vserver.)