Werk #22102: Redirect logging of cron-invoked maintenance jobs to log files
| Component | Core & setup | ||
| Title | Redirect logging of cron-invoked maintenance jobs to log files | ||
| Date | Aug 4, 2026 | ||
| Level | Trivial Change | ||
| Class | New Feature | ||
| Compatibility | Compatible - no manual interaction needed | ||
| Checkmk versions & editions |
|
The cmk command line interface logs to standard error.
Several site cron jobs invoke cmk (for example to update the DNS cache, ...).
So any log output produced by these jobs was picked up by cron and turned into mail.
The cmk command now understands a general --log-file PATH option.
When given, log output is written to the specified file with timestamps instead.
Crash reports of the cmk command are now routed through the logger as well.
The affected cron jobs shipped with the site now use this option and write to per-job files below var/log/cron/.
Like other log files, these are log-rotated.
Interactive invocations of cmk are unaffected and keep logging to standard error.