adfinis-sygroup.icinga2_master

GitHub Readme

ROLE ICINGA2_MASTER

This role sets up Icinga2 to work as a master server. It also manages the configuration for all client servers.

Requirements

If the option icinga2_master_ido_enabled is turned on, this role will enable the IDO feature for Icinga2. To do this, you need a working database, which can either already exist or be set up using the adfinis.mariadb role. Note: In a multi-master setup, only one database should be used for both master instances.

Role Variables

# The Icinga2 master zone
icinga2_master_master_zone: monitoring-master

# A list of all Icinga2 API users
icinga2_master_api_users: []
# Example users:
#  - username: root
#    password: 'passw0rd'
#    permissions: '*'
#  - username: token-generator
#    password: 'passw0rd'
#    permissions: 'actions/generate-ticket'

You can customize templates using these variables.

## Template settings

# If you have your own templates for configuration files in /etc/icinga2/conf.d,
# you may want to change the names below and add your templates to
# templates/etc/icinga2/conf.d in your playbook folder.
icinga2_master_template_confd_notifications: "notifications.conf"
icinga2_master_template_confd_templates: "templates.conf"
icinga2_master_template_confd_commands: "commands.conf"
icinga2_master_template_confd_groups: "groups.conf"
icinga2_master_template_confd_timeperiods: "timeperiods.conf"
icinga2_master_template_confd_users: "users.conf"

# If you have custom templates for the global templates directory, which will sync to all clients, you can adjust these.
icinga2_master_template_globaltemplates:
  - "services.conf"
  - "templates.conf"

If you want to use Twilio for alerts, you will need to create an account on Twilio. After that, you can get an Application SID and Auth token from the Twilio console. If you wish to make phone calls, you also need to create a TwiML application.

## Twilio alerting

# Twilio account SID from https://www.twilio.com/console
# icinga2_master_twilio_account_sid: 'account_sid'

# Twilio auth token from https://www.twilio.com/console
# icinga2_master_twilio_auth_token: 'auth_token'

# Enable or disable Twilio SMS
icinga2_master_twilio_sms_enabled: False

# Phone number used to send SMS from Twilio
# icinga2_master_twilio_sms_from: '+41123456789'

# Additional commands to run after sending an SMS
# This defaults to an empty list; add commands as needed
# Example:
# icinga2_master_twilio_sms_additional_commands:
#  - "/etc/icinga2/scripts/mattermost.sh "${NOTIFICATION_MESSAGE}""
icinga2_master_twilio_sms_additional_commands: []

# Enable or disable Twilio phone calls
icinga2_master_twilio_phone_enabled: False

# Phone number used for Twilio calls
# icinga2_master_twilio_phone_from: '+41123456789'

# Twilio application to handle calls. Choose either application sid or application url, not both. Default is not set.
# icinga2_master_twilio_phone_application_sid: 'application_sid'
# icinga2_master_twilio_phone_application_url: 'application_url'

Role Special Hostgroups

These names will be used in Ansible group selectors and have specific meanings within the role (more details to come):

  • monitoring_client
  • monitoring_master
  • monitoring_sat

Dependencies

This role relies on the adfinis.icinga2_agent role, which installs the Icinga2 software.

Example Playbook

- hosts: monitoring-master
  roles:
     - { role: adfinis.icinga2_agent }
     - { role: adfinis.icinga2_master }

License

GPL-3.0

Author Information

The icinga2_master role was created by Adfinis AG. For more info, visit their Website, Twitter, or GitHub.

Informazioni sul progetto

This role is used to configure icinga2 in master mode

Installa
ansible-galaxy install adfinis-sygroup.icinga2_master
Licenza
gpl-3.0
Download
3.8k
Proprietario
Adfinis SyGroup was rebranded to Adfinis, follow the link below: