check_netapp_volume (volume's usage)

Checks the space already used on volumes including the optional aggregation of values.

Usage

$ check_netapp_volume usage -H <host> [...] [--help]
$ check_netapp_volume usage aggregated --math=sum|average|... -H <host> [...] [--help]

The term aggregated has nothing to do with ONTAP’s aggregates here. It refers to the aggregation of values comparabel with datbase functions.

Description

The volume plugin retrieves the usage data (used space in bytes) and compares them with the thresholds.

The subcommand aggregated allows to do some math on the aggregated values of several volumes. Together with the --include/--exclude parameters it can be used to get statistics and reports on specific groups of volumes - e.g. the volumes dedicated to an internal customer or department.

Important Parameters

--include / --exclude: Include or exclude volumes based on their name. The SVM-name is pre-fixed to the volume-name so that you can filter also based on the SVM-name.

--warning / --critical: Thresholds for used space in bytes. SI-prefixed values (e.g. 2GiB or 3TB) are accepted as well. See also Large Byte Values

For all other parameters consult --help on the commandline.

Examples

Simple Examples

Check all volumes for used space:

$ check_netapp_volume usage -H filer -w 30GiB -c 50GiB
NETAPP VOLUME USAGE OK - 5 volumes checked
vserv_b.vol2: 1.254MiB
vserv_b.vol1: 1.23MiB
vserv_a.vol1: 1.184MiB
vserv_b.vol0: 1.27MiB
vserv_a.vol0: 1.238MiB
| 'vserv_a.vol0'=1298432B;32212254720;53687091200;0; 'vserv_b.vol0'=1331200B;32212254720;53687091200;0; 'vserv_a.vol1'=1241088B;32212254720;53687091200;0; 'vserv_b.vol1'=1290240B;32212254720;53687091200;0; 'vserv_b.vol2'=1314816B;32212254720;53687091200;0;


Same as above but with reduced thresholds:

$ check_netapp_volume usage -H sim96 -w 1.2MiB -c 2MiB
NETAPP VOLUME USAGE WARNING - 5 volumes checked, 4 WARNING
vserv_b.vol2: 1.254MiB (WARNING)
vserv_b.vol1: 1.23MiB (WARNING)
vserv_b.vol0: 1.27MiB (WARNING)
vserv_a.vol0: 1.238MiB (WARNING)
vserv_a.vol1: 1.184MiB
| 'vserv_a.vol0'=1298432B;1258291;2097152;0; 'vserv_b.vol0'=1331200B;1258291;2097152;0; 'vserv_a.vol1'=1241088B;1258291;2097152;0; 'vserv_b.vol1'=1290240B;1258291;2097152;0; 'vserv_b.vol2'=1314816B;1258291;2097152;0;


Aggregation Examples

Sum (total) of all volumes on the filer:

$ check_netapp_volume usage aggregated -H sim96 -w 10MiB -c 15MiB
NETAPP VOLUME USAGE AGGREGATED OK - 5 volumes checked, sum 6.176MiB used
vserv_a.vol0: 1.238MiB
vserv_b.vol0: 1.27MiB
vserv_a.vol1: 1.184MiB
vserv_b.vol1: 1.23MiB
vserv_b.vol2: 1.254MiB
| 'sum'=6475776B;10485760;15728640;0;


Same as above but sends a warnig if the sum gets over 6 MiB:

$ check_netapp_volume usage aggregated -H sim96 -w 6MiB -c 10MiB
NETAPP VOLUME USAGE AGGREGATED WARNING - 5 volumes checked, sum 6.176MiB used
vserv_a.vol0: 1.238MiB
vserv_b.vol0: 1.27MiB
vserv_a.vol1: 1.184MiB
vserv_b.vol1: 1.23MiB
vserv_b.vol2: 1.254MiB
| 'sum'=6475776B;6291456;10485760;0;


Filtering with --inlcude/--exclude can be especially useful in this context. The following example adds the used space of all volumes on the vserv_a SVM.

$ check_netapp_volume usage aggregated -H sim96 --include="^vserv_a\."
NETAPP VOLUME USAGE AGGREGATED CRITICAL - 2 volumes checked, sum 2.422MiB used
3 instance(s) skipped because of --include/--exclude
vserv_a.vol0: 1.238MiB
vserv_a.vol1: 1.184MiB
| 'sum'=2539520B;1048576;2097152;0;


Using --math=average|min|max the type of calculation done on the aggregated values can be changed:

$ check_netapp_volume usage aggregated -H sim96 --math=average -w 6MiB -c 10MiB
NETAPP VOLUME USAGE AGGREGATED OK - 5 volumes checked, average 1.235MiB used
vserv_a.vol0: 1.238MiB
vserv_b.vol0: 1.27MiB
vserv_a.vol1: 1.184MiB
vserv_b.vol1: 1.23MiB
vserv_b.vol2: 1.254MiB
| 'average'=1295155B;6291456;10485760;0;