Forge Home

icinga

Icinga2 Puppet Module

12,626 downloads

8,908 latest version

2.4 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.0.9 (latest)
  • 0.0.8
  • 0.0.7
  • 0.0.6
  • 0.0.6-1
  • 0.0.5
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Sep 3rd 2015
This version is compatible with:
  • Puppet 3.x
  • , , , Ubuntu

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'talamoig-icinga', '0.0.9'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add talamoig-icinga
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install talamoig-icinga --version 0.0.9

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

talamoig/icinga — version 0.0.9 Sep 3rd 2015

icinga

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with icinga
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

This module installs Icinga 2 giving you the opportunity to select the components to install (backend, Web 1.x frontent, Classic frontent).

It is available as a module at Puppet Forge and on GitHub.

Module Description

This module installs:

  • Icinga 2 backend (by default), class icinga;
  • Icinga Web 1.x interface (if specified), class icinga::webgui;
  • Icinga Classic UI (if specified and only on RedHat family), class icinga::classicui.

The web interface icingaweb2 is available as a separate module at github and puppet forge.

The credential to access the database MUST have been created before the installation.

By default the modules assumes that the database schema has already been created on the database backend but if the initdb => true is provided it will create it for you. The initdb option is available for both Icinga 2 backend and Icinga Web 1.x interface classes.

Please use the initdb with caution, since if any data is already present on the database they will be cleared.

Both MySQL and PostgreSQL database are supported and the commands executed to init the database on the icinga class is for MySQL:

mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/mysql.sql

and for PostgreSQL:

psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/pgsql.sql

For further information please read the
MySQL and PostgreSQL on the official Icinga 2 documentation.

Setup

What icinga affects

  • configuration files and directories (/etc/icinga2)
  • a new yum repository will be installed by default

The yum repository installation can be disabled passing with_repo => False to the icinga class.

Setup Requirements

A database (local or remote) with proper credential must be available.

Beginning with icinga

To install Icinga with default parameters

 class {'::icinga': }

With default parameters icinga will connect to a MySQL database on localhost named icinga. The used credentials are icinga/icinga as username/password. This is equivalent to:

 class {'::icinga':
   dbtype     => 'mysql',
   dbhost     => 'localhost',
   dbuser     => 'icinga',
   dbpasswd   => 'icinga',
   dbname     => 'icinga',
   }

The parameters names are self-explainatory. dbtype can be mysql of pgsql for PostgreSQL database. Other two available parameters are enabled_features and disabled_features, eg:

enabled_features => ['api', 'syslog']

The list of available/disabled features can be obtained with the icinga2 feature list command from command line. The ido-mysql or ido-pgsql (for database interface) feature is installed automatically according to the dbtype parameter.

For using the Icinga Web 1.x interface you will need at least the following features: 'statusdata', 'compatlog', 'command'.

Installing the Classic UI

To install the Classic UI set with_classicui => true as parameter to the icinga class or with:

class{'::icinga::classicui':}

You can also create users to the Classic UI with eg:

icinga::classicui::user {'username':
  passwd => 'HashPa22worD',
}

The HashPa22worD is a typical htpasswd hash and can be generated with htpasswd -n username. This features requires this htpasswd puppet module to be installed.

Installing the Icinga Web 1.x

To install the Icinga Web 1.x set with_webgui => true as parameter to the icinga class or

class{'::icinga::webgui':}

If you provide the initdb => true parameter it will also create the database schema if the right credentials have been created on the database.

Typical Scenarios

Here we describe some typical setups for Icinga.

Scenario 1: All-in-one

In this setup we have a node that will host:

  • a MySQL database for Icinga 2 monitoring;
  • Icinga 2 monitoring;
  • Classic UI interface;
  • Web 1.x interface.

This installation requires the following puppet modules installed:

Such a node can be configured with the following puppet code:

class{'::epel':}

class{'::icinga':
  initdb           => true,
  with_classicui   => true,
  enabled_features => ['statusdata', 'compatlog', 'command'],
}

class{'::icinga::webgui':
  initdb              => true,    
}

class { '::mysql::server':
  root_password           => 'strongpassword',
  remove_default_accounts => true,
  override_options        => $override_options
}

class { 'apache':
  purge_configs => false,   
}

 class {'::apache::mod::php': }

mysql::db { 'icinga':
  user     => 'icinga',
  password => 'icinga',
  host     => 'localhost',
  grant    => ['ALL'],
}

mysql::db { 'icinga_web':
  user     => 'icinga_web',
  password => 'icinga_web',
  host     => 'localhost',
  grant    => ['ALL'],
}

Limitations

The module has been tested on Scientific Linux 6, CentOS 6 and Ubuntu 14 with Puppet 3.1.1 and 3.7.4. It should work on most Redhat or Debian linux distributions.

The icinga::classicui class is available only on RedHat.

Release Notes/Contributors/Etc Optional

If you aren't using changelog, put your release notes here (though you should consider using changelog). You may also add any additional sections you feel are necessary or important to include here. Please use the ## header.