Extend Documentation

- add docu about the monitoring module
- add hint to initialize, what the credentials are.
- add real world example
This commit is contained in:
Robert Waffen 2016-04-14 12:45:49 +02:00
parent 85fcd131ee
commit 3f25a733a1

View file

@ -54,6 +54,8 @@ Icinga Web 2 is the next generation open source monitoring web interface, framew
### Initialize db
Default Credentials will be icingaadmin:icinga
node /box/ {
class { 'icingaweb2':
initialize => true,
@ -69,6 +71,15 @@ Icinga Web 2 is the next generation open source monitoring web interface, framew
}
}
### Monitoring module
node /box/ {
class {
'icingaweb2':;
'icingaweb2::mod::monitoring':;
}
}
### Business process module
node /box/ {
@ -108,6 +119,55 @@ Icinga Web 2 is the next generation open source monitoring web interface, framew
}
}
### 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
}
## Reference
@ -121,4 +181,3 @@ Icinga Web 2 is the next generation open source monitoring web interface, framew
* Commit your changes (`git commit -am 'Added some feature'`)
* Push to the branch (`git push origin my-new-feature`)
* Create new Pull Request