Checks the space already used on volumes including the optional aggregation of values.
$ 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 comparable with database functions.
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.
--include
/ --exclude
: Include or exclude volumes based on their name. The SVM-name is prefixed to the volume-name so that you can also filter on the SVM-name.
--warning
/ --critical
: Thresholds for used space in percent or bytes. For bytes SI-prefixed values (e.g. 2GiB or 3TB) are accepted as well. See also Large Byte Values
For the aggregated-subcommand only absolute thresholds are supported yet.
For all other parameters consult --help
on the commandline.
In case of absolute thresholds (e.g. --warning 30GiB
) the perfdata contains absolute values (number of bytes) only.
In case of relative thresholds (e.g. --warning 80%
) the perfdata contains both absolute and relative values (number of bytes plus % of volume size).
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 filer -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;
Relative thresholds (percent of volumes maximum size) can be used as well:
$ check_netapp_volume usage -H sim96 -w 60% -c70%
NETAPP VOLUME USAGE OK - 5 volumes checked
vserv_b.vol2: 6.5%, 1.297MiB
vserv_b.vol1: 5.5%, 1.105MiB
vserv_a.vol1: 6.0%, 1.195MiB
vserv_b.vol0: 5.6%, 1.121MiB
vserv_a.vol0: 6.3%, 1.27MiB
| 'vserv_a.vol0_rel'=6.348%;60;70;0; 'vserv_a.vol0_abs'=1331200B;12582912;14680064;0; 'vserv_b.vol0_rel'=5.605%;60;70;0; 'vserv_b.vol0_abs'=1175552B;12582912;14680064;0; 'vserv_a.vol1_rel'=5.977%;60;70;0; 'vserv_a.vol1_abs'=1253376B;12582912;14680064;0; 'vserv_b.vol1_rel'=5.527%;60;70;0; 'vserv_b.vol1_abs'=1159168B;12582912;14680064;0; 'vserv_b.vol2_rel'=6.484%;60;70;0; 'vserv_b.vol2_abs'=1359872B;12582912;14680064;0;
Sum (total) of all volumes on the filer:
$ check_netapp_volume usage aggregated -H filer -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 warning if the sum gets over 6 MiB:
$ check_netapp_volume usage aggregated -H filer -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 filer --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 filer --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;