Extended_host/extended_service problem

Support requests, bug reports, questions etc.
Nagilum
starter
starter
Posts: 1
Joined: Wed Oct 05, 2011 14:59

Extended_host/extended_service problem

Post by Nagilum » Thu Dec 22, 2011 11:31

Hi, at the release of 1.3.0 i decided to set up a new server for nagios/nconf.
To make things easier i installed the same version as the old server first (1.2.6), imported the database etc. and then installed 1.3.0 and did the update / database converting as described in the README.

I had pnp4nagios installed and the extended_host/extended_service files, but decided to not use pnp4nagios on the new server.
So i removed the action_url from the templates i had it configured.

Now the problem..
When i add or remove a host (or disable it by setting "monitored by" blank) from nconf, and generate a new config i get the error below. The generate config/deployment screen doesn't show the error, i have to check manually on the server if nagios is running or not.
Usually it is not and i get this error:

Code: Select all

Processing object config directory '/usr/local/nagios/etc/global'...
Processing object config file '/usr/local/nagios/etc/global/misccommands.cfg'...
Processing object config file '/usr/local/nagios/etc/global/host_templates.cfg'...
Processing object config file '/usr/local/nagios/etc/global/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/global/service_templates.cfg'...
Processing object config file '/usr/local/nagios/etc/global/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/global/checkcommands.cfg'...
Processing object config file '/usr/local/nagios/etc/global/timeperiods.cfg'...
Processing object config directory '/usr/local/nagios/etc/Default_collector'...
Processing object config file '/usr/local/nagios/etc/Default_collector/servicegroups.cfg'...
Processing object config file '/usr/local/nagios/etc/Default_collector/extended_service_info.cfg'...
Processing object config file '/usr/local/nagios/etc/Default_collector/services.cfg'...
Processing object config file '/usr/local/nagios/etc/Default_collector/service_dependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/Default_collector/hosts.cfg'...
Processing object config file '/usr/local/nagios/etc/Default_collector/hostgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/Default_collector/extended_host_info.cfg'...
Processing object config file '/usr/local/nagios/etc/Default_collector/advanced_services.cfg'...
Processing object config file '/usr/local/nagios/etc/Default_collector/host_dependencies.cfg'...
Error: Could not find any host matching 'xxxxx' (config file '/usr/local/nagios/etc/Default_collector/extended_host_info.cfg', starting on line 575)
Error: Could not expand hostgroups and/or hosts specified in extended host info (config file '/usr/local/nagios/etc/Default_collector/extended_host_info.cfg', starting on line 575)
   Error processing object config files!


Solution is to remove the Default_Collector/global directories and generate config again. Then it works..

I am not sure where the problem is now.. Any help appreciated :)

User avatar
Tontonitch
NConf addict
NConf addict
Posts: 254
Joined: Fri May 07, 2010 10:14
Location: Thionville, France
Contact:

Re: Extended_host/extended_service problem

Post by Tontonitch » Thu Dec 22, 2011 16:11

Hi,

As explained in the NConf 1.3.0 release notes (http://www.nconf.org/dokuwiki/doku.php? ... leasenotes), the following files are not generated anymore:
  • extended_host_info.cfg
  • extended_service_info.cfg
But after upgrading to NConf 1.3.0, you still had these 2 files in the directory '/usr/local/nagios/etc/Default_collector/'.
So when reloading nagios, it tries to load the newly generated config and the 2 old files extended_*. So the modifications made on hosts or services were not applyed to these 2 files and produced the configuration error.

Removing the Default_Collector directory also removed the 2 old cfg files and consequently fixed your situation. So nothing more to do ;)

BR,
Yannick

Locked