Hello Roland.
I managed to end the infinite loop by stopping the agent, and deleting:
/var/lib/icinga2/api/zones
/var/lib/icinga2/api/zones-stage
The satellite node just stays in ‘pending’ state on icingaweb. (I also use director)
icinga2 version: 2.11.3-1
I have everything set up for HA Master and a number of satellite zones. All nodes are running the icinga2 agent.
The satellite certs were signed using a ticket when I ran the icinga node wizard.
Here is my zone.conf files (no typos that I can see).
awsir-sdmon-sat01.somedomain.net
#####################################
/etc/icinga2/zones.conf
object Endpoint "enf-sdmon-mstr01.somedomain.net" {
// This endpoint will connnect to us
}
object Endpoint "awsir-sdmon-mstr02.somedomain.net" {
// This endpoint will connnect to us
}
object Endpoint "awsir-sdmon-sat01.somedomain.net" {
// This server
}
object Zone "master" {
endpoints = [ "enf-sdmon-mstr01.somedomain.net", "awsir-sdmon-mstr02.somedomain.net" ]
}
object Zone "awsir-sdmon-satellite" {
endpoints = [ "awsir-sdmon-sat01.somedomain.net" ]
parent = "master"
}
object Zone "global-templates" {
global = true
}
object Zone "director-global" {
global = true
}
enf-sdmon-mstr01.somedomain.net
#####################################
/etc/icinga2/zones.conf
// Primary master
object Endpoint "enf-sdmon-mstr01.somedomain.net" {
// This server
}
// Secondary master
object Endpoint "awsir-sdmon-mstr02.somedomain.net" {
// Actively connect to the secondary master
host = "awsir-sdmon-mstr02.somedomain.net"
}
// Satellite Endpoints
object Endpoint "enf-emea01-sat01.somedomain.net" {
// Actively connect to satellite
host = "enf-emea01-sat01.somedomain.net"
}
object Endpoint "enf-emea02-sat01.somedomain.net" {
// Actively connect to satellite
host = "enf-emea02-sat01.somedomain.net"
}
object Endpoint "awsir-sdmon-sat01.somedomain.net" {
// Actively connect to satellite
host = "awsir-sdmon-sat01.somedomain.net"
}
// MASTER ZONE
object Zone "master" {
endpoints = [ "enf-sdmon-mstr01.somedomain.net", "awsir-sdmon-mstr02.somedomain.net" ]
}
// ENF EMEA01 Satellite
object Zone "enf-emea01-satellite" {
endpoints = [ "enf-emea01-sat01.somedomain.net" ]
parent = "master"
}
// ENF EMEA02 Satellite
object Zone "enf-emea02-satellite" {
endpoints = [ "enf-emea02-sat01.somedomain.net" ]
parent = "master"
// AWSIR Satellite
object Zone "awsir-sdmon-satellite" {
endpoints = [ "awsir-sdmon-sat01.somedomain.net" ]
parent = "master"
}
object Zone "global-templates" {
global = true
}
object Zone "director-global" {
global = true
awsir-sdmon-mstr02.somedomain.net
#####################################
/etc/icinga2/zones.conf
// primary master
object Endpoint "enf-sdmon-mstr01.somedomain.net" {
// First master already connects to us
}
// Secondary master
object Endpoint "awsir-sdmon-mstr02.somedomain.net" {
// This server
}
// Satellite Endpoints
object Endpoint "enf-emea01-sat01.somedomain.net" {
// Actively connect to satellite
// host = "enf-emea01-sat01.somedomain.net"
}
object Endpoint "enf-emea02-sat01.somedomain.net" {
// Actively connect to satellite
// host = "enf-emea02-sat01.somedomain.net"
}
object Endpoint "awsir-sdmon-sat01.somedomain.net" {
// Actively connect to satellite
// host = "awsir-sdmon-sat01.somedomain.net"
}
// MASTER ZONE
object Zone "master" {
endpoints = [ "enf-sdmon-mstr01.somedomain.net", "awsir-sdmon-mstr02.somedomain.net" ]
}
// ENF EMEA01 Satellite
object Zone "enf-emea01-satellite" {
endpoints = [ "enf-emea01-sat01.somedomain.net" ]
parent = "master"
}
// ENF EMEA02 Satellite
object Zone "enf-emea02-satellite" {
endpoints = [ "enf-emea02-sat01.somedomain.net" ]
parent = "master"
}
// AWSIR Satellite
object Zone "awsir-sdmon-satellite" {
endpoints = [ "awsir-sdmon-sat01.somedomain.net" ]
parent = "master"
}
object Zone "global-templates" {
global = true
}
object Zone "director-global" {
global = true
}
Log file from Satellite
##################
[2020-07-14 10:20:38 +0000] information/WorkQueue: #5 (ApiListener, RelayQueue) items: 0, rate: 0/s (0/min 0/5min 0/15min); [0/5684]
[2020-07-14 10:24:00 +0000] information/ConfigObject: Dumping program state to file '/var/lib/icinga2/icinga2.state'
[2020-07-14 10:25:48 +0000] information/WorkQueue: #6 (ApiListener, SyncQueue) items: 0, rate: 0/s (0/min 0/5min 0/15min);
[2020-07-14 10:25:48 +0000] information/WorkQueue: #5 (ApiListener, RelayQueue) items: 0, rate: 0/s (0/min 0/5min 0/15min);
[2020-07-14 10:26:55 +0000] warning/JsonRpcConnection: API client disconnected for identity 'enf-sdmon-mstr01.xxxxxx.net'
[2020-07-14 10:26:55 +0000] warning/ApiListener: Removing API client for endpoint 'enf-sdmon-mstr01.xxxxxx.net'. 0 API clients left.
[2020-07-14 10:26:55 +0000] information/ApiListener: New client connection for identity 'enf-sdmon-mstr01.xxxxxx.net' from [10.44.136.61]:42030
[2020-07-14 10:26:55 +0000] information/ApiListener: Requesting new certificate for this Icinga instance from endpoint 'enf-sdmon-mstr01.xxxxxx.net'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Sending config updates for endpoint 'enf-sdmon-mstr01.xxxxxx.net' in zone 'master'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Finished sending config file updates for endpoint 'enf-sdmon-mstr01.xxxxxx.net' in zone 'master'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Syncing runtime objects to endpoint 'enf-sdmon-mstr01.xxxxxx.net'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Finished syncing runtime objects to endpoint 'enf-sdmon-mstr01.xxxxxx.net'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Finished sending runtime config updates for endpoint 'enf-sdmon-mstr01.xxxxxx.net' in zone 'master'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Sending replay log for endpoint 'enf-sdmon-mstr01.xxxxxx.net' in zone 'master'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Finished sending replay log for endpoint 'enf-sdmon-mstr01.xxxxxx.net' in zone 'master'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Finished syncing endpoint 'enf-sdmon-mstr01.xxxxxx.net' in zone 'master'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Applying config update from endpoint 'enf-sdmon-mstr01.xxxxxx.net' of zone 'master'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Received configuration for zone 'awsir-sdmon-satellite' from endpoint 'enf-sdmon-mstr01.xxxxxx.net'. Comparing the timestamp and checksums.
[2020-07-14 10:26:55 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/awsir-sdmon-satellite//director/hosts.conf' for zone 'awsir-sdmon-satellite'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Applying configuration file update for path '/var/lib/icinga2/api/zones-stage/awsir-sdmon-satellite' (299 Bytes).
[2020-07-14 10:26:55 +0000] information/ApiListener: Received configuration for zone 'director-global' from endpoint 'enf-sdmon-mstr01.xxxxxx.net'. Comparing the timestamp and checksums.
[2020-07-14 10:26:55 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/director-global//director/001-director-basics.conf' for zone 'director-global'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/director-global//director/host_templates.conf' for zone 'director-global'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/director-global//director/hostgroups.conf' for zone 'director-global'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/director-global//director/service_apply.conf' for zone 'director-global'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/director-global//director/service_templates.conf' for zone 'director-global'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/director-global//director/servicesets.conf' for zone 'director-global'.
[2020-07-14 10:26:55 +0000] information/ApiListener: Applying configuration file update for path '/var/lib/icinga2/api/zones-stage/director-global' (3431 Bytes).
[2020-07-14 10:26:55 +0000] information/ApiListener: Received configuration updates (2) from endpoint 'enf-sdmon-mstr01.xxxxxx.net' do not qualify for production, not triggering reload.
[2020-07-14 10:29:00 +0000] information/ConfigObject: Dumping program state to file '/var/lib/icinga2/icinga2.state'
[2020-07-14 10:30:58 +0000] information/WorkQueue: #5 (ApiListener, RelayQueue) items: 0, rate: 0/s (0/min 0/5min 0/15min);
[2020-07-14 10:30:58 +0000] information/WorkQueue: #6 (ApiListener, SyncQueue) items: 0, rate: 0/s (0/min 0/5min 0/15min);
Thanks you for replying, I am stuck as to why this node never goes from pending state on icingaweb2.
Btw, this is a fresh installation, everything installed is latests. I can delete dir’s if needed as I do not have any other nodes set up yet. I really want to see all my satelliltes up and having checks performed before setting up other nodes.
Peter