2015-11-10 23:36:52 +01:00
# Icinga Web 2
2015-02-20 10:40:45 +01:00
2015-11-10 23:36:52 +01:00
#### Table of Contents
2015-02-20 10:40:45 +01:00
2015-11-10 23:36:52 +01:00
1. [Description ](#description )
2. [Setup - The basics of getting started with Icinga Web 2 ](#setup )
* [Setup requirements ](#setup-requirements )
* [Beginning with Icinga Web 2 ](#beginning-with-icinga-web-2 )
3. [Usage - Configuration options and additional functionality ](#usage )
* [Install using packages ](#install-using-packages )
* [Install using Git ](#install-using-git )
* [Manage repository ](#manage-repository )
* [Business process module ](#business-process-module )
* [Deployment module ](#deployment-module )
* [Graphite module ](#graphite-module )
* [NagVis module ](#nagvis-module )
4. [Reference - An under-the-hood peek at what the module is doing and how ](#reference )
5. [Limitations - OS compatibility, etc. ](#limitations )
6. [Development - Guide for contributing to the module ](#development )
## Description
This module installs and configures Icinga Web 2.
Icinga Web 2 is the next generation open source monitoring web interface, framework and command-line interface developed by the Icinga Project, supporting Icinga 2, Icinga Core and any other monitoring backend compatible with the Livestatus Protocol.
## Setup
### Setup requirements
2015-02-20 10:40:45 +01:00
2015-11-10 23:36:52 +01:00
### Beginning with Icinga Web 2
2015-02-20 10:40:45 +01:00
node /box/ {
include icingaweb2
}
2015-11-10 23:36:52 +01:00
## Usage
2015-02-20 10:40:45 +01:00
### Install method: packages
node /box/ {
class { 'icingaweb2':
install_method => 'package',
}
}
### Install method: Git
node /box/ {
class { 'icingaweb2':
install_method => 'git',
}
}
2015-12-14 16:40:11 +01:00
### Initialize db
2016-04-14 12:45:49 +02:00
Default Credentials will be icingaadmin:icinga
2015-12-14 16:40:11 +01:00
node /box/ {
class { 'icingaweb2':
initialize => true,
}
}
2015-02-20 10:40:45 +01:00
### Manage repository
node /box/ {
class { 'icingaweb2':
2015-02-23 16:36:17 +01:00
manage_repo => true,
install_method => 'package',
2015-02-20 10:40:45 +01:00
}
}
2016-04-14 12:45:49 +02:00
### Monitoring module
node /box/ {
class {
'icingaweb2':;
'icingaweb2::mod::monitoring':;
}
}
2015-05-07 10:35:04 +02:00
### Business process module
node /box/ {
class {
'icingaweb2':;
'icingaweb2::mod::businessprocess':;
}
}
### Deployment module
node /box/ {
class {
'icingaweb2':;
'icingaweb2::mod::deployment':
auth_token => 'secret_token';
}
}
### Graphite module
node /box/ {
class {
'icingaweb2':;
'icingaweb2::mod::graphite':
graphite_base_url => 'http://graphite.com/render?';
}
}
### NagVis module
node /box/ {
class {
'icingaweb2':;
'icingaweb2::mod::nagvis':
nagvis_url => 'http://example.org/nagvis/';
}
}
2016-04-14 12:45:49 +02:00
### Real world example
Icinga2 is installed or on another host. One needs only the ido data to configure icingaweb2.
This could be a profile class to include icingaweb2 in a architecture with roles and profiles.
class profile::icingaweb2(){
$ido_db_name = hiera('icinga2::ido::name', 'icinga2')
$ido_db_user = hiera('icinga2::ido::user', 'icinga2')
$ido_db_pass = hiera('icinga2::ido::password', 'icinga2')
$web_db_name = hiera('icingaweb2::db::name', 'icingaweb2')
$web_db_user = hiera('icingaweb2::db::user', 'icingaweb2')
$web_db_pass = hiera('icingaweb2::db::password', 'icingaweb2')
contain '::mysql::server'
contain '::mysql::client'
contain '::mysql::server::account_security'
contain '::apache'
contain '::apache::mod::php'
Exec { path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ] }
::mysql::db { $web_db_name:
user => $web_db_user,
password => $web_db_pass,
host => 'localhost',
grant => ['ALL'],
}
class { '::icingaweb2':
initialize => true,
install_method => 'package',
manage_apache_vhost => true,
ido_db_name => $ido_db_name,
ido_db_pass => $ido_db_pass,
ido_db_user => $ido_db_user,
web_db_name => $web_db_name,
web_db_pass => $web_db_pass,
web_db_user => $web_db_user,
require => Class['::mysql::server'],
} ->
augeas { 'php.ini':
context => '/files/etc/php.ini/PHP',
changes => ['set date.timezone Europe/Berlin',],
}
contain ::icingaweb2::mod::monitoring
}
2015-11-10 23:36:52 +01:00
## Reference
## Limitations
## Development
2015-02-20 10:40:45 +01:00
* Fork it
* Create a feature branch (`git checkout -b my-new-feature`)
* Run rspec tests (`bundle exec rake spec`)
* Commit your changes (`git commit -am 'Added some feature'`)
* Push to the branch (`git push origin my-new-feature`)
* Create new Pull Request