Director host, conf.d, and all that

I installed icinga2 and director recently (my first time). I see that my icinga2 instance reports on some healthchecks on the director host itself. However, I cannot find the director host itself under hosts nor services.

I found a post on here from January which talked about commenting out include_recursive “conf.d” from icinga.conf. My include_recursive “conf.d” is **not ** commented. However, I do not find any references to the director host in any of the files located in /etc/icinga2/conf.d.

Also, I tested by commenting out the include_recursive “conf.d” line, but that caused many other issue as apparently most of the external commands are listed in files located in conf.d as well.

I did run kickstart successfully, and thought that would have imported the entires into director for whatever existed in conf.d. Is this assumption wrong?

Thank you in advance for your help,

With the kickstart the director imports the exisitng icinga config which will be found - like commands, defined zones etc.
under “conf.d” it’s like an example - more about it you’ll find here: Configuration - Icinga 2

what other issue you’ll get?

Thanks @stevie-sy.
If kickstart imports all the existing settings from /etc/icinga2/conf.d, then if /etc/icinga2/conf.d use is not commented out, would there be duplicates in the config? Also if kickstart imported all the settings, would it not also import the director host itself? I see the director host itself is being monitored (it shows up in the dashboard) but I cannot find it listed anywhere under hosts nor services options of the director.

When I comment out the use of conf.d, I get errors around missing “mail-service-notification” command, That is the only error I get when I comment out the use of conf.d. Would this command not have been imported by kickstart?

ok, one step back: We need to unravel a few things!

As you can read here: and here the kickstart wizard handles the schema migration (database), imports command definition from the ITL (e.g. after an icinga update) and syncs the director with the icinga 2 infrastructur (that means of you define new zones, endpoints in the zones.conf).
The kickstart doesnt import hosts from a source! This is is doeing the section “Import & Sync” like you can read here:

In /etc/icinga2/conf.d is an example config. This could be updated with some icinga update. That’s why it’s recommanded do comment this out in the icinga2.conf - as you can read here:

If you manage your config with the director, it will save the config unter the /var/lib directory. As you can read here:

After this all, the question is now:

  • What do you mean with the director host? Is this the server where icinga2, icingaweb2 and the director is installed? Is this a host object in your icinga config which should be monitored? or …?
  • If you write you can find in the dashboard and you see it is up: Where do you see what? Some examples (like screenshots) would be very helpful
  • where do you still save your config? Did you create a mixed configuration consisting of manually written files and a managed config with the director?
  • about error from “mail-service-notification”. That’s clear why you can an error about this, if you comment this out. If this notification command is not imported during the kickstart you have to create a new notification command in the director

Some more information like screenshots, code snippsets from your config - everything would help us to help you - would be great

1 Like

Small correction: The schema creation and migration has to be done prio to using the kickstart wizard (afaik).

1 Like

thanks for the correction/note :+1:

What is the best practice here?
What should I leave in conf.d?
I want to have all configuration in director for flexibility…
It is enough to leave the api user settings there and all other do with director?

My best practice is:

  • api users config
  • commands config

Commands config holds the default mail notification commands that are still not in the ITL. So importing the from the config file into the Director saves me the hassle of manually creating the command.
Any other config I may do via the config files (e.g. because Icinga DSL is used, which the Director does not support) belongs under /etc/icinga2/zones.d in their respective zones folder.
Also the zones.conf content should not be moved to the Director, that can lead to massive problems with the config sync.