2 fresh installs on 2 servers for distributed monitoring
instances are configured for DM
can be reached, login was configured succesfully
activation of config fails with attached error messages
Any ideas?
Kind regards,
Sebastian
CMK version: 2.0.0p21 Raw Edition OS version: Ubuntu 21.10 Server
Error message:
Started at: 12:17:54. Finished at: 12:17:55.
Got invalid data:
Internal automation error: Error running automation call restart (exit code 1), error:
Nagios Core 3.5.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-30-2013
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/omd/sites/it_monitor_01/etc/nagios/conf.d'...
Processing object config file '/omd/sites/it_monitor_01/etc/nagios/conf.d/check_mk_templates.cfg'...
Processing object config file '/omd/sites/it_monitor_01/etc/nagios/conf.d/jmx4perl_nagios.cfg'...
Processing object config file '/omd/sites/it_monitor_01/etc/nagios/conf.d/templates.cfg'...
Processing object config file '/omd/sites/it_monitor_01/etc/nagios/conf.d/mkeventd_notifications.cfg'...
Processing object config file '/omd/sites/it_monitor_01/etc/nagios/conf.d/check_mk_objects.cfg'...
<div class=err>Error: Could not find any contactgroup matching 'all' (config file '/omd/sites/it_monitor_01/etc/nagios/conf.d/mkeventd_notifications.cfg', starting on line 5)</div>
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
An error occurred: Error creating configuration: Configuration for monitoring core is invalid. Rolling back. The broken file has been copied to "/omd/sites/it_monitor_01/tmp/check_mk/check_mk_objects.cfg.broken" for analysis.
Traceback (most recent call last):
File "/omd/sites/it_monitor_01/lib/python3/cmk/gui/wato/pages/automation.py", line 170, in _execute_automation_command
html.write(repr(automation.execute(automation.get_request())))
File "/omd/sites/it_monitor_01/lib/python3/cmk/gui/wato/pages/activate_changes.py", line 670, in execute
return cmk.gui.watolib.activate_changes.execute_activate_changes(request.domains)
File "/omd/sites/it_monitor_01/lib/python3/cmk/gui/watolib/activate_changes.py", line 1792, in execute_activate_changes
warnings = domain_class().activate()
File "/omd/sites/it_monitor_01/lib/python3/cmk/gui/watolib/config_domains.py", line 60, in activate
return check_mk_local_automation(config.wato_activation_method)
File "/omd/sites/it_monitor_01/lib/python3/cmk/gui/watolib/automations.py", line 143, in check_mk_local_automation
raise _local_automation_failure(command=command,
cmk.utils.exceptions.MKGeneralException: Error running automation call restart (exit code 1), error:
Nagios Core 3.5.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-30-2013
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/omd/sites/it_monitor_01/etc/nagios/conf.d'...
Processing object config file '/omd/sites/it_monitor_01/etc/nagios/conf.d/check_mk_templates.cfg'...
Processing object config file '/omd/sites/it_monitor_01/etc/nagios/conf.d/jmx4perl_nagios.cfg'...
Processing object config file '/omd/sites/it_monitor_01/etc/nagios/conf.d/templates.cfg'...
Processing object config file '/omd/sites/it_monitor_01/etc/nagios/conf.d/mkeventd_notifications.cfg'...
Processing object config file '/omd/sites/it_monitor_01/etc/nagios/conf.d/check_mk_objects.cfg'...
<div class=err>Error: Could not find any contactgroup matching 'all' (config file '/omd/sites/it_monitor_01/etc/nagios/conf.d/mkeventd_notifications.cfg', starting on line 5)</div>
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
An error occurred: Error creating configuration: Configuration for monitoring core is invalid. Rolling back. The broken file has been copied to "/omd/sites/it_monitor_01/tmp/check_mk/check_mk_objects.cfg.broken" for analysis.
I did not actively remove the contact group βallβ.
On the central instance under " Setup > Users > Contact groups" there is the default contact group βallβ.
On the remote instances I never touched the configuration of the created sites.
Additional Info: I configured distributed monitoring of course, as mentioned in initial posting.
Kind regards,
Sebastian
BTW:
I intentionally created this topic in English because I thought this might enable more users to answer.
German is possible too.
As I understand the response of the remoter site is not as expected because the nagios configs are invalid, am i right?
try:
response = ast.literal_eval(response)
except SyntaxError:
# The remote site will send non-Python data in case of an error.
raise MKAutomationException("%s: <pre>%s</pre>" % (_("Got invalid data"), response))
Excerpt from weblog file:
2022-03-22 18:09:09,019 [40] [cmk.web.site[it_monitor_01] 3463560] error activating changes
Traceback (most recent call last):
File "/omd/sites/it_monitor/lib/python3/cmk/gui/watolib/automations.py", line 304, in do_remote_automation
response = ast.literal_eval(response)
File "/omd/sites/it_monitor/lib/python3.8/ast.py", line 59, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
File "/omd/sites/it_monitor/lib/python3.8/ast.py", line 47, in parse
return compile(source, filename, mode, flags,
File "<unknown>", line 1
Internal automation error: Error running automation call <tt>restart</tt> (exit code 1), error: <pre>
^
SyntaxError: invalid syntax
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/omd/sites/it_monitor/lib/python3/cmk/gui/watolib/activate_changes.py", line 1388, in _do_run
configuration_warnings = self._do_activate()
File "/omd/sites/it_monitor/lib/python3/cmk/gui/watolib/activate_changes.py", line 1651, in _do_activate
configuration_warnings = self._call_activate_changes_automation()
File "/omd/sites/it_monitor/lib/python3/cmk/gui/watolib/activate_changes.py", line 1664, in _call_activate_changes_automation
response = cmk.gui.watolib.automations.do_remote_automation(
File "/omd/sites/it_monitor/lib/python3/cmk/gui/watolib/automations.py", line 307, in do_remote_automation
raise MKAutomationException("%s: <pre>%s</pre>" % (_("Got invalid data"), response))
cmk.gui.watolib.automations.MKAutomationException: Got invalid data: <pre>Internal automation error: Error running automation call <tt>restart</tt> (exit code 1), error: <pre>
Hi Sebastian,
Yes thatβs correct.
One possible solution for this is, you could copy the historic data from one site to the new site. But this is indeed not very practical, but maybe for your scenario.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.