Automated deployment and configuration of a complete Icinga2 monitoring infrastructure using Ansible.
This repository has been archived on 2026-03-03. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Jinja 96%
  • Python 3.1%
  • Makefile 0.9%
Find a file
2026-02-17 15:30:28 +01:00
.ansible init 2026-02-12 08:14:20 +01:00
.helper init 2026-02-12 08:14:20 +01:00
group_vars init 2026-02-12 08:14:20 +01:00
host_vars/icinga init 2026-02-12 08:14:20 +01:00
inventories init 2026-02-12 08:14:20 +01:00
tasks init 2026-02-12 08:14:20 +01:00
templates fix sql group 2026-02-17 15:30:28 +01:00
.gitignore init 2026-02-12 08:14:20 +01:00
ansible.cfg init 2026-02-12 08:14:20 +01:00
makefile init 2026-02-12 08:14:20 +01:00
pb-ping.yml init 2026-02-12 08:14:20 +01:00
pb-snclient.yml init 2026-02-12 08:14:20 +01:00
pb.yml init 2026-02-12 08:14:20 +01:00
README.md init 2026-02-12 08:14:20 +01:00
requirements.yml init 2026-02-12 08:14:20 +01:00

Icinga2 Ansible Deployment

Automated deployment and configuration of a complete Icinga2 monitoring infrastructure using Ansible.

Overview

This playbook installs and configures the following components:

  • Icinga2: Open-source monitoring and alerting system
  • Icinga Web 2: Web user interface for Icinga2
  • Icinga DB: Document store for Icinga2 data
  • Redis: In-memory data store for caching and queues
  • Postfix: Mail server for notifications
  • Icinga Notifications: Notification system
  • Linuxfabrik Library: Plugin collection for Linux monitoring
  • PerfDataGraphs: Graphical visualization of performance data

Requirements

  • GNU Make
  • Ansible 2.9 or higher
  • Target host with supported Linux operating system (e.g., Rocky Linux, AlmaLinux, Debian, Ubuntu)
  • Root or sudo access on target hosts
  • Internet connection for package installation
  • Minimum 2 CPU cores and 4 GB RAM recommended

Installation

1. Configure inventory

[icinga]
monitoring-server.example.com ansible_host=192.168.1.10

See inventories/hosts for details.

2. Install dependencies

make install

This installs all required Ansible Galaxy roles from requirements.yml.

3. Execute playbook

# Full installation
make run-icinga

# Fast installation only (skips heavy tasks)
make run-icinga-fast

# Validate configuration (check mode)
make check-icinga

# Syntax check
make validate-icinga

Make Targets

Playbook Execution

Target Description
make run-icinga Installs and configures Icinga2 completely
make run-icinga-fast Installs only essential components (skips heavy tasks)
make check-icinga Performs dry-run (check mode with diff)
make check-icinga-fast Dry-run for essential components only
make validate-icinga Checks playbook syntax

General Commands

Target Description
make help Shows all available commands
make version Shows Ansible and ansible-lint versions
make install Installs Galaxy dependencies

Tags

The playbook supports the following tags for targeted deployment:

Tag Function
fast Skipped when using run-icinga-fast

Common Tasks

Simulate installation (without making changes)

make check-icinga

Shows all planned changes without executing them.

Fast installation only

make run-icinga-fast

Skips slow tasks like package installation.

Validate syntax before execution

make validate-icinga

Display setup token

ssh user@monitoring-server.example.com
icingacli setup token show

Validate Icinga2 configuration

icinga2 daemon -C