7335 FIX Fixed broken regex based hostname translation in ECv1.5.0p14
commite0f387cbf6bbc33a4516acb8e0bfd3b62b1d4b24
authorLars Michelsen <lm@mathias-kettner.de>
Tue, 9 Apr 2019 10:31:16 +0000 (9 12:31 +0200)
committerLars Michelsen <lm@mathias-kettner.de>
Tue, 9 Apr 2019 12:09:42 +0000 (9 14:09 +0200)
tree14338c42e755d1ee6ac9adc4b0c9acdfc32642c5
parent8fecc041f8a6a2ed7a6a98e55288a45f2cea5430
7335 FIX Fixed broken regex based hostname translation in EC

The hostname translation of the EC was broken since release of
Check_MK 1.4.0 (caused by #3687). This issue lead to dropped events
once the translation has been condifgured. The problem was visible
in the mkeventd.log in the following form:

C+:
 2019-04-04 11:36:24,286 [40] [cmk.mkeventd.EventServer] Unable to parse host "HOST" ('tuple' object has no attribute 'endswith')
Traceback (most recent call last):
  File "/omd/sites/snmp/lib/python/cmk/ec/main.py", line 2787, in do_translate_hostname
    event["host"] = self.translate_hostname(event["host"])
  File "/omd/sites/snmp/lib/python/cmk/ec/main.py", line 2768, in translate_hostname
    if not regex.endswith('$'):
AttributeError: 'tuple' object has no attribute 'endswith'
C-:

Change-Id: I5d8b8dee696c02ac29d8118e66104338b91fbdea
.werks/7335 [new file with mode: 0644]
cmk/ec/export.py
cmk/ec/main.py