summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2013-09-20 15:35:32 +0200
committerDaniel Friesel <derf@finalrewind.org>2013-09-20 15:35:32 +0200
commit911dcb84a5e72ad9a38278e2b5a1101dfbe4684f (patch)
tree618ca46979e042cc51f53f17f702b927c55a1a6c
parent90f622b421db1cd2b14f59ba4313f55561e801e9 (diff)
add p filter, fix !o matching pending services
-rw-r--r--Changelog5
-rwxr-xr-xbin/icli8
2 files changed, 12 insertions, 1 deletions
diff --git a/Changelog b/Changelog
index 9751786..cfe4473 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,8 @@
+git HEAD
+
+ * Fix !o filter not matching pending services
+ * Add p filter (pending hosts/services)
+
icli 0.45 - Tue Sep 17 2013
* Fix --filter N and --filter !N
diff --git a/bin/icli b/bin/icli
index a26f0a8..ddf295d 100755
--- a/bin/icli
+++ b/bin/icli
@@ -240,8 +240,10 @@ sub filter_generic {
or ( $f eq '!P' and $x->{'active_checks_enabled'} )
or ( $f eq 'S' and check_is_soft($x) )
or ( $f eq '!S' and not check_is_soft($x) )
+ or ( $f eq 'p' and $x->{'has_been_checked'} == 0 )
+ or ( $f eq '!p' and $x->{'has_been_checked'} != 0 )
or ( $f eq 'o' and $x->{'current_state'} == 0 )
- or ( $f eq '!o' and $x->{'current_state'} != 0 )
+ or ( $f eq '!o' and($x->{'current_state'} != 0 or $x->{'has_been_checked'} == 0) )
or ( $f eq 'w' and $x->{'current_state'} == 1 )
or ( $f eq '!w' and $x->{'current_state'} != 1 )
or ( $f eq 'c' and $x->{'current_state'} == 2 )
@@ -1249,6 +1251,10 @@ Service state is Critical
Service state is Unknown
+=item B<p>
+
+Host or service state is Pending
+
=item B<d>
Host state is Down