Troubleshooting error running automation call restart
Error activating changes "Error creating configuration: 'name'"
LAST TESTED ON CHECKMK 2.3.0P1
Table of Contents
Problem
During activation, you may face this issue.
Solution
There is no default solution for this. We need to debug it step-by-step.
Log in as the site user.
root@linux~# su - mysite
.
Create the core config from the command line.
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 Creating helper config...OK Time needed [<lambda>]: 0.00 sec time period 'time_period_1': 2 time points (optimized from 2922) time period 'time_period_2': 2 time points (optimized from 2922) time period '24X7': 2 time points Time needed [cmc_timeperiods]: 0.01 sec Time needed [cmc_contacts]: 0.00 sec Loading autochecks from /omd/sites/mysite/var/check_mk/autochecks/localhost2.mk Loading autochecks from /omd/sites/mysite/var/check_mk/autochecks/localhost.mk Loading autochecks from /omd/sites/mysite/var/check_mk/autochecks/localhost3.mk Loading autochecks from /omd/sites/mysite/var/check_mk/autochecks/rdw_infra-gn4c-sw1-p1801.rdw.net-walk_copy.mk Releasing lock on /omd/sites/mysite/etc/check_mk/main.mk Released lock on /omd/sites/mysite/etc/check_mk/main.mk Configuration Error: 'name' Loading autochecks from /omd/sites/mysite/var/check_mk/autochecks/rdw_infra-gn4c-sw1-p1801.rdw.net-walk.txt.mk Loading autochecks from /omd/sites/mysite/var/check_mk/autochecks/localhost.mk Loading autochecks from /omd/sites/mysite/var/check_mk/autochecks/localhost2.mk Trying to acquire lock on /omd/sites/mysite/var/check_mk/crashes/base/c7aa6504-30c9-11ec-aa5d-dd3ebce72779/crash.info Got lock on /omd/sites/mysite/var/check_mk/crashes/base/c7aa6504-30c9-11ec-aa5d-dd3ebce72779/crash.info Releasing lock on /omd/sites/mysite/var/check_mk/crashes/base/c7aa6504-30c9-11ec-aa5d-dd3ebce72779/crash.info Released lock on /omd/sites/mysite/var/check_mk/crashes/base/c7aa6504-30c9-11ec-aa5d-dd3ebce72779/crash.info Traceback (most recent call last): File "/omd/sites/mysite/bin/cmk", line 92, in <module> exit_status = modes.call(mode_name, mode_args, opts, args) File "/omd/sites/mysite/lib/python3/cmk/base/modes/__init__.py", line 69, in call return handler(*handler_args) File "/omd/sites/mysite/lib/python3/cmk/base/modes/check_mk.py", line 1116, in mode_update do_create_config(create_core(config.monitoring_core)) File "/omd/sites/mysite/lib/python3/cmk/base/core_config.py", line 336, in do_create_config _create_core_config(core) File "/omd/sites/mysite/lib/python3/cmk/base/core_config.py", line 401, in _create_core_config core.create_config(helper_config.serial) File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 87, in create_config _create_core_config(serial) File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 151, in _create_core_config hosts_config = _measure_time(cmc_all_hosts, serial) File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 186, in _measure_time result = func(*args, **kwargs) File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 582, in cmc_all_hosts cmc_hosts = CMCHosts(serial, strategy, list(config_cache.all_active_hosts()), CMCHostConfig) File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 659, in __init__ for chunk_result in _compute_host_configurations( File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 641, in _compute_host_configurations return mapper(partial(get_host_configurations, serial), host_chunks) File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 536, in _one_worker_per_chunk raise ret.error KeyError: 'name'
.
- We must disable the parallelized config creation in the global settings for better debugging.
Setup → General → Global settings → Monitoring Core → Parallellize config creation → remove the tick and save the changes
. The activate changes will run again into an error, but now we can debug much better.
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 Creating helper config...OK Time needed [<lambda>]: 0.00 sec time period 'time_period_1': 2 time points (optimized from 2922) time period 'time_period_2': 2 time points (optimized from 2922) time period '24X7': 2 time points Time needed [cmc_timeperiods]: 0.01 sec Time needed [cmc_contacts]: 0.00 sec Loading autochecks from /omd/sites/mysite/var/check_mk/autochecks/rdw_infra-gn4c-sw1-p1801.rdw.net-walk.txt.mk Loading autochecks from /omd/sites/mysite/var/check_mk/autochecks/rdw_infra-gn4c-sw1-p1801.rdw.net-walk_copy.mk Releasing lock on /omd/sites/mysite/etc/check_mk/main.mk Released lock on /omd/sites/mysite/etc/check_mk/main.mk Configuration Error: 'name' Trying to acquire lock on /omd/sites/mysite/var/check_mk/crashes/base/35606d18-30cb-11ec-aa5d-dd3ebce72779/crash.info Got lock on /omd/sites/mysite/var/check_mk/crashes/base/35606d18-30cb-11ec-aa5d-dd3ebce72779/crash.info Releasing lock on /omd/sites/mysite/var/check_mk/crashes/base/35606d18-30cb-11ec-aa5d-dd3ebce72779/crash.info Released lock on /omd/sites/mysite/var/check_mk/crashes/base/35606d18-30cb-11ec-aa5d-dd3ebce72779/crash.info Traceback (most recent call last): File "/omd/sites/mysite/bin/cmk", line 92, in <module> exit_status = modes.call(mode_name, mode_args, opts, args) File "/omd/sites/mysite/lib/python3/cmk/base/modes/__init__.py", line 69, in call return handler(*handler_args) File "/omd/sites/mysite/lib/python3/cmk/base/modes/check_mk.py", line 1116, in mode_update do_create_config(create_core(config.monitoring_core)) File "/omd/sites/mysite/lib/python3/cmk/base/core_config.py", line 336, in do_create_config _create_core_config(core) File "/omd/sites/mysite/lib/python3/cmk/base/core_config.py", line 401, in _create_core_config core.create_config(helper_config.serial) File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 87, in create_config _create_core_config(serial) File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 151, in _create_core_config hosts_config = _measure_time(cmc_all_hosts, serial) File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 186, in _measure_time result = func(*args, **kwargs) File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 582, in cmc_all_hosts cmc_hosts = CMCHosts(serial, strategy, list(config_cache.all_active_hosts()), CMCHostConfig) File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 659, in __init__ for chunk_result in _compute_host_configurations( File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 641, in _compute_host_configurations return mapper(partial(get_host_configurations, serial), host_chunks) File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 511, in _sequential_strategy_map raise ret.error File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 759, in get_host_configurations result = [host_class(hostname).get_serialized_data() for hostname in hostlist] File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 759, in <listcomp> result = [host_class(hostname).get_serialized_data() for hostname in hostlist] File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 1079, in __init__ super(CMCHostConfig, self).__init__(hostname=hostname, File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 839, in __init__ self._compute() File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 1100, in _compute self._cmc_services() File "/omd/sites/mysite/lib/python3/cmk/base/cee/core_cmc.py", line 1259, in _cmc_services description = config.active_check_service_description(self._hostname, File "/omd/sites/mysite/lib/python3/cmk/base/config.py", line 1117, in active_check_service_description description = act_info["service_description"](params) File "/omd/sites/mysite/local/share/check_mk/checks/check_crl_url", line 22, in check_crl_url_desc return "CRL %s" % (params['name']) KeyError: 'name'
.
- This issue is caused by a custom check due to an empty parameter. You need to check the rule in Checkmk again or rewrite your check to have some default values.
. - Please don't forget to activate to parallelize config creation again
Related articles