Werk #17755: Ignore empty CMC state files

Component The Checkmk Micro Core
Title Ignore empty CMC state files
Date Jun 17, 2025
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.5.0b1
Not yet released
Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.4.0p5 Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.3.0p35
Not yet released
Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

When the state file of the CMC ends up being empty due to e.g. some problems in the filesystem, it was still considered to be a valid state file. While this is technically correct (everything is at its default then), this is not what one wants: All switches in the master control would be "off", so monitoring would effectively be disabled then.

We now ignore such an empty state file, so the CMC state effectively starts from scratch, then with no acknowledgements, comments, ad hoc downtimes, etc. While this is not perfect, it is better than a running but effectively disabled monitoring site.

To the list of all Werks