Module: check_mk
Branch: master
Commit: 5e135bb079c808321eadc7920b98a641bb1a5550
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5e135bb079c808…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 4 13:46:43 2014 +0100
#1643 FIX Improved error handling of exceptions when processing log lines
---
.werks/1643 | 9 +++++++++
ChangeLog | 1 +
mkeventd/bin/mkeventd | 5 ++++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/1643 b/.werks/1643
new file mode 100644
index 0000000..42d4d35
--- /dev/null
+++ b/.werks/1643
@@ -0,0 +1,9 @@
+Title: Improved error handling of exceptions when processing log lines
+Level: 1
+Component: ec
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417697183
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 20b59d6..c97f8b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -192,6 +192,7 @@
* 1169 Added host state type filter to "recent event history" view
* 1531 FIX: Fixed exception in event history view when displaying CHANGESTATE events
* 1610 FIX: Hostname translation now also works for incoming SNMP traps
+ * 1643 FIX: Improved error handling of exceptions when processing log lines
Livestatus:
* 1613 FIX: Fixed invalid json format in Stats query with requested heaeders...
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index 8e8a53c..1850ece 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -1337,7 +1337,10 @@ class EventServer:
line = line.decode("latin-1")
if line:
- self.process_raw_data(self.process_line, (line, address))
+ try:
+ self.process_raw_data(self.process_line, (line, address))
+ except Exception, e:
+ log('Exception handling a log line (skipping this one): %s' %
format_exception())
def do_housekeeping(self):
with lock_eventstatus: