Module: check_mk
Branch: master
Commit: 847a30a853c87c16242e081a822573aa075e3642
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=847a30a853c87c…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Nov 7 10:18:05 2012 +0100
Update WATO rule for new option -a for check_mkevents
---
mkeventd/checks/check_mkevents | 2 ++
mkeventd/web/plugins/wato/mkeventd.py | 12 +++++++++++-
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/mkeventd/checks/check_mkevents b/mkeventd/checks/check_mkevents
index 10a5bca..3f54b74 100644
--- a/mkeventd/checks/check_mkevents
+++ b/mkeventd/checks/check_mkevents
@@ -5,6 +5,8 @@ def check_mkevents_arguments(params):
args = ""
if "remote" in params:
args += "-H %s:%d " % (params["remote"])
+ if params.get("ignore_acknowledged"):
+ args += "-a "
args += params.get("hostspec", "$HOSTADDRESS$")
if "application" in params:
args += " " + quote_shell_string(params["application"])
diff --git a/mkeventd/web/plugins/wato/mkeventd.py
b/mkeventd/web/plugins/wato/mkeventd.py
index 3269f03..6395413 100644
--- a/mkeventd/web/plugins/wato/mkeventd.py
+++ b/mkeventd/web/plugins/wato/mkeventd.py
@@ -1425,6 +1425,16 @@ register_rule(
allow_empty = False,
)
),
+ ( "ignore_acknowledged",
+ FixedValue(
+ True,
+ title = _("Ignore Acknowledged Events"),
+ help = _("If you check this box then only open events are honored
when "
+ "determining the event state. Acknowledged events are
displayed "
+ "(i.e. their count) but not taken into account."),
+ totext = _("acknowledged events will not be honored"),
+ )
+ ),
( "remote",
Tuple(
elements = [
@@ -1447,7 +1457,7 @@ register_rule(
)
),
],
- optional_keys = [ "application", "remote" ],
+ optional_keys = [ "application", "remote",
"ignore_acknowledged" ],
),
match = 'all',
)