From 3c7ca480371591265fe39f8262896137a9d07232 Mon Sep 17 00:00:00 2001 From: Michal Svamberg Date: Sun, 31 May 2015 12:48:27 +0200 Subject: [PATCH] Better filter for listing available volumes. --- nagios/check-netapp-ng.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nagios/check-netapp-ng.pl b/nagios/check-netapp-ng.pl index 30df651..ec38118 100755 --- a/nagios/check-netapp-ng.pl +++ b/nagios/check-netapp-ng.pl @@ -731,7 +731,7 @@ if("$opt{'check_type'}" eq "TEMP") { $stat = $ERRORS{'WARNING'}; $msg = "WARN: Unknown volume path or aggregate name '$opt{'vol'}'. Available values:"; foreach my $key (sort keys %$r_vol_tbl) { - next if $$r_vol_tbl{$key} =~ m#.*/\.snapshot$#; + next if ( !( ($$r_vol_tbl{$key} =~ m#^/vol/.*/$#) or ($$r_vol_tbl{$key} =~ m#^[^/]*$#) ) ); $msg .= " $$r_vol_tbl{$key}" } }