Puppet Class: icinga2::feature::checker

Defined in:
manifests/feature/checker.pp

Summary

Configures the Icinga 2 feature checker.

Overview

Parameters:

  • ensure (Enum['absent', 'present']) (defaults to: present)

    Set to present enables the feature checker, absent disabled it.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'manifests/feature/checker.pp', line 7

class icinga2::feature::checker (
  Enum['absent', 'present'] $ensure            = present,
) {
  if ! defined(Class['icinga2']) {
    fail('You must include the icinga2 base class before using any icinga2 feature class!')
  }

  $conf_dir = $icinga2::globals::conf_dir
  $_notify  = $ensure ? {
    'present' => Class['icinga2::service'],
    default   => undef,
  }

  # create object
  icinga2::object { 'icinga2::object::CheckerComponent::checker':
    object_name => 'checker',
    object_type => 'CheckerComponent',
    target      => "${conf_dir}/features-available/checker.conf",
    order       => 10,
    notify      => $_notify,
  }

  # manage feature
  icinga2::feature { 'checker':
    ensure => $ensure,
  }
}