From 099659a14078ef423bd1e70ec8a8416bf603b775 Mon Sep 17 00:00:00 2001 From: Josh Malone <48kRAM@users.noreply.github.com> Date: Wed, 6 May 2020 10:58:35 -0400 Subject: [PATCH 1/4] Add examples of using percent and byte thresholds --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index b142e19..3f15fab 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,11 @@ Copy `check_netapp_ontap.pl` script to your nagios libexec folder and configure Check the space and inode health of a vServer volume on a NetApp Ontap cluster. If space % and space in *B are both defined the smaller value of the two will be used when deciding if the volume is in a warning or critical state. This allows you to accomodate large volume monitoring better. thresh: space % used, space in *B (i.e MB) remaining, inode count remaining, inode % used (Usage example: 80%i), “offline” keyword node: The node option restricts this check by vserver name. +* Examples + * `-w 80%` - Warn if volume grows more than 80% full + * `-w 100GB` - Warn if volume has less than 100GB free space + * `-w 80%,50GB` - Warn if volume is more than 80% used *and* has less than 50GB free space + **aggregate_health** Check the space and inode health of a cluster aggregate on a NetApp Ontap cluster. If space % and space in *B are both defined the smaller value of the two will be used when deciding if the volume is in a warning or critical state. This allows you to better accomodate large aggregate monitoring. thresh: space % used, space in *B (i.e MB) remaining, inode count remaining, inode % used (Usage example: 80%i), “offline” keyword, “is-home” keyword node: The node option restricts this check by cluster-node name. From 7cd69aeb1243b5396645e46247a9c222d320711e Mon Sep 17 00:00:00 2001 From: Josh Malone <48kRAM@users.noreply.github.com> Date: Wed, 6 May 2020 11:02:59 -0400 Subject: [PATCH 2/4] Don't warn experimental on old perl versions The 'no warnings' experimental for smartmatch is only needed on older perl versions. Otherwise it causes issues. --- check_netapp_ontap.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_netapp_ontap.pl b/check_netapp_ontap.pl index 42defd6..ef4101a 100644 --- a/check_netapp_ontap.pl +++ b/check_netapp_ontap.pl @@ -24,8 +24,8 @@ use Getopt::Long; use POSIX; -# do not show smartmatch warnings -no warnings 'experimental::smartmatch'; +# do not show smartmatch warnings on older perl versions +no if $] >= 5.017011, warnings => 'experimental::smartmatch'; my $verbose = undef; my $debug = undef; From b09f72c2f19e6a23a201fabebf32e4a9d55b6841 Mon Sep 17 00:00:00 2001 From: Josh Malone <48kRAM@users.noreply.github.com> Date: Wed, 6 May 2020 11:07:24 -0400 Subject: [PATCH 3/4] Note use of comma in space thresholds Add note indicating that multiple space thresholds (e.g., % and *B) should be separated with a comma. --- check_netapp_ontap.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/check_netapp_ontap.pl b/check_netapp_ontap.pl index ef4101a..059580a 100644 --- a/check_netapp_ontap.pl +++ b/check_netapp_ontap.pl @@ -1898,17 +1898,17 @@ sub help { ===OPTION LIST=== volume_health - desc: Check the space and inode health of a vServer volume. If space % and space in *B are both defined the smaller value of the two will be used when deciding if the volume is in a warning or critical state. This allows you to better accomodate large volume monitoring. + desc: Check the space and inode health of a vServer volume. If space % and space in *B are both defined the smaller value of the two will be used when deciding if the volume is in a warning or critical state. This allows you to better accomodate large volume monitoring. Separate values with comma. thresh: Space % used, space in *B (i.e MB) remaining, inode count remaining, inode % used (Usage example: 80%i), "offline" keyword. node: The node option restricts this check by vserver name. aggregate_health - desc: Check the space and inode health of a cluster aggregate. If space % and space in *B are both defined the smaller value of the two will be used when deciding if the volume is in a warning or critical state. This allows you to better accomodate large aggregate monitoring. + desc: Check the space and inode health of a cluster aggregate. If space % and space in *B are both defined the smaller value of the two will be used when deciding if the volume is in a warning or critical state. This allows you to better accomodate large aggregate monitoring. Separate values with comma. thresh: Space % used, space in *B (i.e MB) remaining, inode count remaining, inode % used (Usage example: 80%i), "offline" keyword, "is-home" keyword. node: The node option restricts this check by cluster-node name. snapshot_health - desc: Check the space and inode health of a vServer snapshot. If space % and space in *B are both defined the smaller value of the two will be used when deciding if the volume is in a warning or critical state. This allows you to better accomodate large snapshot monitoring. + desc: Check the space and inode health of a vServer snapshot. If space % and space in *B are both defined the smaller value of the two will be used when deciding if the volume is in a warning or critical state. This allows you to better accomodate large snapshot monitoring. Separate values with comma. thresh: Space % used, space in *B (i.e MB) remaining, inode count remaining, inode % used (Usage example: 80%i), "offline" keyword. node: The node option restricts this check by vserver name. From 291b6501ea9a13e4f68013549e4e629132aab847 Mon Sep 17 00:00:00 2001 From: Josh Malone <48kRAM@users.noreply.github.com> Date: Wed, 6 May 2020 11:08:26 -0400 Subject: [PATCH 4/4] Fix typo in help text Remove extra 'n' in clusternode_health. Thanks bb-Ricardo --- check_netapp_ontap.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_netapp_ontap.pl b/check_netapp_ontap.pl index 059580a..4b7cbc3 100644 --- a/check_netapp_ontap.pl +++ b/check_netapp_ontap.pl @@ -1954,7 +1954,7 @@ sub help { thresh: N/A not customizable. node: The node option restricts this check by cluster-node name. -clusternnode_health +clusternode_health desc: Check the cluster-nodes for unhealthy conditions thresh: N/A not customizable. node: The node option restricts this check by cluster-node name.