[icinga-users] Icinga 2.4 does not start after update

Daniel Guillermo Bareiro daniel-listas at gmx.net
Tue Nov 24 12:25:44 CET 2015

> Hi,

Hi, Michael. Thanks for your reply.

>> -------------------------------------------------------------------------------
>> root at icinga2:~# /etc/init.d/icinga2 checkconfig
>> (...)
>> information/ConfigItem: Committing config items
>> critical/config: Error: An object with type 'Service' and name 'localhost!ssh' already exists (in /etc/icinga2/conf.d/hosts/localhost/ssh.conf: 6:1-6:20), new declaration: in /etc/icinga2/conf.d/services.conf: 47:1-47:19
>> Location: in /etc/icinga2/conf.d/services.conf: 47:1-47:19
>> /etc/icinga2/conf.d/services.conf(45): * the custom attribute `os` set to `Linux`.
>> /etc/icinga2/conf.d/services.conf(46): */
>> /etc/icinga2/conf.d/services.conf(47): apply Service "ssh" {
>> ^^^^^^^^^^^^^^^^^^^
>> /etc/icinga2/conf.d/services.conf(48): import "generic-service"
>> /etc/icinga2/conf.d/services.conf(49):
>> critical/config: 1 error
>> [FAIL] checking Icinga2 configuration. Check '/var/log/icinga2/startup.log' for details. ... failed!
>> -------------------------------------------------------------------------------
>> There seems to be a double definition of the ssh service check. But I think the
>> definitions in /etc/icinga 2/conf.d/hosts/localhost are standard definitions
>> provided with Icinga, right? I think I did not add any of these.

> Nope. Afaik we had that with versions older than 2.2 but changed that using apply rules. 
> Probably you've upgraded from a rather old version, and missed the Changelog entries.

Can be, but honestly I do not remember to have installed any package from a previous version to Icinga2.

> The current tree is also described on the docs, you can safely move away the hosts directory.

I've been reviewing this [1] documentation and see it mentions only the "conf.d" directory but not a directory tree. If I'm missing something, could you please tell me what part of the documentation do you mean?

Currently I was using these files in the "host" directory:

root at icinga2:/etc/icinga2/conf.d/hosts# ll
total 20
-rw-r--r-- 1 root root   322 sep 18  2014 localhost.conf
-rw-r--r-- 1 root root 13657 mar 22  2015 local-network.conf

Where local-network.conf has the definitions of the hosts and services to be monitored on the local network. Perhaps the suggestion is to move these files to the root of "conf.d" and delete the "hosts" directory?

After having removed the "localhost" directory I was able to make Icinga2 is up and running.

> Have a nice weekend,

Thank you. I hope you also had a good weekend :-)

Best regards,

[1] http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc

More information about the icinga-users mailing list