Hi Tilo,

On 2016-11-14 19:55, tilo....@googlemail.com wrote:
Hi Stephan,

On 14.11.2016 16:20, Stephan Tesch wrote:
Am 14.11.2016 um 14:33 schrieb tilo....@googlemail.com:

Hi Tilo,

Hallo,

we're using an Master-Cluster with his own zone "master" and an
galera-sql-cluster for idodb.

The satellites (also HA-Cluster without idodb) are located in own
zones "sat-cluster-location1", "sat-cluster-location" and so on.

All zone-configuration is done on the master.
The sync to the satellites is working fine.

On the master I also get the last checks-result of hosts behind the
satellites via icinga2 console --conect "https://localhost:5665/'.

But I don't get any hosts or checkresults except from the masterzone
itself inside the idodb.
a post of your zones.conf would be helpful. Maybe you forgot to set the
master zone as parent to your satellites.


on master's:
=================

/etc/icinga2.conf:
-----------------
...
include zones.conf.d
include _recursive zones.conf.d
Is there really a space? "include_recursive" is one word which would explain that your "master" zone is not parent. You can also remove the "include zones.conf.d" then.




/etc/icinga2/zones.conf:
-----------------
object Endpoint "master1" {
   host= "xxx.xxx.xxx.xxx"
}

object Endpoint "master2" {
   host= "xxx.xxx.xxx.xxx"
}

object Endpoint "master3" {
   host= "xxx.xxx.xxx.xxx"
}

object Zone "master" {
   endpoints = [ "master1","master2","master3"]
}

object Zone "global"
   global = true
}


/etc/icinga2/zones.conf.d/satA.conf:
-----------------
object Endpoint "satA1" {
   host= "xxx.xxx.xxx.xxx"
}

object Endpoint "satA2" {
   host= "xxx.xxx.xxx.xxx"
}


object Zone "satA" {
   endpoints = [ "satA1","satA2"]
   parent = "master"
}


/etc/icinga2/zones.conf.d/satB.conf:
-----------------
....


/etc/icinga2/zones.d/satA/client1.conf
-----------------
object Endpoint "client1" {
   host = "xxx.xxx.xxx.xxx"
}

object Zone "client1 {
  endpoints = [ "client1" ]
  parent = "satA"
}

object Host "client1" {
  check_command = "hostalive"
  address = "xxx.xxx.xxx.xxx"
  vars.client_endpoint = name;
}


/etc/icinga2/features-enabled/api.conf
------------------
...
accept_config = true
accept_commands = false


-----
icinga2 feature list
=> enabled feature: api checker command ido-mysql mainlog notification

on satA's:
=================

/etc/icinga2.conf:
-----------------
...
include zones.conf.d
include _recursive zones.conf.d



/etc/icinga2.zones.conf.d/satA.conf:
-----------------
object Endpoint "satA1" {
   host= "xxx.xxx.xxx.xxx"
}

object Endpoint "satA2" {
   host= "xxx.xxx.xxx.xxx"
}

object Zone "satA" {
   endpoints = [ "satA1","satA2"]
   parent = "master"
}

object Zone "global"
   global = true
}


/etc/icinga2/zones.conf.d/master.conf:
-----------------
object Endpoint "master1" {
   host= "xxx.xxx.xxx.xxx"
}

object Endpoint "master2" {
   host= "xxx.xxx.xxx.xxx"
}

object Endpoint "master3" {
   host= "xxx.xxx.xxx.xxx"
}

object Zone "master" {
   endpoints = [ "master1","master2","master3"]
}

/etc/icinga2/features-enabled/api.conf
------------------
...
accept_config = true
accept_commands = false

----
icinga2 feature list
=> enabled feature: api checker mainlog notification


auf client1
==========

/etc/icinga2/constants.conf:
------------------
...
const ZoneName = "client1"
const NodeName = "client1"


/etc/icinga2/zones.conf:
------------------

object Endpoint "satA1" {
   host= "xxx.xxx.xxx.xxx"
}

object Endpoint "satA2" {
   host= "xxx.xxx.xxx.xxx"
}

object Zone "satA" {
   endpoints = [ "satA1","satA2"]
}

object Zone "global"
   global = true
}

object Endpoint NodeName {}

object Zone ZoneName {
  endpoints = [ NodeName ]
  parent = "satA"
}

/etc/icinga2/features-enabled/api.conf
------------------
...
accept_config = true
accept_commands = true

----
icinga2 feature list
=> enabled feature: api checker mainlog notification


Problem on Master1:
===========

icinga2 console --connect 'https://localhost:5665/'
    var c = get_host("client1)
    c.last_check_result
=>
   check_source = "satA2"
   state = 0.0000
   type = "Checkresult"
   ....

mysqldump idodb | grep "client1"
=> empty

mysqldump idodb | grep "satA2"
=> empty


mysqldump idodb | grep "master1"
=>   checkresults etc......




Best regards,
Stephan
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

--
Regards
Tobias
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to