22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# File 'manifests/web/monitoring.pp', line 22
class icinga::web::monitoring (
Icinga::Secret $db_pass,
Enum['mysql', 'pgsql'] $db_type = 'mysql',
Stdlib::Host $db_host = 'localhost',
Optional[Stdlib::Port::Unprivileged] $db_port = undef,
String $db_name = 'icinga2',
String $db_user = 'icinga2',
) {
require icinga::web
$api_host = $icinga::web::api_host
$api_user = $icinga::web::api_user
$api_pass = $icinga::web::api_pass
class { 'icingaweb2::module::monitoring':
ido_type => $db_type,
ido_host => $db_host,
ido_port => $db_port,
ido_db_name => $db_name,
ido_db_username => $db_user,
ido_db_password => $db_pass,
}
any2array($api_host).each |Stdlib::Host $host| {
icingaweb2::module::monitoring::commandtransport { $host:
transport => 'api',
host => $host,
username => $api_user,
password => $api_pass,
}
}
}
|