diff --git a/nagios/check-netapp-ng.pl b/nagios/check-netapp-ng.pl index cb72d8c..e39f3c4 100755 --- a/nagios/check-netapp-ng.pl +++ b/nagios/check-netapp-ng.pl @@ -19,7 +19,7 @@ ## 20160211 : Added FSSTATUS/SNAPSHOTAGE ## ## the following parameters has -## been tested against a +## been tested against a ## FAS2220 ## FAS2240 ## FAS3220 @@ -348,7 +348,7 @@ This is $script_name in version $script_version. -t Timeout to SNMP session in seconds (default 5) -w Warning Value (default 500) -c Critical Value (default 500) - -v Volume Name in format /vol/volname/ + -v Volume Name in format /vol/volname or aggregate name (not available in 7.x ONTAP) For available values use any word, such as \'-v whatever\' -e Exclude volumes from snap check (SNAPSHOT/SNAPSHOTAGE) @@ -510,8 +510,8 @@ FSyntaxError("Missing -H") unless defined $opt{'filer'}; FSyntaxError("Missing -C") unless defined $opt{'community'}; FSyntaxError("Missing -T") unless defined $opt{'check_type'}; if($opt{'vol'}) { - if ( !( ($opt{'vol'} =~ m#^/vol/.*/$#) or ($opt{'vol'} =~ m#^[^/]*$#) ) ) { - FSyntaxError("$opt{'vol'} format is '/vol/volname/' or 'aggregate_name'! For listing available names use any text such as '-v whatever'."); + if ( !( ($opt{'vol'} =~ m#^/vol/.*$#) or ($opt{'vol'} =~ m#^[^/]*$#) ) ) { + FSyntaxError("$opt{'vol'} format is '/vol/volname' or 'aggregate_name'! For listing available names use any text such as '-v whatever'."); } } if($opt{'crit'} and $opt{'warn'}) {