Simple distributed monitoring - more than one zones

Hello,

i would like use icinga distributed monitoring system with one Master server - mon-master (icingaweb2 + ido + icingadb + icingadb_web + icinga director) and two checkers (endpoints). I need monitor the hosts on different nodes, for example: one host i want monitor only via mon-int and next host i will monitor via mon-web. And this works via Director perfectly (I set for each host the cluster-zone).

Now i have set zone.conf :

object Endpoint "mon-master" {
}

object Zone "master" {
         endpoints = [ "mon-master" ]
}

object Endpoint "mon-int" {
 }

object Zone "mon-int" {
         endpoints = [ "mon-int" ]
         parent = "master"
}

object Endpoint "mon-web" {
}

object Zone "mon-web" {
         endpoints = [ "mon-web" ]
         parent = "master"
}

 object Zone "global-templates" {
     global = true
 }

object Zone "director-global" {
     global = true
 }

Now i need monitoring first host with service on both endpoints (mon-int and mon-web), but doesn’t work.

I tried add the new zone, but this change do not accept Icinga (critical/config: Error: Endpoint ‘mon-x’ is in more than one zone.) :

object Zone "all-checkers" {
         endpoints = [ "mon-int", "mon-web" ]
         parent = "master"
 }

Can you please help me ?

Many thanks.

Hi and welcome,

every host object can only be in one zone. If you want to make checks from both zones (why?) you have to create a host object in both zones with a different name (but same ip is possible).

Regards,
Carsten

Hi,

maybe i don’t understand the topology of icinga2 very well.

Ok , thats schema … i want have some checks on “mon-int” and some on “mon-web” and some checks on both (mon-int + mon-web) and thats manage via Icinga Director (mon-master).

ic2-zones

Exists some solution ?

Hello,

yes you can have many zones. But each host object (hosts you want to minitor) can only be attached to one zone.

See the Distributed Monitoring with Master, Satellites and Agents docs for more inforamtion.

Regards,
Carsten

2 Likes

Good Morning,

thank you, i read this manual but i don’t found the solution … i will read it again …