Werk #22280: Configuration files must define the variables they extend
| Component | Setup | ||
| Title | Configuration files must define the variables they extend | ||
| Date | Oct 12, 2026 | ||
| Level | Trivial Change | ||
| Class | New Feature | ||
| Compatibility | Compatible - no manual interaction needed | ||
| Checkmk versions & editions |
|
Checkmk executes main.mk, the files below etc/check_mk/conf.d, final.mk and local.mk in a namespace where every configuration variable was predefined with its default.
That is why a hand-written file could extend a variable without ever defining it, for example
C+: host_tags.update({"myhost": {"criticality": "prod"}}) extra_nagios_conf += "define command { ... }" C-:
Checkmk 3.1 will stop predefining these variables: every file must define what it extends itself.
It cannot rely on another file, such as main.mk, to define it.
A file that extends a variable whose default is not empty, such as alert_handler_event_types += ["checkresult"], adds to the default in 3.0, but would replace it in 3.1.
Such a file must assign the complete value instead, here alert_handler_event_types = ["statechange", "checkresult"].
Checkmk 3.0 prepares the change.
All files Checkmk writes itself already do so, and cmk-update-config rewrites the ones written by earlier versions when you update to 3.0.
To help you find them, cmk-update-config loads each of your configuration files on its own, without predefined variables, and lists every file that fails to load, with its error. It also lists every file that relies on the default of a variable it extends, with the variables. In 3.0 this is a warning only; the update and the site continue to work. From 3.1 on, such a file makes the update fail.