Hello, I'm hoping someone can help me to understand why I can't apply a configuration change.
Whenever I try to add a monitor or apply any configuration change I receive the following error message
"An error occured while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint."
Can someone please help?
Thanks,
Shawn
Apply Configuration Update Failing Every Time
-
- Posts: 4
- Joined: Wed Sep 22, 2010 2:16 pm
-
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: Apply Configuration Update Failing Every Time
You can use the "View a snapshot of this configuration error" link to get a text file with more detail. If you could post that we may be able to track down the issue for you.
-
- Posts: 4
- Joined: Wed Sep 22, 2010 2:16 pm
Re: Apply Configuration Update Failing Every Time
Thanks,
Here is the contents of the text file -
Nagios Core 3.2.2
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 09-01-2010
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/hostgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/servicegroups.cfg'...
Processing object config file '/usr/local/nagios/etc/hosttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicetemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicedependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostdependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/hostescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostextinfo.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceextinfo.cfg'...
Processing object config directory '/usr/local/nagios/etc/hosts'...
Processing object config file '/usr/local/nagios/etc/hosts/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/www.yahoo.com.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/www.google.com.cfg'...
Processing object config directory '/usr/local/nagios/etc/services'...
Processing object config file '/usr/local/nagios/etc/services/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/services/www.yahoo.com.cfg'...
Processing object config file '/usr/local/nagios/etc/services/www.google.com.cfg'...
Error: Could not find any hostgroup matching 'external-websites' (config file '/usr/local/nagios/etc/hosts/www.google.com.cfg', starting on line 14)
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.
Here is the contents of the text file -
Nagios Core 3.2.2
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 09-01-2010
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/hostgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/servicegroups.cfg'...
Processing object config file '/usr/local/nagios/etc/hosttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicetemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicedependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostdependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/hostescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostextinfo.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceextinfo.cfg'...
Processing object config directory '/usr/local/nagios/etc/hosts'...
Processing object config file '/usr/local/nagios/etc/hosts/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/www.yahoo.com.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/www.google.com.cfg'...
Processing object config directory '/usr/local/nagios/etc/services'...
Processing object config file '/usr/local/nagios/etc/services/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/services/www.yahoo.com.cfg'...
Processing object config file '/usr/local/nagios/etc/services/www.google.com.cfg'...
Error: Could not find any hostgroup matching 'external-websites' (config file '/usr/local/nagios/etc/hosts/www.google.com.cfg', starting on line 14)
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.
Re: Apply Configuration Update Failing Every Time
This is caused by either a syntax error, or most likely an illegal character in the config file. That's strange that you would get a message like that because XI and NagiosQL handle the writing of the config files. Here are some things to try.
Try removing google.com from the hostgroup external-websites and see if it will Apply the Config.
If that doesn't work:
In the CCM, under the Tools menu, try using the Write Config Files tool to write the information from the database to the cfg files, and then see if it will verify.
Try removing google.com from the hostgroup external-websites and see if it will Apply the Config.
If that doesn't work:
In the CCM, under the Tools menu, try using the Write Config Files tool to write the information from the database to the cfg files, and then see if it will verify.
-
- Posts: 4
- Joined: Wed Sep 22, 2010 2:16 pm
Re: Apply Configuration Update Failing Every Time
I tried both and neither worked. There isn't anything in the hostgroup for external-websites anymore and here is what I got when I tried to write the config from the CCM -
Nagios Core Config Manager
Administration -> Tools -> Nagios Core Control
Configuration User: nagiosadmin Logout
Nagios Core Configuration Export
Write monitoring data
Write additional data
Check configuration files:
Restart Nagios:
Error: Could not find any hostgroup matching 'external-websites' (config file '/usr/local/nagios/etc/hosts/www.google.com.cfg', starting on line 14)
Error processing object config files!
Nagios Core 3.2.2
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 09-01-2010
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/hostgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/servicegroups.cfg'...
Processing object config file '/usr/local/nagios/etc/hosttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicetemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicedependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostdependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/hostescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostextinfo.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceextinfo.cfg'...
Processing object config directory '/usr/local/nagios/etc/hosts'...
Processing object config file '/usr/local/nagios/etc/hosts/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/www.yahoo.com.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/www.google.com.cfg'...
Processing object config directory '/usr/local/nagios/etc/services'...
Processing object config file '/usr/local/nagios/etc/services/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/services/www.yahoo.com.cfg'...
Processing object config file '/usr/local/nagios/etc/services/www.google.com.cfg'...
Error: Could not find any hostgroup matching 'external-websites' (config file '/usr/local/nagios/etc/hosts/www.google.com.cfg', starting on line 14)
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.
NagiosQL - Version: 3.0.3
Nagios Core Config Manager
Administration -> Tools -> Nagios Core Control
Configuration User: nagiosadmin Logout
Nagios Core Configuration Export
Write monitoring data
Write additional data
Check configuration files:
Restart Nagios:
Error: Could not find any hostgroup matching 'external-websites' (config file '/usr/local/nagios/etc/hosts/www.google.com.cfg', starting on line 14)
Error processing object config files!
Nagios Core 3.2.2
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 09-01-2010
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/hostgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/servicegroups.cfg'...
Processing object config file '/usr/local/nagios/etc/hosttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicetemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicedependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostdependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/hostescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostextinfo.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceextinfo.cfg'...
Processing object config directory '/usr/local/nagios/etc/hosts'...
Processing object config file '/usr/local/nagios/etc/hosts/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/www.yahoo.com.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/www.google.com.cfg'...
Processing object config directory '/usr/local/nagios/etc/services'...
Processing object config file '/usr/local/nagios/etc/services/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/services/www.yahoo.com.cfg'...
Processing object config file '/usr/local/nagios/etc/services/www.google.com.cfg'...
Error: Could not find any hostgroup matching 'external-websites' (config file '/usr/local/nagios/etc/hosts/www.google.com.cfg', starting on line 14)
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.
NagiosQL - Version: 3.0.3
Re: Apply Configuration Update Failing Every Time
Hostgroups can not be empty, either add something or delete it.
-
- Posts: 4
- Joined: Wed Sep 22, 2010 2:16 pm
Re: Apply Configuration Update Failing Every Time
That did nothing for me - time to scrap this test and move on to the next.
Re: Apply Configuration Update Failing Every Time
Check to see if you have multiple instances of Nagios running on your machine. If there are multiple instances, the old instance of Nagios will continue to write the old information to the configuration file. I suggest killing all instances of nagios, then starting it again. (Rebooting the Nagios server does the same thing, but most people prefer not to do that).
killall nagios
service nagios start
killall nagios
service nagios start
Re: Apply Configuration Update Failing Every Time
I was having exactly the same problem.
I managed to fix it by setting the file ownership on the nagios/etc dir to apache:nagios.
I noticed that when I tried to use the write tool of the config files it didn't have correct ownership.
I find it quite annoying how often this happens and breaks things.
Hope this helps.
Rob
I managed to fix it by setting the file ownership on the nagios/etc dir to apache:nagios.
I noticed that when I tried to use the write tool of the config files it didn't have correct ownership.
I find it quite annoying how often this happens and breaks things.
Hope this helps.
Rob