Quantcast
Channel: Monitoring-Portal Feed
Viewing all articles
Browse latest Browse all 1338

[Solved] Problem with ido-psql HA feature: Duplicate entries in DB tables

$
0
0
Hi!

I have a icinga v2.4.1 ha cluster with a master zone and two endpoints in it. There is a single, central postgreSQL database on a separate db server.

Since I have enable_ha = true in IdoPgsqlConnection, I would expect that only one of the two endpoints writes to the db - however I see duplicate entries in the database tables.

To better trace the problem, I removed all object definitions and startet over with only two hosts "apc1" and "apc3" (no other hosts or object types).

Result:

Quellcode

1
2
3
4
5
6
7
8
select * from icinga_hosts  order by alias;

host_id          	instance_id      	config_type host_object_id   	alias      	
------------------- -------------------- ----------- -------------------- ---------------  ...
                	1                	1       	117              	apc1       	...
                	2                	1       	120              	apc1       	...
                	1                	1       	118              	apc3       	...
                	2                	1       	119              	apc3       	...


In the web 2 interface:



Files in /etc/icinga2 on icinga2a (config master):

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
├── conf.d
├── constants.conf
├── constants.conf.orig
├── features-available
│   ├── api.conf
│   ├── api.conf.orig
│   ├── checker.conf
│   ├── command.conf
│   ├── compatlog.conf
│   ├── debuglog.conf
│   ├── gelf.conf
│   ├── graphite.conf
│   ├── icingastatus.conf
│   ├── ido-pgsql.conf
│   ├── livestatus.conf
│   ├── mainlog.conf
│   ├── notification.conf
│   ├── opentsdb.conf
│   ├── perfdata.conf
│   ├── statusdata.conf
│   └── syslog.conf
├── features-enabled
│   ├── api.conf -> ../features-available/api.conf
│   ├── checker.conf -> ../features-available/checker.conf
│   ├── command.conf -> ../features-available/command.conf
│   ├── compatlog.conf -> ../features-available/compatlog.conf
│   ├── ido-pgsql.conf -> ../features-available/ido-pgsql.conf
│   ├── mainlog.conf -> ../features-available/mainlog.conf
│   ├── notification.conf -> ../features-available/notification.conf
│   └── statusdata.conf -> ../features-available/statusdata.conf
├── icinga2.conf
├── init.conf
├── local
├── pki
│   ├── ca.crt
│   ├── icinga2a.crt
│   ├── icinga2a.csr
│   └── icinga2a.key
├── repository.d
│   └── README
├── scripts
│   ├── mail-host-notification.sh
│   └── mail-service-notification.sh
├── zones.conf
├── zones.conf.orig
└── zones.d
	├── dmz
	├── global-templates
	├── master
	│   └── hosts.conf
	└── README


Files in /etc/icinga2 on icinga2b:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.
├── conf.d
├── constants.conf
├── constants.conf.orig
├── features-available
│   ├── api.conf
│   ├── api.conf.orig
│   ├── checker.conf
│   ├── command.conf
│   ├── compatlog.conf
│   ├── debuglog.conf
│   ├── gelf.conf
│   ├── graphite.conf
│   ├── icingastatus.conf
│   ├── ido-pgsql.conf
│   ├── livestatus.conf
│   ├── mainlog.conf
│   ├── notification.conf
│   ├── opentsdb.conf
│   ├── perfdata.conf
│   ├── statusdata.conf
│   └── syslog.conf
├── features-enabled
│   ├── api.conf -> ../features-available/api.conf
│   ├── checker.conf -> ../features-available/checker.conf
│   ├── command.conf -> ../features-available/command.conf
│   ├── compatlog.conf -> ../features-available/compatlog.conf
│   ├── ido-pgsql.conf -> ../features-available/ido-pgsql.conf
│   ├── mainlog.conf -> ../features-available/mainlog.conf
│   └── statusdata.conf -> ../features-available/statusdata.conf
├── icinga2.conf
├── init.conf
├── local
├── pki
│   ├── ca.crt
│   ├── icinga2b.crt
│   ├── icinga2b.crt.orig
│   └── icinga2b.key
├── repository.d
│   └── README
├── scripts
│   ├── mail-host-notification.sh
│   └── mail-service-notification.sh
├── zones.conf
├── zones.conf.orig
└── zones.d
	└── README


... continued in next post...

Viewing all articles
Browse latest Browse all 1338