I have a master zone that defines
object Host "myhost.mydomain". And I have a satellite zone has the master zone as its parent and that refers to
host_name = "myhost.mydomain" in a
Service definition. (The reason why I placed this host in the master zone is because I want its
ping to originate from the master.)
This setup apparently fails. When I enable
debuglog it contains a reference to
/var/lib/icinga2/api/zones-stage-startup-last-failed.log and there the error reads “Object ‘myhost.mydomain’ of type ‘Host’ does not exist”. So can a child zone not refer to objects from its parents, I thought it can?
One the one hand I see only subdirectories for the child zone (and global zones) below
myhost. So that suggests no. The book “Icinga 2: Ein praktischer Einstieg ins Monitoring” says on page 204 “damit gehört jees Objekt, dass im Verzeichnis
dmz defifniert ist automatisch zur Zone master”. That also suggests no.
On the other hand
icinga2 object list -t host on
Object 'myhost.mydomain' of type 'Host'. So that suggests yes. The documentation says " the trust hierarchy allows for example the
master zone to send configuration files to the
satellite zone". (
accept_config = true.) So that also kind of suggests yes.
Which one is it? What could I be doing wrong? Perhaps I have got the direction of inheritance wrong.