Module: check_mk
Branch: master
Commit: 33f287dfd490c0a4a9d59aaf6088c7776386e7b7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=33f287dfd490c0…
Author: Roland Halbig <rh(a)mathias-kettner.de>
Date: Thu Dec 15 11:00:49 2016 +0100
htmllib: Corrected test file.
Change-Id: I7036feaf0bf17b654238ad547febf255b8a96f21
---
tests/web/test_html.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/web/test_html.py b/tests/web/test_html.py
index f2eb8a6..1d41741 100644
--- a/tests/web/test_html.py
+++ b/tests/web/test_html.py
@@ -52,7 +52,7 @@ def test_class_HTML():
assert len(B) == len(b)
assert unicode(B) == unicode(b)
-
+ assert "1" + B + "2" + C == "1" + b + "2" + c
assert (A + B) == (a + b)
assert HTML().join([A, B]) == A + B
@@ -101,9 +101,9 @@ def test_class_HTML():
assert HTML(A) == A, "%s %s" % (HTML(A), A)
assert HTML(a) == A, "%s %s" % (HTML(a), A)
- assert (A < B) == (a < b), "%s %s" % (A < B, a < b)
-
- assert (A > B) == (a > b)
+ # Not supported any more!
+ # assert (A < B) == (a < b), "%s %s" % (A < B, a < b)
+ # assert (A > B) == (a > b)
assert A != B
Module: check_mk
Branch: master
Commit: da78acd34914ad09f561e1e304cb321f77dc50e5
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=da78acd34914ad…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 14 15:29:15 2016 +0100
4149 FIX Fix notifications from Event Console if host has more than one contact
Notifications from the Event Console would never be sent if the
contact information had to be fetched from the host (not coded in
the rule itself) and the host had more than one contact.
Change-Id: I227649bcc62934b6637ef51b00c11ead8727efe1
---
.werks/4149 | 11 +++++++++++
ChangeLog | 1 +
bin/mkeventd | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/4149 b/.werks/4149
new file mode 100644
index 0000000..4ee2ae2
--- /dev/null
+++ b/.werks/4149
@@ -0,0 +1,11 @@
+Title: Fix notifications from Event Console if host has more than one contact
+Level: 2
+Component: ec
+Compatible: compat
+Version: 1.4.0i3
+Date: 1481725686
+Class: fix
+
+Notifications from the Event Console would never be sent if the
+contact information had to be fetched from the host (not coded in
+the rule itself) and the host had more than one contact.
diff --git a/ChangeLog b/ChangeLog
index 34f6ee7..963671d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -132,6 +132,7 @@
* 4148 EC: reorder entries in Performance snapin, add overflows and load
* 4097 FIX: Event console: Make writing of status file more robust...
* 4147 FIX: Always show rule analyser result on Generate, not only after previous Try out...
+ * 4149 FIX: Fix notifications from Event Console if host has more than one contact...
Livestatus:
* 3651 FIX: Fixed potential segfault with Nagios core when accessing log/commands table via Livestatus....
diff --git a/bin/mkeventd b/bin/mkeventd
index 4e85f67..38c5ac2 100755
--- a/bin/mkeventd
+++ b/bin/mkeventd
@@ -4029,7 +4029,7 @@ def add_rbn_contact_information(context, host, contact_groups, contact_groups_no
verbose(" Using these groups: %r" % groups)
context.update({
- "CONTACTS" : " ".join(contacts),
+ "CONTACTS" : ",".join(contacts),
"CONTACTNAME" : "check-mk-notify",
"SERVICECONTACTGROUPNAMES" : ",".join(groups),
})
Module: check_mk
Branch: master
Commit: d15566ff7cac093b4c4e694881f978f439ac6d61
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d15566ff7cac09…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 14 15:32:19 2016 +0100
Added some inline comments
Change-Id: Ib7387b397c50b816cc27cda6809ef4015d17996a
---
bin/mkeventd | 3 +++
1 file changed, 3 insertions(+)
diff --git a/bin/mkeventd b/bin/mkeventd
index 38c5ac2..58f8147 100755
--- a/bin/mkeventd
+++ b/bin/mkeventd
@@ -4066,7 +4066,10 @@ def fetch_contacts_of_group_from_livestatus(group_name):
return None # No group match or other failure
+# None, None -> Host could not be found
+# [], [] -> Host found but has no contacts/contactgroups
def fetch_contacts_and_groups_of_host_from_livestatus(host):
+ # TODO: Matching von Hostnamen muss identisch sein zu dem im CMC
try:
answer = livestatus_query("GET hosts\nFilter: host_name = %s\n"
"Columns: contacts contact_groups\nOutputFormat: python\n" % host)
Module: check_mk
Branch: master
Commit: 7a2cfabdeb0788a2205b754293e10828983c2ce6
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7a2cfabdeb0788…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 14 14:43:11 2016 +0100
EC: fix descriptive texts in ValueSpec of overflow configuration
Change-Id: Id250185e3b5a9bdc864c91fc290671664c3dda45
---
web/plugins/wato/mkeventd.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/web/plugins/wato/mkeventd.py b/web/plugins/wato/mkeventd.py
index a21b1fa..b3b95b6 100644
--- a/web/plugins/wato/mkeventd.py
+++ b/web/plugins/wato/mkeventd.py
@@ -2496,12 +2496,12 @@ if mkeventd_enabled:
default_value = 1000,
unit = _("open events"),
)),
- ("action", vs_ec_event_limit_actions("notify all contacts")),
+ ("action", vs_ec_event_limit_actions("notify contacts of the host")),
],
optional_keys = [],
)),
("by_rule", Dictionary(
- title = _("Host limit"),
+ title = _("Rule limit"),
help = _("You can limit the number of open events created by a single "
"rule here. This is meant to "
"prevent you from too generous rules creating a lot of events.<br>"
@@ -2518,7 +2518,7 @@ if mkeventd_enabled:
default_value = 1000,
unit = _("open events"),
)),
- ("action", vs_ec_event_limit_actions("notify all rule contacts or without contact info")),
+ ("action", vs_ec_event_limit_actions("notify contacts in rule or fallback contacts")),
],
optional_keys = [],
)),
@@ -2538,7 +2538,7 @@ if mkeventd_enabled:
default_value = 10000,
unit = _("open events"),
)),
- ("action", vs_ec_event_limit_actions("notify without contact info")),
+ ("action", vs_ec_event_limit_actions("notify all fallback contacts")),
],
optional_keys = [],
)),