Module: check_mk
Branch: master
Commit: c7bc6877f365bf7fbd3148a05c96f41218349176
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c7bc6877f365bf…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Feb 11 11:15:35 2016 +0100
fixed broken logwatch.ec EC forwarding. result of #2903
---
mkeventd/bin/mkeventd | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index dbfb787..e934e0b 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -2265,17 +2265,13 @@ class EventServer:
event["facility"] = 1 # user
event["priority"] = 5 # notice
- # Variant 7
+ # Variant 7 and 7a
if line[0] == '@' and line[11] in [ ' ', ';' ]:
- if line[11] == ' ':
- # Variant 7
- timestamp, event['host'], line = line.split(' ', 2)
- else:
- # Variant 7a
- details, event['host'], line = line.split(' ', 2)
- timestamp, sl = details.split(';', 1)
- event["sl"] = int(sl)
-
+ details, event['host'], line = line.split(' ', 2)
+ detail_tokens = details.split(';')
+ timestamp = detail_tokens[0]
+ if len(detail_tokens) > 1:
+ event["sl"] = int(detail_tokens[1])
event['time'] = float(timestamp[1:])
event.update(self.parse_syslog_info(line))