I managed the second master write to the database by reinstalling the whole setup for the second master.
One strange thing still happens. When master1 (ma01) and master2 (sa02) run in HA everything is fine. Usually master1 writes to the IDO. But when master1 is turned off, master2 takes over the checks, but deletes all host objects from the database.
Debug.log of master2 (sa02)
[2022-02-18 16:51:41 +0100] notice/ApiListener: Setting log position for identity 'otn-ac-monq-ma01.localdomain': 2022/02/18 16:51:26
[2022-02-18 16:51:41 +0100] debug/ApiListener: Not connecting to Endpoint 'otn-ac-monq-sa02.localdomain' because that's us.
[2022-02-18 16:51:41 +0100] debug/ApiListener: Not connecting to Endpoint 'otn-ac-monq-ma01.localdomain' because the host/port attributes are missing.
[2022-02-18 16:51:41 +0100] notice/ApiListener: Updating object authority for objects at endpoint 'otn-ac-monq-sa02.localdomain'.
[2022-02-18 16:51:41 +0100] notice/ApiListener: Current zone master: otn-ac-monq-ma01.localdomain
[2022-02-18 16:51:41 +0100] notice/ApiListener: Connected endpoints: otn-ac-monq-ma01.localdomain (1)
[2022-02-18 16:51:46 +0100] notice/CheckerComponent: Pending checkables: 0; Idle checkables: 0; Checks/s: 0
[2022-02-18 16:51:46 +0100] notice/ApiListener: Setting log position for identity 'otn-ac-monq-ma01.localdomain': 2022/02/18 16:51:26
[2022-02-18 16:51:49 +0100] notice/JsonRpcConnection: Received 'event::SetLastCheckStarted' message from identity 'otn-ac-monq-ma01.localdomain'.
[2022-02-18 16:51:49 +0100] notice/JsonRpcConnection: Received 'event::SetNextCheck' message from identity 'otn-ac-monq-ma01.localdomain'.
[2022-02-18 16:51:51 +0100] notice/DbConnection: Updating programstatus table.
[2022-02-18 16:51:51 +0100] notice/CheckerComponent: Pending checkables: 0; Idle checkables: 0; Checks/s: 0
[2022-02-18 16:51:51 +0100] notice/ApiListener: Setting log position for identity 'otn-ac-monq-ma01.localdomain': 2022/02/18 16:51:49
[2022-02-18 16:51:51 +0100] notice/ApiListener: Updating object authority for objects at endpoint 'otn-ac-monq-sa02.localdomain'.
[2022-02-18 16:51:51 +0100] debug/ApiListener: Not connecting to Endpoint 'otn-ac-monq-sa02.localdomain' because that's us.
[2022-02-18 16:51:51 +0100] debug/ApiListener: Not connecting to Endpoint 'otn-ac-monq-ma01.localdomain' because the host/port attributes are missing.
[2022-02-18 16:51:51 +0100] notice/ApiListener: Current zone master: otn-ac-monq-ma01.localdomain
[2022-02-18 16:51:51 +0100] notice/ApiListener: Connected endpoints: otn-ac-monq-ma01.localdomain (1)
[2022-02-18 16:51:53 +0100] notice/JsonRpcConnection: Received 'event::SetNextCheck' message from identity 'otn-ac-monq-ma01.localdomain'.
[2022-02-18 16:51:53 +0100] notice/JsonRpcConnection: Received 'event::CheckResult' message from identity 'otn-ac-monq-ma01.localdomain'.
[2022-02-18 16:51:56 +0100] notice/CheckerComponent: Pending checkables: 0; Idle checkables: 0; Checks/s: 0
[2022-02-18 16:51:56 +0100] notice/ApiListener: Setting log position for identity 'otn-ac-monq-ma01.localdomain': 2022/02/18 16:51:53
[2022-02-18 16:51:58 +0100] notice/JsonRpcConnection: Received 'event::Heartbeat' message from identity 'otn-ac-monq-ma01.localdomain'.
[2022-02-18 16:52:01 +0100] notice/DbConnection: Updating programstatus table.
[2022-02-18 16:52:01 +0100] notice/CheckerComponent: Pending checkables: 0; Idle checkables: 0; Checks/s: 0
[2022-02-18 16:52:01 +0100] notice/ApiListener: Setting log position for identity 'otn-ac-monq-ma01.localdomain': 2022/02/18 16:51:53
[2022-02-18 16:52:01 +0100] debug/ApiListener: Not connecting to Endpoint 'otn-ac-monq-sa02.localdomain' because that's us.
[2022-02-18 16:52:01 +0100] notice/ApiListener: Updating object authority for objects at endpoint 'otn-ac-monq-sa02.localdomain'.
[2022-02-18 16:52:01 +0100] debug/ApiListener: Not connecting to Endpoint 'otn-ac-monq-ma01.localdomain' because the host/port attributes are missing.
[2022-02-18 16:52:01 +0100] notice/ApiListener: Current zone master: otn-ac-monq-ma01.localdomain
[2022-02-18 16:52:01 +0100] notice/ApiListener: Connected endpoints: otn-ac-monq-ma01.localdomain (1)
[2022-02-18 16:52:06 +0100] notice/CheckerComponent: Pending checkables: 0; Idle checkables: 0; Checks/s: 0
[2022-02-18 16:52:06 +0100] notice/ApiListener: Setting log position for identity 'otn-ac-monq-ma01.localdomain': 2022/02/18 16:51:53
[2022-02-18 16:52:11 +0100] notice/DbConnection: Updating programstatus table.
[2022-02-18 16:52:11 +0100] notice/CheckerComponent: Pending checkables: 0; Idle checkables: 0; Checks/s: 0
[2022-02-18 16:52:11 +0100] notice/ApiListener: Setting log position for identity 'otn-ac-monq-ma01.localdomain': 2022/02/18 16:51:53
[2022-02-18 16:52:11 +0100] notice/ApiListener: Updating object authority for objects at endpoint 'otn-ac-monq-sa02.localdomain'.
[2022-02-18 16:52:11 +0100] debug/ApiListener: Not connecting to Endpoint 'otn-ac-monq-sa02.localdomain' because that's us.
[2022-02-18 16:52:11 +0100] debug/ApiListener: Not connecting to Endpoint 'otn-ac-monq-ma01.localdomain' because the host/port attributes are missing.
[2022-02-18 16:52:11 +0100] notice/ApiListener: Current zone master: otn-ac-monq-ma01.localdomain
[2022-02-18 16:52:11 +0100] notice/ApiListener: Connected endpoints: otn-ac-monq-ma01.localdomain (1)
[2022-02-18 16:52:16 +0100] notice/CheckerComponent: Pending checkables: 0; Idle checkables: 0; Checks/s: 0
[2022-02-18 16:52:16 +0100] notice/ApiListener: Setting log position for identity 'otn-ac-monq-ma01.localdomain': 2022/02/18 16:51:53
[2022-02-18 16:52:17 +0100] notice/JsonRpcConnection: Error while reading JSON-RPC message for identity 'otn-ac-monq-ma01.localdomain': Error: short read
Stacktrace:
0# __cxa_throw in /usr/lib64/icinga2/sbin/icinga2
1# icinga::NetString::ReadStringFromStream(boost::intrusive_ptr<icinga::Shared<icinga::AsioTlsStream> > const&, boost::asio::basic_yield_context<boost::asio::executor_binder<void (*)(), boost::asio::executor> >, long) in /usr/lib64/icinga2/sbin/icinga2
2# icinga::JsonRpc::ReadMessage(boost::intrusive_ptr<icinga::Shared<icinga::AsioTlsStream> > const&, boost::asio::basic_yield_context<boost::asio::executor_binder<void (*)(), boost::asio::executor> >, long) in /usr/lib64/icinga2/sbin/icinga2
3# icinga::JsonRpcConnection::HandleIncomingMessages(boost::asio::basic_yield_context<boost::asio::executor_binder<void (*)(), boost::asio::executor> >) in /usr/lib64/icinga2/sbin/icinga2
4# 0x0000000000AFA8B7 in /usr/lib64/icinga2/sbin/icinga2
5# 0x0000000000B06A89 in /usr/lib64/icinga2/sbin/icinga2
6# make_fcontext in /lib64/libboost_context.so.1.69.0
[2022-02-18 16:52:17 +0100] warning/JsonRpcConnection: API client disconnected for identity 'otn-ac-monq-ma01.localdomain'
[2022-02-18 16:52:17 +0100] warning/ApiListener: Removing API client for endpoint 'otn-ac-monq-ma01.localdomain'. 0 API clients left.
[2022-02-18 16:52:17 +0100] debug/EndpointDbObject: update is_connected=0 for endpoint 'otn-ac-monq-ma01.localdomain'
[2022-02-18 16:52:21 +0100] notice/DbConnection: Updating programstatus table.
[2022-02-18 16:52:21 +0100] notice/CheckerComponent: Pending checkables: 0; Idle checkables: 0; Checks/s: 0
[2022-02-18 16:52:21 +0100] debug/ApiListener: Not connecting to Endpoint 'otn-ac-monq-sa02.localdomain' because that's us.
[2022-02-18 16:52:21 +0100] debug/ApiListener: Not connecting to Endpoint 'otn-ac-monq-ma01.localdomain' because the host/port attributes are missing.
[2022-02-18 16:52:21 +0100] notice/ApiListener: Current zone master: otn-ac-monq-sa02.localdomain
[2022-02-18 16:52:21 +0100] notice/ApiListener: Connected endpoints:
[2022-02-18 16:52:21 +0100] notice/ApiListener: Updating object authority for objects at endpoint 'otn-ac-monq-sa02.localdomain'.
[2022-02-18 16:52:21 +0100] information/IdoPgsqlConnection: 'ido-pgsql' resumed.
[2022-02-18 16:52:21 +0100] information/DbConnection: Resuming IDO connection: ido-pgsql
[2022-02-18 16:52:21 +0100] debug/IdoPgsqlConnection: Query: SELECT version FROM icinga_dbversion WHERE name='idoutils'
[2022-02-18 16:52:21 +0100] debug/IdoPgsqlConnection: Query: SELECT instance_id FROM icinga_instances WHERE instance_name = 'default'
[2022-02-18 16:52:21 +0100] debug/IdoPgsqlConnection: Query: SELECT UNIX_TIMESTAMP(status_update_time) AS status_update_time, endpoint_name FROM icinga_programstatus WHERE instance_id = 1
[2022-02-18 16:52:21 +0100] information/IdoPgsqlConnection: Last update by endpoint 'otn-ac-monq-ma01.localdomain' was 13.1428s ago (< failover timeout of 30s). Retrying.
[2022-02-18 16:52:26 +0100] notice/CheckerComponent: Pending checkables: 0; Idle checkables: 0; Checks/s: 0
[2022-02-18 16:52:31 +0100] notice/DbConnection: Updating programstatus table.
[2022-02-18 16:52:31 +0100] notice/CheckerComponent: Pending checkables: 0; Idle checkables: 0; Checks/s: 0
[2022-02-18 16:52:31 +0100] notice/ApiListener: Updating object authority for objects at endpoint 'otn-ac-monq-sa02.localdomain'.
[2022-02-18 16:52:31 +0100] debug/ApiListener: Not connecting to Endpoint 'otn-ac-monq-sa02.localdomain' because that's us.
[2022-02-18 16:52:31 +0100] debug/ApiListener: Not connecting to Endpoint 'otn-ac-monq-ma01.localdomain' because the host/port attributes are missing.
[2022-02-18 16:52:31 +0100] notice/ApiListener: Current zone master: otn-ac-monq-sa02.localdomain
[2022-02-18 16:52:31 +0100] notice/ApiListener: Connected endpoints:
[2022-02-18 16:52:31 +0100] debug/IdoPgsqlConnection: Query: SELECT version FROM icinga_dbversion WHERE name='idoutils'
[2022-02-18 16:52:31 +0100] debug/IdoPgsqlConnection: Query: SELECT instance_id FROM icinga_instances WHERE instance_name = 'default'
[2022-02-18 16:52:31 +0100] debug/IdoPgsqlConnection: Query: SELECT UNIX_TIMESTAMP(status_update_time) AS status_update_time, endpoint_name FROM icinga_programstatus WHERE instance_id = 1
[2022-02-18 16:52:31 +0100] information/IdoPgsqlConnection: Last update by endpoint 'otn-ac-monq-ma01.localdomain' was 23.1433s ago (< failover timeout of 30s). Retrying.
[2022-02-18 16:52:36 +0100] notice/CheckerComponent: Pending checkables: 0; Idle checkables: 0; Checks/s: 0
[2022-02-18 16:52:41 +0100] notice/DbConnection: Updating programstatus table.
[2022-02-18 16:52:41 +0100] notice/CheckerComponent: Pending checkables: 0; Idle checkables: 0; Checks/s: 0
[2022-02-18 16:52:41 +0100] debug/ApiListener: Not connecting to Endpoint 'otn-ac-monq-sa02.localdomain' because that's us.
[2022-02-18 16:52:41 +0100] debug/ApiListener: Not connecting to Endpoint 'otn-ac-monq-ma01.localdomain' because the host/port attributes are missing.
[2022-02-18 16:52:41 +0100] notice/ApiListener: Current zone master: otn-ac-monq-sa02.localdomain
[2022-02-18 16:52:41 +0100] notice/ApiListener: Connected endpoints:
[2022-02-18 16:52:41 +0100] notice/ApiListener: Updating object authority for objects at endpoint 'otn-ac-monq-sa02.localdomain'.
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: SELECT version FROM icinga_dbversion WHERE name='idoutils'
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: SELECT instance_id FROM icinga_instances WHERE instance_name = 'default'
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: SELECT UNIX_TIMESTAMP(status_update_time) AS status_update_time, endpoint_name FROM icinga_programstatus WHERE instance_id = 1
[2022-02-18 16:52:41 +0100] information/IdoPgsqlConnection: Last update by endpoint 'otn-ac-monq-ma01.localdomain' was 33.1426s ago. Taking over 'ido-pgsql' in HA zone 'master'.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Enabling IDO connection.
[2022-02-18 16:52:41 +0100] information/IdoPgsqlConnection: PGSQL IDO instance id: 1 (schema version: '1.14.3')
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:41 +0100] notice/DbConnection: Updating programstatus table.
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: DELETE FROM icinga_programstatus WHERE instance_id = 1
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: INSERT INTO icinga_programstatus (active_host_checks_enabled, active_service_checks_enabled, daemon_mode, endpoint_name, event_handlers_enabled, flap_detection_enabled, instance_id, is_currently_running, last_command_check, notifications_enabled, passive_host_checks_enabled, passive_service_checks_enabled, process_id, process_performance_data, program_start_time, program_version, status_update_time) VALUES ('1', '1', '1', 'otn-ac-monq-sa02.localdomain', '1', '1', 1, '1', TO_TIMESTAMP(1645199561) AT TIME ZONE 'UTC', '1', '1', '1', '2794', '1', TO_TIMESTAMP(1645199361) AT TIME ZONE 'UTC', '2.13.2-1', TO_TIMESTAMP(1645199561) AT TIME ZONE 'UTC')
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: DELETE FROM icinga_runtimevariables WHERE instance_id = 1
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: INSERT INTO icinga_runtimevariables (instance_id, varname, varvalue) VALUES (1, 'total_services', '0')
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: INSERT INTO icinga_runtimevariables (instance_id, varname, varvalue) VALUES (1, 'total_scheduled_services', '0')
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: INSERT INTO icinga_runtimevariables (instance_id, varname, varvalue) VALUES (1, 'total_hosts', '0')
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: INSERT INTO icinga_runtimevariables (instance_id, varname, varvalue) VALUES (1, 'total_scheduled_hosts', '0')
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: INSERT INTO icinga_conninfo (instance_id, connect_time, last_checkin_time, agent_name, agent_version, connect_type, data_start_time) VALUES (1, NOW(), NOW(), 'icinga2 db_ido_pgsql', '2.13.2-1', 'INITIAL', NOW())
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: SELECT zone_object_id AS object_id, zone_id, config_hash FROM icinga_zones
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: SELECT host_object_id AS object_id, host_id, config_hash FROM icinga_hosts
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: SELECT contactgroup_object_id AS object_id, contactgroup_id, config_hash FROM icinga_contactgroups
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: SELECT endpoint_object_id AS object_id, endpoint_id, config_hash FROM icinga_endpoints
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: SELECT contact_object_id AS object_id, contact_id, config_hash FROM icinga_contacts
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: SELECT hostgroup_object_id AS object_id, hostgroup_id, config_hash FROM icinga_hostgroups
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: SELECT service_object_id AS object_id, service_id, config_hash FROM icinga_services
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: SELECT object_id AS object_id, command_id, config_hash FROM icinga_commands
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: SELECT timeperiod_object_id AS object_id, timeperiod_id, config_hash FROM icinga_timeperiods
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: SELECT servicegroup_object_id AS object_id, servicegroup_id, config_hash FROM icinga_servicegroups
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: SELECT object_id, objecttype_id, name1, name2, is_active FROM icinga_objects WHERE instance_id = 1
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: 'otnCloudPetW45 - Bruno L [AC.OPS]' name2: ''.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: 'otnCloudPetW45 - Bruno L [AC.OPS]' name2: 'ping4'.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: 'otnCloudPetW45 - Bruno L [AC.OPS]' name2: 'ping'.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: 'otnCloudPetW45 - Bruno L [AC.OPS]2' name2: ''.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: 'linux-servers' name2: ''.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: 'windows-servers' name2: ''.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: 'notification_mail-host-notification' name2: ''.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: 'notification_mail-service-notification' name2: ''.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: 'otnCloudPetW45 - Bruno L [AC.OPS]2' name2: 'ping'.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: 'otnCloudPetW45 - Bruno L [AC.OPS]2' name2: 'ping4'.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: 'ping' name2: ''.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: 'http' name2: ''.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: 'disk' name2: ''.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: 'never' name2: ''.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: '9to5' name2: ''.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: '24x7' name2: ''.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: 'icingaadmin' name2: ''.
[2022-02-18 16:52:41 +0100] notice/IdoPgsqlConnection: Deactivate deleted object name1: 'icingaadmins' name2: ''.
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_endpoints SET config_hash = '61e197131b567c088a10a0811c4db7b9b59e4f6bd5bb2d9c5911cb9031c03cff', config_type = '1', endpoint_object_id = 289, identity = 'otn-ac-monq-sa02.localdomain', instance_id = 1, node = 'otn-ac-monq-sa02.localdomain', zone_object_id = 288 WHERE endpoint_object_id = 289
[2022-02-18 16:52:41 +0100] debug/EndpointDbObject: update status for endpoint 'otn-ac-monq-sa02.localdomain'
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_endpointstatus SET endpoint_object_id = 289, identity = 'otn-ac-monq-sa02.localdomain', instance_id = 1, is_connected = '1', node = 'otn-ac-monq-sa02.localdomain', status_update_time = TO_TIMESTAMP(1645199561) AT TIME ZONE 'UTC', zone_object_id = 288 WHERE endpoint_object_id = 289
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_endpoints SET config_hash = '648b2db26cd94e4cc3e90ded4151165d2fa4391159672f2337cf0a033efe79e7', config_type = '1', endpoint_object_id = 246, identity = 'otn-ac-monq-ma01.localdomain', instance_id = 1, node = 'otn-ac-monq-sa02.localdomain', zone_object_id = 288 WHERE endpoint_object_id = 246
[2022-02-18 16:52:41 +0100] debug/EndpointDbObject: update status for endpoint 'otn-ac-monq-ma01.localdomain'
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_endpointstatus SET endpoint_object_id = 246, identity = 'otn-ac-monq-ma01.localdomain', instance_id = 1, is_connected = '0', node = 'otn-ac-monq-sa02.localdomain', status_update_time = TO_TIMESTAMP(1645199561) AT TIME ZONE 'UTC', zone_object_id = 288 WHERE endpoint_object_id = 246
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 291
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 292
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 293
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 294
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 252
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 251
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 254
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 253
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 296
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 295
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 266
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 267
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 268
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 269
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 270
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 271
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 249
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: UPDATE icinga_objects SET is_active = 0 WHERE object_id = 250
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: DELETE FROM icinga_comments WHERE instance_id = 1 AND session_token <> 1645199361
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: DELETE FROM icinga_scheduleddowntime WHERE instance_id = 1 AND session_token <> 1645199361
[2022-02-18 16:52:41 +0100] information/IdoPgsqlConnection: Finished reconnecting to 'ido-pgsql' database 'icinga' in 0.0298412 second(s).
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:41 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:42 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:42 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:43 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:43 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:44 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:44 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:45 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:45 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:46 +0100] notice/CheckerComponent: Pending checkables: 0; Idle checkables: 0; Checks/s: 0
[2022-02-18 16:52:46 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:46 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:47 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:47 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:48 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:48 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:49 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:49 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:50 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:50 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:51 +0100] notice/DbConnection: Updating programstatus table.
[2022-02-18 16:52:51 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:51 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:51 +0100] debug/IdoPgsqlConnection: Query: DELETE FROM icinga_programstatus WHERE instance_id = 1
[2022-02-18 16:52:51 +0100] debug/IdoPgsqlConnection: Query: INSERT INTO icinga_programstatus (active_host_checks_enabled, active_service_checks_enabled, daemon_mode, endpoint_name, event_handlers_enabled, flap_detection_enabled, instance_id, is_currently_running, last_command_check, notifications_enabled, passive_host_checks_enabled, passive_service_checks_enabled, process_id, process_performance_data, program_start_time, program_version, status_update_time) VALUES ('1', '1', '1', 'otn-ac-monq-sa02.localdomain', '1', '1', 1, '1', TO_TIMESTAMP(1645199571) AT TIME ZONE 'UTC', '1', '1', '1', '2794', '1', TO_TIMESTAMP(1645199361) AT TIME ZONE 'UTC', '2.13.2-1', TO_TIMESTAMP(1645199571) AT TIME ZONE 'UTC')
[2022-02-18 16:52:51 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:51 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:51 +0100] debug/IdoPgsqlConnection: Query: DELETE FROM icinga_runtimevariables WHERE instance_id = 1
[2022-02-18 16:52:51 +0100] debug/IdoPgsqlConnection: Query: INSERT INTO icinga_runtimevariables (instance_id, varname, varvalue) VALUES (1, 'total_services', '0')
[2022-02-18 16:52:51 +0100] debug/IdoPgsqlConnection: Query: INSERT INTO icinga_runtimevariables (instance_id, varname, varvalue) VALUES (1, 'total_scheduled_services', '0')
[2022-02-18 16:52:51 +0100] debug/IdoPgsqlConnection: Query: INSERT INTO icinga_runtimevariables (instance_id, varname, varvalue) VALUES (1, 'total_hosts', '0')
[2022-02-18 16:52:51 +0100] debug/IdoPgsqlConnection: Query: INSERT INTO icinga_runtimevariables (instance_id, varname, varvalue) VALUES (1, 'total_scheduled_hosts', '0')
[2022-02-18 16:52:51 +0100] notice/CheckerComponent: Pending checkables: 0; Idle checkables: 0; Checks/s: 0
[2022-02-18 16:52:51 +0100] information/IdoPgsqlConnection: Pending queries: 0 (Input: 3/s; Output: 3/s)
[2022-02-18 16:52:51 +0100] debug/ApiListener: Not connecting to Endpoint 'otn-ac-monq-sa02.localdomain' because that's us.
[2022-02-18 16:52:51 +0100] debug/ApiListener: Not connecting to Endpoint 'otn-ac-monq-ma01.localdomain' because the host/port attributes are missing.
[2022-02-18 16:52:51 +0100] notice/ApiListener: Updating object authority for objects at endpoint 'otn-ac-monq-sa02.localdomain'.
[2022-02-18 16:52:51 +0100] notice/ApiListener: Current zone master: otn-ac-monq-sa02.localdomain
[2022-02-18 16:52:51 +0100] notice/ApiListener: Connected endpoints:
[2022-02-18 16:52:51 +0100] debug/IdoPgsqlConnection: Query: SELECT 1
[2022-02-18 16:52:51 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:51 +0100] debug/IdoPgsqlConnection: Query: BEGIN
[2022-02-18 16:52:52 +0100] debug/IdoPgsqlConnection: Query: COMMIT
[2022-02-18 16:52:52 +0100] debug/IdoPgsqlConnection: Query: BEGIN
zones.conf of master1 (ma01)
object Endpoint "otn-ac-monq-ma01.localdomain" {
// That's us
}
object Endpoint "otn-ac-monq-sa02.localdomain" {
host = "otn-ac-monq-sa02.localdomain" // Actively connect to the secondary master
}
object Zone "master" {
endpoints = [ "otn-ac-monq-ma01.localdomain", "otn-ac-monq-sa02.localdomain" ]
}
zones.conf of master2 (sa02)
object Endpoint "otn-ac-monq-ma01.localdomain" {
#host = "otn-ac-monq-ma01.localdomain"
#port = "5665"
}
object Zone "master" {
endpoints = [ "otn-ac-monq-ma01.localdomain", "otn-ac-monq-sa02.localdomain" ]
}
object Endpoint "otn-ac-monq-sa02.localdomain" {
//That's us
}
api.conf on master1 (ma01)
object ApiListener "api" {
accept_config = true
accept_commands = true
ticket_salt = TicketSalt
}
api.conf on master2 (sa02)
object ApiListener "api" {
accept_config = true
accept_commands = true
}
ido-pgsql.conf on both nodes
object IdoPgsqlConnection "ido-pgsql" {
user = "icinga"
password = "12345"
host = "otn-ac-monq-dvip.localdomain"
database = "icinga"
enable_ha=true
}