No deployments possible

Hi all,

Im am VERY new to all of this monitoring stuff. I want to use it to monitor my Homelab VMs.
So I did get it to work .. after 6 Hours fiddeling around because the Quick Start Guide for Linux / ubuntu misses a fiew Database setup steps for me so I had to figure them out myself.

My issue now is: My MGMT-VM is the ubuntu server which runs ICINGA2. This VM is now Up in the Webinterface and has the very basic default checks from hostalive. Good so far.

Now the interessting part: my second VM is a Windows Server 2022 which Id like to monitor too offcourse. I did install the icinga agent, configured it to point to the Ubutnu MGMT-VM, created certificates for the Windows VM etc.

Now my problem … I cannot even deploy a Template anymore? Wanted to do a simple windows-host which has the Icinga2 Agent enabled and request connection set to Yes but the director just tells me: X Deployment failed.

[2025-05-02 16:26:01 +0200] information/cli: Icinga application loader (version: r2.14.5-1)
[2025-05-02 16:26:01 +0200] information/cli: Loading configuration file(s).
[2025-05-02 16:26:01 +0200] critical/config: Error: Object ‘MGMT-VM’ of type ‘Host’ re-defined: in [stage]/zones.d/MGMT-VM/hosts.conf: 1:0-1:20; previous definition: in /etc/icinga2/conf.d/hosts.conf: 18:1-18:20 Location: in [stage]/zones.d/MGMT-VM/hosts.conf: 1:0-1:20 [stage]/zones.d/MGMT-VM/hosts.conf(1): object Host “MGMT-VM” { ^^^^^^^^^^^^^^^^^^^^^ [stage]/zones.d/MGMT-VM/hosts.conf(2): import “standard-host” [stage]/zones.d/MGMT-VM/hosts.conf(3):
[2025-05-02 16:26:01 +0200] critical/cli: Config validation failed. Re-run with ‘icinga2 daemon -C’ after fixing the config.

Is what comes for EVERY deployment I do. So wether I tried to deploy my Windows Server VM as host or when I deployed my template.

Any kind of help is highly appreciated because I start to feel pretty down and frustrated.

Sincerly
MusicBoy

Hello and welcome.

The error message tells you the problem
Object ‘MGMT-VM’ of type ‘Host’ re-defined

I suspect that you first created the host object for MGMT-VM in the config files under /etc/icinga2/zones.d and then used the Icinga Director to create the host. That causes the issue.

You can mix local config files and the Icinga Director, but you have to be careful not to redefine objects.

In case you did not create a config for your MGMT-VM host it could be that you have the default config under /etc/icinga2/conf.d not excluded. Which would normally be done after running the icinga2 node wizard command to set up the master/satellite.

Hi and thank you so much!

So I fixed it by commenting out of the config files where the localhost, or as intended the MGMT-VM, was also defined. Saved the file, restarted Icinga2 and it worked. Got the Windows VM integrated too now which is already amazing progress.

Mind If I ask if the Quick Start Guide is Open Source too? I personally fought a little with how its setup. Some Steps I would write into a such a Wiki were not present or simply not written because many here seem to have alot of knowledge. Im learing system integration so for me some “easy out of the head” items like “Install MySQL because you will need it” beforehand are a bit difficult :slight_smile:

Thank you for pointing out the doubled config too :folded_hands:

Not sure what you mean by that, but if it is aimed at the icinga2 node wizard, then that is described here (https://icinga.com/docs/icinga-2/latest/doc/02-installation/02-Ubuntu/#set-up-icinga-2-api) and here (https://icinga.com/docs/icinga-2/latest/doc/06-distributed-monitoring/#master-setup)

There also is a Tutorials and Guides section: