Module: check_mk
Branch: master
Commit: 3bedac95dba3fec5f6742aaa26bd1cb290c51b71
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3bedac95dba3fe…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Feb 13 10:46:24 2019 +0100
Made helper functions private
Change-Id: Ic72e6cd77411822c63211f50dcdd676d5734af75
---
cmk/ec/main.py | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/cmk/ec/main.py b/cmk/ec/main.py
index d5d2560..2fe1eee 100644
--- a/cmk/ec/main.py
+++ b/cmk/ec/main.py
@@ -2051,11 +2051,11 @@ class EventCreator(object):
if len(detail_tokens) > 1:
event["sl"] = int(detail_tokens[1])
event['time'] = float(timestamp[1:])
- event.update(self.parse_syslog_info(line))
+ event.update(self._parse_syslog_info(line))
# Variant 3
elif line.startswith("@"):
- event.update(self.parse_monitoring_info(line))
+ event.update(self._parse_monitoring_info(line))
# Variant 5
elif len(line) > 24 and line[10] == 'T':
@@ -2064,22 +2064,22 @@ class EventCreator(object):
# got a good solutuion for this.
rfc3339_part, event['host'], line = line.split(' ', 2)
event['time'] = time.mktime(time.strptime(rfc3339_part[:19],
'%Y-%m-%dT%H:%M:%S'))
- event.update(self.parse_syslog_info(line))
+ event.update(self._parse_syslog_info(line))
# Variant 9
elif len(line) > 24 and line[12] == "T":
- event.update(self.parse_rfc5424_syslog_info(line))
+ event.update(self._parse_rfc5424_syslog_info(line))
# Variant 8
elif line[10] == '-' and line[19] == ' ':
event['host'] = line.split(' ')[1]
event['time'] = time.mktime(time.strptime(line.split('
')[0], '%Y:%m:%d-%H:%M:%S'))
rest = " ".join(line.split(' ')[2:])
- event.update(self.parse_syslog_info(rest))
+ event.update(self._parse_syslog_info(rest))
# Variant 6
elif len(line.split(': ', 1)[0].split(' ')) == 1:
- event.update(self.parse_syslog_info(line))
+ event.update(self._parse_syslog_info(line))
# There is no datetime information in the message, use current time
event['time'] = time.time()
# There is no host information, use the provided address
@@ -2112,11 +2112,11 @@ class EventCreator(object):
# Variant 4
if rest.startswith("@"):
- event.update(self.parse_monitoring_info(rest))
+ event.update(self._parse_monitoring_info(rest))
# Variant 1, 2
else:
- event.update(self.parse_syslog_info(rest))
+ event.update(self._parse_syslog_info(rest))
month = EventServer.month_names[month_name]
day = int(day)
@@ -2162,7 +2162,7 @@ class EventCreator(object):
return event
- def parse_rfc5424_syslog_info(self, line):
+ def _parse_rfc5424_syslog_info(self, line):
event = {}
(_unused_version, timestamp, hostname, app_name, procid, _unused_msgid, rest) =
line.split(
@@ -2198,7 +2198,7 @@ class EventCreator(object):
return event
- def parse_syslog_info(self, line):
+ def _parse_syslog_info(self, line):
event = {}
# Replaced ":" by ": " here to make tags with ":"
possible. This
# is needed to process logs generated by windows agent logfiles
@@ -2217,7 +2217,7 @@ class EventCreator(object):
event["pid"] = pid
return event
- def parse_monitoring_info(self, line):
+ def _parse_monitoring_info(self, line):
event = {}
# line starts with '@'
if line[11] == ';':