Troubleshooting Error creating configuration: 'cmk.influxdb' during Update 2.2.0 : KeyError: 'cmk.influxdb'
This article describes how to fix the KeyError: 'cmk.influxdb' during the Update Checkmk 2.1.0 to Checkmk 2.2.0
2.2.0P30
Table of Contents
Problem
During the Update to a Version Checkmk 2.2.0 the following error breaks the update process. In distributed monitoring this message appears on the master site. The same error can be thrown on upgraded remote sites while activate changes:
Updating core configuration... Generating configuration for core (type cmc)... Configuration Error: Error creating configuration: 'cmk.influxdb' Could not update core configuration. Aborting.
The output from cmk debug command shows the following:
OMD[mysite]:~$ cmk --debug -vvU Trying to acquire lock on /omd/sites/mysite/etc/check_mk/main.mk Got lock on /omd/sites/mysite/etc/check_mk/main.mk Generating configuration for core (type cmc)... Trying to acquire lock on /omd/sites/mysite/var/check_mk/core/helper_config/serial.mk Got lock on /omd/sites/mysite/var/check_mk/core/helper_config/serial.mk Releasing lock on /omd/sites/mysite/var/check_mk/core/helper_config/serial.mk Released lock on /omd/sites/mysite/var/check_mk/core/helper_config/serial.mk Trying to acquire lock on /omd/sites/mysite/var/check_mk/licensing/licensed_state Got lock on /omd/sites/mysite/var/check_mk/licensing/licensed_state Releasing lock on /omd/sites/mysite/var/check_mk/licensing/licensed_state Released lock on /omd/sites/mysite/var/check_mk/licensing/licensed_state Releasing lock on /omd/sites/mysite/etc/check_mk/main.mk Released lock on /omd/sites/mysite/etc/check_mk/main.mk Configuration Error: 'cmk.influxdb' Trying to acquire lock on /omd/sites/mysite/var/check_mk/crashes/base/cfd7aef2-4734-11ee-a2f4-90e2bae2d00c/crash.info Got lock on /omd/sites/mysite/var/check_mk/crashes/base/cfd7aef2-4734-11ee-a2f4-90e2bae2d00c/crash.info Releasing lock on /omd/sites/mysite/var/check_mk/crashes/base/cfd7aef2-4734-11ee-a2f4-90e2bae2d00c/crash.info Released lock on /omd/sites/mysite/var/check_mk/crashes/base/cfd7aef2-4734-11ee-a2f4-90e2bae2d00c/crash.info Traceback (most recent call last): File “/omd/sites/mysite/bin/cmk”, line 112, in <module> exit_status = modes.call(mode_name, mode_args, opts, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/omd/sites/mysite/lib/python3/cmk/base/modes/__init__.py”, line 68, in call return handler(*handler_args) ^^^^^^^^^^^^^^^^^^^^^^ File “/omd/sites/mysite/lib/python3/cmk/base/modes/check_mk.py”, line 1218, in mode_update do_create_config( File “/omd/sites/mysite/lib/python3/cmk/base/core_config.py”, line 271, in do_create_config _create_core_config( File “/omd/sites/mysite/lib/python3/cmk/base/core_config.py”, line 359, in _create_core_config core.create_config(config_path, config_cache, hosts_to_update=hosts_to_update) File “/omd/sites/mysite/lib/python3/cmk/base/core_config.py”, line 79, in create_config self._create_config(config_path, config_cache, licensing_handler, hosts_to_update) File “/omd/sites/mysite/lib/python3/cmk/base/cee/microcore_config.py”, line 3215, in _create_config data = create_core_config( ^^^^^^^^^^^^^^^^^^^ File “/omd/sites/mysite/lib/python3/cmk/base/cee/microcore_config.py”, line 3134, in create_core_config data[“globals”] = _serialize_config_globals(string_pool, serial) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/omd/sites/mysite/lib/python3/cmk/base/cee/microcore_config.py”, line 545, in _serialize_config_globals _fill_influx_db(gl, string_pool) File “/omd/sites/mysite/lib/python3/cmk/base/cee/microcore_config.py”, line 420, in _fill_influx_db influx_db.log_level = _to_log_level(base_config.cmc_log_levels["cmk.influxdb”]) ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ KeyError: 'cmk.influxdb'
Solution
Issues could be resolved by resetting the logging of the core to factory settings for all sites.
- In “Setup -> General -> Distributed monitoring” open the Site specific global settings
- Reset all settings in the “Logging of the core” section to factory setting, even they are set to Factory settings and Save.
- Activate the changes
- Repeat this for all sites, including the central site.
Not supported: It is also possible to change the values with CLI.
vi ~/etc/check_mk/conf.d/wato/sitespecific.mk # Set log levels to default. # Add 'cmk.influxdb': 5, if not configured in sitespecific.mk cmc_log_levels = {'cmk.alert': 5, 'cmk.carbon': 5, 'cmk.core': 5, 'cmk.downtime': 5, 'cmk.helper': 5, 'cmk.influxdb': 5, 'cmk.livestatus': 5, 'cmk.notification': 5, 'cmk.rrd': 5, 'cmk.smartping': 5}
Related articles