Puppet Class: icinga::web::monitoring

Defined in:
manifests/web/monitoring.pp

Summary

Setup Monitoring module for the IDO backend.

Overview

Parameters:

  • db_type (Enum['mysql', 'pgsql']) (defaults to: 'mysql')

    What kind of database type to use as IDO backend.

  • db_host (Stdlib::Host) (defaults to: 'localhost')

    Database host to connect for the IDO backenend.

  • db_port (Optional[Stdlib::Port::Unprivileged]) (defaults to: undef)

    Port to connect the IDO backend.

  • db_name (String) (defaults to: 'icinga2')

    Name of the IDO database backend.

  • db_user (String) (defaults to: 'icinga2')

    IDO database backend user name.

  • db_pass (Icinga::Secret)

    Pasword to connect the IDO backend.



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,
    }
  }
}