Puppet Class: icinga::agent

Defined in:
manifests/agent.pp

Summary

Setup an Icinga agent.

Overview

Parameters:

  • ca_server (Stdlib::Host)

    The CA to send the certificate request to.

  • parent_zone (String[1]) (defaults to: 'main')

    Name of the parent Icinga zone.

  • parent_endpoints (Hash[String[1], Hash])

    Configures these endpoints of the parent zone.

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

    List of global zones to configure.

  • logging_type (Enum['file', 'syslog', 'eventlog'])

    Switch the log target. On Windows ‘syslog` is ignored, `eventlog` on all other platforms.

  • logging_level (Icinga::LogLevel)

    Set the log level.

  • zone (String[1]) (defaults to: 'NodeName')

    Set a dedicated zone name.

  • run_web (Boolean) (defaults to: false)

    Prepare to run Icinga Web 2 on the same machine. Manage a group ‘icingaweb2` and add the Icinga user to this group.



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
# File 'manifests/agent.pp', line 29

class icinga::agent (
  Stdlib::Host                       $ca_server,
  Hash[String[1], Hash]              $parent_endpoints,
  Icinga::LogLevel                   $logging_level,
  Enum['file', 'syslog', 'eventlog'] $logging_type,
  String[1]                          $parent_zone   = 'main',
  Array[String[1]]                   $global_zones  = [],
  String[1]                          $zone          = 'NodeName',
  Boolean                            $run_web       = false,
) {
  class { 'icinga':
    ca              => false,
    ca_server       => $ca_server,
    this_zone       => $zone,
    zones           => {
      'ZoneName'   => { 'endpoints' => { 'NodeName' => {} }, 'parent' => $parent_zone, },
      $parent_zone => { 'endpoints' => $parent_endpoints, },
    },
    logging_type    => $logging_type,
    logging_level   => $logging_level,
    prepare_web     => $run_web,
  }

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