Icinga Director show errors when deploying, while icinga shows none

Hello guys,
Im pretty new in the icinga Community as i just started my first project 2 months ago.
Our company is not that big and therefore the overhead quite manageable.
To the problem:
I recently installed the Icinga Director, and iam pretty blown away about the complexity that it delivers.
When i started deploying the first few checks there was no problem at all.
But for some reason i received a few errors when digging further into the matter. (icinga2 core wasnt found anymore, and other stuff that i managed to remedy)
But now im kinda stuck. When deploying i get the “build-in” icinga2 daemon -C report stating that one object has been configured multiple times, or atleast twice.
I could only imagine, that it is because i’ve used icinga2 without director before,with all the host config and stuff.
Iam not sure why the error is persistent as i deleted the host entries in the icinga2 part (/etc/icinga2/conf.d/hosts.conf)
Please bare with me as i dont have much experience with icinga.
Could you just let me know how to fix this, if its fixable.
Im planning on reinstalling everything anways, but ill need proper documentation of how to do it right, in order to avoid those struggles.
And btw. does failed - state on deployment page mean that the import of the configuration package failed, or just the build afterwards?

Startup Log from Deployment:

everything inside: /etc/icinga2/conf.d/hosts.conf

Please just let me know whatever else you would need in order to help me troubleshoot and i will answer as fast as possible.
Thanks in advance, and have a nice weekend!

I have no clue what Director version iam using, but it should be up to date, as i just installed it today.

  • Icinga Web 2 version and modules (System - About):
    icinga2 - The Icinga 2 network monitoring daemon (version: r2.13.2-1)
    Using nginx as a webserver and postgresql as the db
    Operating System is debian 10

Hello and welcom :slight_smile:

Did you do a reload of icinga2 after you edited the configuration?
That is necessary to deploy the new config.

You (very) basically have the following procedure with the plain icinga2 config files:
config file → service reload/restart trigger config validation → if no errors use new config as running config

The director adds another layer at the beginning, where it communicates with icinga2 via the API to create the new config, which then is validated and eventually used as the running config.

It is recommended to not recursively include the conf.d folder, which mostly holds example configs.
I suggest including the single files conf.d/api-users.conf and conf.d/commands.conf though.
conf.d/api-users.conf for obvious reasons, the conf.d/commands.conf to have the default notification commands usable in the director.

Yes i did restart icinga and the director. I’ve heard about not including recursively but when i did i encountered some errors, which could be bc i didnt include the single files you mentioned. But still i dont know what this [stage] means, so im not even entirely sure where those duplicated references should be.

Might not be 100% accurate: the stage is the created config files that the Director sends via the API, which is then validated.
You can find all that in /var/lib/icinga2/api and its subfolders.

A quick hack can be to delete all subfolders there with rm -rf /var/lib/icinga2/api/* and then try again deploying the config via the Director.

But I just realised that the mentioned host object is in fact your monitoring server it self, correct?
Then you still have the configuration present, because NodeName will resolve to the servers hostname. NodeName is a constant

So either change the hostname in the Director or in the config file to be different or do not include the hosts.conf file by changing the include in the /etc/icinga2/icinga2.conf file.

Hmm, i just removed/renamed every host.conf file, that contained my monitoring server as a host name.
Weird thing → same errors still, even tho I dont have it configured anywhere anymore.
Loaded config without recursive include, only commands.conf and api-users.conf like you said, and it works.
I have no clue why that is, as iam pretty sure i havent configured it anywhere in conf.d
Are these 2 files really the only ones we need?
And thank you very much for your help, much obliged!

What were the remaining contents of the config file?

I would say yes. At least, that’s the only two files I can think of now, that I have included in my Director setups.

I general you could mix the Director and the config files, e.g. under /etc/icinga2/zones.d/..., but it generates some room for confusion, as everything done via the config files is not visible or editable in the Director.