Hi!
I’ve got some sync issues after I added a second master to my setup.
First, I set up a debian VM with icinga 2, following this how-to:
https://icinga.com/docs/icinga2/latest/doc/06-distributed-monitoring/#high-availability-master-with-clients
I’ve set “accept_config = false” for API on the primary master (which also holds Director) and “accept_config = true” on the second one (director not installed).
This is what best describes the problem:
mon-master01:
icinga2 object list --type Endpoint | grep -i examplerouter
Object ‘examplerouter.network.local’ of type ‘Endpoint’
(SUCCESS)
mon-master02:
icinga2 object list --type Endpoint | grep -i examplerouter
-nothing-
(FAIL)
systemctl stop icinga2
rm -rf /var/lib/icinga2/api
systemctl start icinga2
icinga2 object list --type Endpoint | grep -i examplerouter
Object ‘examplerouter.network.local’ of type ‘Endpoint’
CONFIG
Identical on both nodes, only NodeName in constants.conf is different!
root@mon-master01:~# cat /etc/icinga2/zones.conf
object Endpoint "mon-master01.example.com" {
host = "192.168.83.10"
}
object Endpoint "mon-master02.example.com" {
host = "192.168.83.11"
}
object Zone "master" {
endpoints = [ "mon-master01.example.com", "mon-master02.example.com" ]
}
object Zone "global-templates" {
global = true
}
object Zone "director-global" {
global = true
}
STATS:
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 1320 Services.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 1 IcingaApplication.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 580 Hosts.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 1 FileLogger.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 945 Dependencies.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 4 NotificationCommands.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 1758 Notifications.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 1 NotificationComponent.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 1 ApiListener.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 1 CheckerComponent.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 333 Zones.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 1 ExternalCommandListener.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 332 Endpoints.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 2 ApiUsers.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 1 User.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 1 IdoMysqlConnection.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 215 CheckCommands.
[2019-07-29 19:01:30 +0200] information/ConfigItem: Instantiated 1 UserGroup.
During rollout phase, there are a lot of changes that are replicated from our CMDB to the Director API. There might be a deployment in director terms every 5 mins.
What am I doing wrong here?
Or is this a bug, maybe this one?
https://github.com/Icinga/icinga2/pull/7150
Comments are welcome! Thank you!