1
0
mirror of https://github.com/ranl/monitor-utils.git synced 2024-12-22 13:33:43 +01:00

Better filter for listing available volumes.

This commit is contained in:
Michal Svamberg 2015-05-31 12:48:27 +02:00
parent 2e0becac93
commit 3c7ca48037

View File

@ -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}"
}
}