Module: check_mk
Branch: master
Commit: 8c77cf30582627cd1f839f26e3e9691608a15c19
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8c77cf30582627…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri May 29 14:28:52 2015 +0200
#2282 FIX mkeventd: fixed exception in notification if the application field of the event
was not set
Events without an properly set <i>application</i> field were not processed
correctly
by the Check_MK notification module. By nature, all events from the event console
are always considered as service events. If the <i>application</i> field is
empty
the event was processed as host event, which lead to an exception.
---
.werks/2282 | 13 +++++++++++++
ChangeLog | 1 +
mkeventd/bin/mkeventd | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/2282 b/.werks/2282
new file mode 100644
index 0000000..0462a12
--- /dev/null
+++ b/.werks/2282
@@ -0,0 +1,13 @@
+Title: mkeventd: fixed exception in notification if the application field of the event
was not set
+Level: 2
+Component: ec
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1432902248
+
+Events without an properly set <i>application</i> field were not processed
correctly
+by the Check_MK notification module. By nature, all events from the event console
+are always considered as service events. If the <i>application</i> field is
empty
+the event was processed as host event, which lead to an exception.
diff --git a/ChangeLog b/ChangeLog
index c806a6b..403ea87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -582,6 +582,7 @@
* 2139 FIX: Fix exception in Event Console when archiving events with match groups
and non ASCII characters
* 2151 FIX: Fixed wrong time in events when forwarding logwatch to EC between
timezones...
* 2281 FIX: mkeventd: fix: now able to create notifications with events containing
umlauts...
+ * 2282 FIX: mkeventd: fixed exception in notification if the application field of the
event was not set...
Livestatus:
* 2229 Do not fail on non-existing Livestatus columns any longer, output None or null
instead...
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index b2bd1be..f6766e3 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -3262,7 +3262,7 @@ def do_notify(event, username, is_cancelling):
"SERVICEACKCOMMENT": "",
"SERVICEATTEMPT": "1",
"SERVICECHECKCOMMAND": "ec-rule-" +
event["rule_id"],
- "SERVICEDESC": event["application"],
+ "SERVICEDESC": event["application"] or
"Unset",
"SERVICENOTIFICATIONNUMBER": "1",
"SERVICEOUTPUT": event["text"],
"SERVICEPERFDATA": "",