summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2010-11-19 15:45:55 +0100
committerDaniel Friesel <derf@finalrewind.org>2010-11-19 15:45:55 +0100
commit557652d2418eca2629424401a97be536f2127549 (patch)
tree4ab6f6c14a661aae59e11252d17533b90c10c1f1
parent226d3f5deb80ff1f0d4decae2642f5dd71ce0405 (diff)
Make filters apply to rechecks as well
-rwxr-xr-xbin/icli10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/icli b/bin/icli
index 2fff1e9..e09ac9e 100755
--- a/bin/icli
+++ b/bin/icli
@@ -511,10 +511,18 @@ elsif ($list_type eq 'd') {
}
}
elsif ($recheck) {
+
foreach my $host (@list_hosts) {
- if (not @list_services) {
+ if (not @list_services and not @filters) {
recheck_host_all($host);
}
+ elsif (not @list_services and @filters) {
+ foreach my $service (
+ grep { filter_service($_) }
+ @{$data->{'services'}->{$host}} ) {
+ recheck_service($host, $service->{'service_description'});
+ }
+ }
else {
foreach my $service (@list_services) {
recheck_service($host, $service);