Werk #304: Escaping several unwanted chars from incoming log messages

Komponente Event Console
Titel Escaping several unwanted chars from incoming log messages
Datum 09.12.2013
Checkmk Edition Checkmk Raw (CRE)
Checkmk-Version 1.2.5i1
Level Kleine Änderung
Klasse Bugfix
Kompatibilität Kompatibel - benötigt kein manuelles Eingreifen

There are several kind of chars which are not wanted to be included in log messages. For example the null byte is nothing to be expected in log messages. We simply remove those chars now from the log messages.

Single log lines do not contain new line chars (\n), since they are already processed as single lines. But snmp traps might contain those chars, which might break e.g. processing the log history (resulting in error messages "Invalid line XX in history file..."). The newline chars are now simply removed from the incoming data. This might change incoming values, but this seems to be better than before. In future, when trap the parsing/processing code is extended by single value matching etc., we might be able to clean this up.

Zur Liste aller Werks