Agent Service does not start

Hi, i’m a new icinga user, and start with icinga2 and director on a fresh Debian Jessie setup.

After Setup i add many Hosts with different services, works well. Yesterday i add a new network with six Win 2012R2 Servers und install the Agent as until now. The Configuration runs through without any problems, the Service started. At this Point i change the User from the Service to an lokal Admin, to check Windows-Updates. When i restart the Service now, i get an Error.

C:\Windows\system32>"C:\ICINGA2\sbin\icinga2.exe" daemon -C
information/cli: Icinga application loader (version: v2.8.0-2-g35f0df3)
information/cli: Loading configuration file(s).
critical/config: Error: Object 'generic-host' of type 'Host' re-defined: in C:\ProgramData\icinga2\var\lib\icinga2\api\zones/director-global/director/host_templates.conf: 1:0-1:27; previous definition: in C:\ProgramData\icinga2\etc\icinga2/conf.d/templates.conf: 14:1-14:28
Location: in C:\ProgramData\icinga2\var\lib\icinga2\api\zones/director-global/director/host_templates.conf: 1:0-1:27
C:\ProgramData\icinga2\var\lib\icinga2\api\zones/director-global/director/host_templates.conf(1): template Host "generic-host" {
																								  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
C:\ProgramData\icinga2\var\lib\icinga2\api\zones/director-global/director/host_templates.conf(2):     check_command = "hostalive"
C:\ProgramData\icinga2\var\lib\icinga2\api\zones/director-global/director/host_templates.conf(3):     max_check_attempts = "3"

I try to rename the Config-File “host_template.conf” to “host_template.conf(1)” this works well, but only until next Servicestart or Reboot. The old template automatically gets its old name again and the service won’t start.
What am I doing wrong, at beginning there was no Problem on other Servers when adding? I’m not sure, but i think my last changing was add this line into the zones.conf

object Zone "director-global" {
  global = true
}

Greets
Stephan

Icinga 2 comes with a bunch of example configuration.

When working in a clustered environment you probably want to disable conf.d in icinga2.conf

At some point we will make the setup wizards remove such for client setups, but for now, you’ll have to edit this on your own.

Navigate to %ProgramData%\etc\icinga2 and open icinga2.conf with your preferred editor.

Change include_recursive "conf.d" into //include_recursive "conf.d" or entirely purge that line.

Cheers,
Michael

1 Like

Ok, this solved the Problem.

Thanks,
Stephan