ansible-collection-icinga
ansible-collection-icinga copied to clipboard
Full example of ha cluster deployment
Hey ho, is there any example of a full ha cluster deployment with 2 master instances (including icinga2, icingaweb2, icingadb)? Or can you provide one? :)
thanks and regards fl0wx
There's no official documentation (yet), but you could have a look at my homelab setup which provisions exactly this, using the collection.
One thing that isn't HA even after using the linked playbook is syncing file-based configuration of Icinga Web from one master instance to another. For this, you'd need to jump through quite some more hoops, unfortunately, which is why it's out of the scope of this collection.
thanks a lot :) ill take a look into this :)
Thanks a lot, I'm also looking for the same example for HA cluster with 2 masters . My issue that I don't get the icinga2 service started and I have the following error when I run : icinga2 daemon -C
[2023-12-21 04:42:18 -0500] critical/config: Error: Endpoint object for 'icinga-primary-1' is missing.
Location: in /etc/icinga2/features-enabled/api.conf: 1:0-1:23
/etc/icinga2/features-enabled/api.conf(1): object ApiListener "api" {
^^^^^^^^^^^^^^^^^^^^^^^^
/etc/icinga2/features-enabled/api.conf(2): ticket_salt = TicketSalt
/etc/icinga2/features-enabled/api.conf(3): accept_config = false
[2023-12-21 04:42:18 -0500] critical/config: 1 error
My config is like the following
icinga2_features:
- name: api
ca_host: none
endpoints:
- name: icinga-primary-1.{{ env }}.local
host: icinga-primary-1.{{ env }}.local
- name: icinga-primary-2.{{ env }}.local
host: icinga-primary-2.{{ env }}.local
zones:
- name: "master"
endpoints:
- icinga-primary-1.{{ env }}.local
- icinga-primary-2.{{ env }}.local
icinga2_objects:
icinga-primary-1.{{ env }}.local:
- name: icingaweb
type: ApiUser
file: local.d/apiusers.conf
password: "***********"
permissions: ['*']
icinga-primary-2.{{ env }}.local:
- name: icingaweb
type: ApiUser
file: local.d/apiusers.conf
password: "***********"
permissions: ['*']
Not sure but did we need to create also Objects type Zone and Endpoints also or they are not needed. I tried them but also nothing was changed Any idea ?
Thanks Achraf
Can you put the following in quotes:
icinga2_features:
- name: api
ca_host: none
endpoints:
- name: "icinga-primary-1.{{ env }}.local"
host: "icinga-primary-1.{{ env }}.local"
- name: "icinga-primary-2.{{ env }}.local"
host: "icinga-primary-2.{{ env }}.local"
zones:
- name: "master"
endpoints:
- "icinga-primary-1.{{ env }}.local"
- "icinga-primary-2.{{ env }}.local"
I followed the same config example provided mocdaniel and also I tried with quotes but I'm still getting the same issue.
Ok, can you post the zones.conf, what is the result. Please post the following files zones.conf and constants.conf. If available redact secrets before posting.