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.
This module installs:
icinga
;icinga::webgui
;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.
/etc/icinga2
)The yum repository installation can be disabled passing with_repo => False
to the icinga
class.
A database (local or remote) with proper credential must be available.
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'.
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.
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.
Here we describe some typical setups for Icinga.
In this setup we have a node that will host:
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'],
}
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.
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.