Logfile Pattern Rules crash with non-ascii characters (german umlauts)


new to the forum and checkmk. We just setup checkmk enterprise standard 1.6.0p17 in our network and so far we’re super happy. Only issue we’ve been facing so far is with the log file pattern rules. If they contain german umlauts (ä,ö,ü) the rule crashes with the following error (output of rule analyzer)

Internal error: ‘ascii’ codec can’t decode byte 0xc3 in position 320: ordinal not in range(128)

Log message for reference:
Oct 13 12:46:21 34305.4098 Group_Policy_Printers Das Benutzer “Canon 5. Stock PCL6”-Einstellungselement im Gruppenrichtlinienobjekt “Default Domain Policy {31B2F340-016D-11D2-945F-00C04FB984F9}” wurde aufgrund eines Fehlers nicht angewendet. Fehlercode: “0x800706ba Der RPC-Server ist nicht verfügbar.”%100790273.

“verfügbar” is the triggering word in this example.

Edit: matching rule is as follows.
Match: .*

The character position always points to the location of the first umlaut in the log entry. Any ideas what to do here or should I report it to checkmk as a bug?


Found a workaround (thanks to Mr. Schuran from schuran.it)

  • match only part of the log entry that doesn’t include the umlauts, e.g.

match: 34305.4098
instead of .*

Seems to work for now.

Trouble is with special characters in the pattern, not in the logs, right?
Then as you said, as a workaround strip down the pattern to avoid the problematic characters. Perhaps replace just that single Umlaut with a “.” (regexp special for “any character”): “verf.gbar”. So the pattern is still somewhat readable for the monitoring admin.

I haven’t tried to reproduce that issue myself, but yes, that sounds like a bug which should probably be reported.

on second thoughts: not sure if replacing with a single dot will work in all circumstances, e.g. two byte encoding.

Thanks for your response, the problem is not in the rules string but the match. So verf.gbar should throw the same error, since .* throws one as well. I think the workaround works in this case, since the pattern rule matches part of the log that doesn’t include umlauts. Otherwise .* wouldn’t throw the error.

How should I best report this issue?

According to https://checkmk.com/contact.php, you could send e-mail to feedback@checkmk.com


1 Like