Zones configuration

Hi
I had working system, but after upgrade to r2.12.1-1 my configuration iás not valid.
Trying to solve this problem, I used

vim /etc/icinga2/zones.conf

object Zone "master" {
  endpoints = [ "icinga2-master1.localdomain", "icinga2-master2.localdomain" ]
}

object Zone "satellite" {
  endpoints = [ "icinga2-satellite1.localdomain", "icinga2-satellite1.localdomain" ]
}

(from icinga doc) as template, my record in zones.conf is

object Zone “master” {
endpoints = [“comp1”, “comp2”, “comp3”]
}
running icinga2 daemon -C
the response is warning/Zone: The Zone object “master” has more than two endpoints …

My site is flat, one net with one ofiice, so no satellites, 8 devices
How to solve this, please
Thanks Mike

HI @mutex

To sole you problem you would need to change:

object Zone “master” {
    endpoints = [“comp1”, “comp2”, “comp3”]
}

To

object Zone “master” {
    endpoints = [“comp1”, “comp2”]
}

There can only be 2 masters, and 2 satellites per zone

So you would need to break your configuration / redesign your setup I am afraid.

I’m more familiar with setups with satellites but this should work for your master only setup.

The “master” zone has only one endpoint, your master icinga2 instance

comp1-8 are defined as endpoints of their own zones and the parent is the master zone.

Edit: The issue is that your master zone must have your master instance as its endpoint. The hosts you’re monitoring are defined in the examples below

object Zone “master” {
   endpoints = [“comp1”, “comp2”, “comp3”]
}

zones.conf - master

object Endpoint "icinga2-master1.localdomain" {
 }

object Zone "master" {
  endpoints = [ "icinga2-master1.localdomain" ]
}

object Endpoint "comp1" {
 }
object Zone "comp1" {
  endpoints = ["comp1"]
  parent = "master" 

etc etc with comp{2…8}

conf.d/hosts.conf on master

object Host "comp1" {
  name = "comp1"
  import = "generic-host"
  address = "$ip"
}

etc etc with comp{2…8}

comp1 /etc/icinga2/zones.conf

object Endpoint "icinga2-master1.localdomain" {
       host = "$ip"
 }

object Endpoint "comp1" {
 }

etc with the other comps