--- a/check Sat Jan 11 17:25:56 2014 +0100
+++ b/check Sat Jan 11 23:23:45 2014 +0100
@@ -79,7 +79,7 @@
eval { amchecks @confs } or critical $@;
- my @dles = eval { amlists @confs } or critical $@;
+ my @dles = eval { amlists confs => \@confs, ignore => \@opt_ignore } or critical $@;
ok 'config: ' . join(', ', @confs), @dles;
# never reached
@@ -214,7 +214,10 @@
}
sub amlists {
- my @confs = @_;
+ my %arg = @_;
+ my @confs = @{$arg{confs}} or croak 'missing list of confs';
+ my @ignore = @{$arg{ignore}};
+
my @candidates = get_devices;
my %missing;
@@ -227,7 +230,8 @@
# the disklist, or the device id is found
$candidate->[0] ~~ [map { $_->[0] } @dles] and next;
$candidate->[1] ~~ [map { $_->[1] } @dles] and next;
- push @{ $missing{$conf} }, $candidate->[0];
+ push @{ $missing{$conf} }, $candidate->[0]
+ if not "$conf:$candidate->[0]" ~~ @ignore;
}
}
die map { "$_ missing: " . join(', ' => @{ $missing{$_} }) . "\n" }
@@ -250,6 +254,7 @@
=head1 SYNOPSIS
check_amanda-client [-h|--help] [-m|--man]
+ check_amanda-client [options]
=head1 DESCRIPTION
@@ -259,9 +264,11 @@
=over
-=item B<-i>|B<--ignore> I<filesystem>
+=item B<-i>|B<--ignore> I<config:filesystem>
-The name of a filesystem to be ignored.
+The name of a filesystem to be ignored. Example:
+
+ check_amanda-client --ignore weekly:/var/spool/squid --ignore daily:/boot
=item B<-h>|B<--help>