mk_logwatch: Always process the last log line, even if it does not end with an end-of-line character
Ensure that mk_logwatch processes the final log line, even when it ends with with end‑of‑file (EOF) instead of an end‑of‑line (EOL).
On Windows, files are not required to end with an EOL. Because mk_logwatch intentionally ignores lines without an EOL, the final log entry is often not processed or only handled once new lines are added, leading to missed or delayed alerts.
Explanation from Checkmk:
Lines that do not end with an EOL are treated as incomplete, as they may contain only part of the actual log entry. Processing such partial data can result in confusing alerts or inaccurate monitoring outcomes. Therfor they are ignored
Determining whether the final line is complete is straightforward: if it remains unchanged for a defined period, it can be considered finished and processed. At the latest, mk_logwatch should handle the final line during the next check interval, even if it ends with EOF rather than EOL, to ensure that all log entries are reliably processed.