Werk #7489: mk_logwatch: optimize regex search
Komponente | Checks & agents |
Titel | mk_logwatch: optimize regex search |
Datum | 25.06.2019 |
Checkmk Edition | Checkmk Raw (CRE) |
Checkmk-Version | 1.6.0b3 2.0.0i1 |
Level | Kleine Änderung |
Klasse | Neues Feature |
Kompatibilität | Kompatibel - benötigt kein manuelles Eingreifen |
For regular expressions in a logwatch section leading or trailing '.' portions can be a performance desaster. With long log lines, it can virtually render your system paralyzed. If you are not using any rewrite patterns though, you can omit leading and trailing '.' expressions without changing the set of matched lines.
mk_logwatch now detects those cases, and will optimize the patterns accordingly.