summaryrefslogtreecommitdiff
path: root/bin/icli
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2010-11-18 23:37:22 +0100
committerDaniel Friesel <derf@finalrewind.org>2010-11-18 23:37:22 +0100
commitd388b41eb9947f527e6ef67f08c4334ae9027eaa (patch)
treefc1557fafdd5c3d021ab13d63f154b7bfc077711 /bin/icli
parent5264f6ecbf7638cb7a498ba9f18e481b9cdf4c80 (diff)
More filters based on service state
Diffstat (limited to 'bin/icli')
-rwxr-xr-xbin/icli14
1 files changed, 13 insertions, 1 deletions
diff --git a/bin/icli b/bin/icli
index 0a40f94..6ec8042 100755
--- a/bin/icli
+++ b/bin/icli
@@ -89,7 +89,19 @@ sub filter_generic {
($f eq '!F' and not $x->{'is_flapping'}) or
($f eq 'P' and $x->{'passive_checks_enabled'}
and not $x->{'active_checks_enabled'}) or
- ($f eq '!P' and $x->{'active_checks_enabled'})
+ ($f eq '!P' and $x->{'active_checks_enabled'}) or
+ ($f eq 'o' and $x->{'current_state'} == 0) or
+ ($f eq '!o' and $x->{'current_state'} != 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) or
+ ($f eq '!c' and $x->{'current_state'} != 2) or
+ ($f eq 'u' and $x->{'current_state'} == 3) or
+ ($f eq '!u' and $x->{'current_state'} != 3) or
+ ($f eq 'd' and $x->{'current_state'} == 2) or
+ ($f eq '!d' and $x->{'current_state'} != 2) or
+
+ 0 # Terminator to ease adding new lines
) {
$filters_unfulfilled--;
}