Puppet Class: icinga::worker

Defined in:
manifests/worker.pp

Summary

Setup a Icinga worker (aka satellite).

Overview

Parameters:

  • ca_server (Stdlib::Host)

    The CA to send the certificate request to.

  • zone (String)

    Name of the Icinga zone.

  • parent_zone (String) (defaults to: 'main')

    Name of the parent Icinga zone.

  • parent_endpoints (Hash[String, Hash])

    Configures these endpoints of the parent zone.

  • colocation_endpoints (Hash[String, Hash]) (defaults to: {})

    When the zone includes more than one endpoint, set here the additional endpoint(s). Icinga supports two endpoints per zone only.

  • global_zones (Array[String]) (defaults to: [])

    List of global zones to configure.

  • logging_type (Enum['file', 'syslog']) (defaults to: 'file')

    Switch the log target. Only ‘file` is supported on Windows.

  • logging_level (Optional[Icinga2::LogSeverity]) (defaults to: undef)

    Set the log level.



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
54
55
56
57
58
# File 'manifests/worker.pp', line 29

class icinga::worker(
  Stdlib::Host                    $ca_server,
  String                          $zone,
  Hash[String, Hash]              $parent_endpoints,
  String                          $parent_zone          = 'main',
  Hash[String, Hash]              $colocation_endpoints = {},
  Array[String]                   $global_zones         = [],
  Enum['file', 'syslog']          $logging_type         = 'file',
  Optional[Icinga2::LogSeverity]  $logging_level        = undef,
) {

  class { '::icinga':
    ca              => false,
    ssh_private_key => undef,
    ca_server       => $ca_server,
    this_zone       => $zone,
    zones           => {
      'ZoneName'   => { 'endpoints' => { 'NodeName' => {} } + $colocation_endpoints, 'parent' => $parent_zone, },
      $parent_zone => { 'endpoints' => $parent_endpoints, },
    },
    logging_type    => $logging_type,
    logging_level   => $logging_level,
  }

  include ::icinga2::feature::checker

  ::icinga2::object::zone { $global_zones:
    global => true,
  }
}