Director - no endpoint for hosts previously manually set

Hi,

I am icinga newbe, so please forgive if I ask something which should be obvious. I haven’t found the answer on the forum, but didn’t read all of it.
I am working on an inherited icinga2 system with the Director, that I didn’t set up myself.

There was monitoring for several systems already set up manually (without the Director, by installing the agent on VM, wizard connecting to icinga server and adding relative lines in /etc/icinga2/zones.d/master/hosts.conf).

State now:

  1. I can successfully add new hosts with the Director and set with a monitoring service template (I install and “wizard” icinga agent on VM, then on Icinga Director I add host using icinga agent host)
  2. I do not succeed to “move” previously manually set hosts to be under Director (I remove relative lines form /etc/icinga2/zones.d/master/hosts.conf - I observe that that host disappears from website dashboard; I add a new host with Director just like in step 1, with the identical hostname as just removed from config). When I do this, icinga complains of lacking endpoint for that host critical/config: Error: Validation failed for object 'vm1.redacted.org!Proceses on Agent' of type 'Service'; Attribute 'command_endpoint': Object 'vm1.redacted.org' of type 'Endpoint' does not exist. Location: in [stage]/zones.d/director-global/service_templates.conf. In fact, when I go to that host in Director and check the preview, the endpoint section disappears as fast as I put vm1.redacted.org in hostname field. If I change it to “test.redacted.org” endpoint appears in Preview tab.
  3. For one host that was previously manually set, but disabled in /etc/icinga2/zones.d/master/hosts.conf for long time, I could set it successfully with above (2) process.

I tried uninstalling (and purging configs) icinga2 on “vm1”, recreating agent with wizard. Still the same error when using Director.

As it is advised, I do not want to manually set the endpoint for Director usage.

Give as much information as you can, e.g.

  • Director version (System - About): 1.10.2
  • Icinga Web 2 version and modules (System - About): Icinga Web 2 Version 2.11.4
  • Icinga 2 version (icinga2 --version): version: r2.13.7-1
  • Operating System and version: Debian 11
  • Webserver, PHP versions: apache, php 7.4

I generally followed Working with Agent doc, despite some slight differences.

Please indicate how to handle this situation properly.

Thank you.

Hi,
I would very much appreciate any clues or any directions.
I really got stuck :confused:
Thank you,

Hosts that are monitored by the agent not only have a host object but a endpoint and a zone object as well (named exactly like the host)

When you create the host object inside the Director it will only create the host part by default.
To also create the endpoint and zone objects you need to set the appropriate options as well.
Example:


Cluster Zone is the parent zone of that agent. In case of a single node monitoring system you can leave it blank or set it to your masters zone name (master by default)

Hi,
many thanks for answering!
Unfortunately, for those hosts this was not happening.

But! I have discovered the reason of strange behaviour!
I found that there were actually some Endpoints and Zones (corresponding to those hosts) created on Icinga Director (just under the banner not to do it, apparently someone didn’t resist the urge to try it!). After deleting them (through interface or : How to Delete Zone) all is working as expected!

Maybe that serves someone stuck as I was.

Greets!

1 Like