check_netapp_volume age

Checks for volumes of a certain age.

Usage

$ check_netapp_volume age -H <host> [...] [--help]

Description

The function check_netapp_volume age checks for volumes that are too old or too young based on the creation time.

Important Parameters

  • --warning / --critical: Thresholds for the age. Can be set in seconds (s), minutes (min), hours (h), days (d) or weeks (w). E.g. --warning=7d is the same as --warning=1w. Months and years are not supported because their duration is not clear. See also Durations.
  • --comparison: Defaults to gt ( greater than, here in the sense of »older than«). Switching to lt (less than) can be used to invert the logic and check for newly created volumes.
  • --include / --exclude: Include or exclude volumes based on their name (or parts of it).

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

Examples

$ check_netapp_volume age -H filer --warning=52w --critical=104w
NETAPP VOLUME AGE CRITICAL - 65 volumes checked, 3 CRITICAL, 5 WARNING
pd-na-01_nas.testesx_datastore: 5.2 year (CRITICAL)
pd-na-02_nas.homevol: 5.2 year (CRITICAL)
pd-na-01_nas.DMZVM_Datastore: 5.2 year (CRITICAL)
fs.trident_pvfc: 1.8 year (WARNING)
fs.k8s2boot_vol: 2.0 year (WARNING)
fs.k8stest: 2.0 year (WARNING)
fs.k8s1boot_vol: 2.0 year (WARNING)
fs.k8aaSdatastore: 2.0 year (WARNING)
prod-na-02_nas.flexgroup_test: 49.5 week
pd-na-01_iscsi.prod_esxi_01: 31.8 week
pd-na-01_iscsi.prod_esxi_08: 31.8 week
pd-na-01_iscsi.prod_esxi_09: 31.8 week
…

Checks the filer for volumes, which are older than one (warning) or even two (critical) years.


$ check_netapp_volume age -H filer --warning=1w --critical=0 --comparison=lt
NETAPP VOLUME AGE CRITICAL - 42 volumes checked, 3 WARNING
pgd-na-01_sani.datastore: 1.4 hour (WARNING)
pgd-na-01_sani.datastore: 1 day (WARNING)
pgd-na-02_sani.home: 2.3 day (WARNING)
pgd-na-01_sani.Datastore: 5.2 week 
fgs.trident_: 1.8 year 
fgs.k8s2boot_vol: 2.0 year 
…

Checks the filer for volumes created within the last 7 days and sends a warning if at least one such volume is found.