Puppet Class: icinga::agent

Defined in:
manifests/agent.pp

Summary

Setup a Icinga agent.

Overview

Parameters:

  • ca_server (Stdlib::Host)

    The CA to send the certificate request to.

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

    Name of the parent Icinga zone.

  • parent_endpoints (Hash[String, Hash])

    Configures these endpoints of the parent zone.

  • 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[Icinga::LogLevel]) (defaults to: undef)

    Set the log level.

  • zone (String) (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
57
# File 'manifests/agent.pp', line 29

class icinga::agent (
  Stdlib::Host                    $ca_server,
  Hash[String, Hash]              $parent_endpoints,
  String                          $parent_zone   = 'main',
  Array[String]                   $global_zones  = [],
  Enum['file', 'syslog']          $logging_type  = 'file',
  Optional[Icinga::LogLevel]      $logging_level = undef,
  String                          $zone          = 'NodeName',
  Boolean                         $run_web       = false,
) {
  class { 'icinga':
    ca              => false,
    ssh_private_key => undef,
    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',
  }
}