Puppet Class: icinga2::feature::checker
- Defined in:
- manifests/feature/checker.pp
Summary
Configures the Icinga 2 feature checker.Overview
Note:
Deprecated in Icinga 2.11, replaced by global constant MaxConcurrentChecks which will be set if you still use concurrent_checks.
13 14 15 16 17 18 19 20 21 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 54 |
# File 'manifests/feature/checker.pp', line 13
class icinga2::feature::checker (
Enum['absent', 'present'] $ensure = present,
Optional[Integer[1]] $concurrent_checks = undef,
) {
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,
}
# compose attributes
$attrs = {
concurrent_checks => $concurrent_checks,
}
# create object
icinga2::object { 'icinga2::object::CheckerComponent::checker':
object_name => 'checker',
object_type => 'CheckerComponent',
attrs => delete_undef_values($attrs),
attrs_list => keys($attrs),
target => "${conf_dir}/features-available/checker.conf",
order => 10,
notify => $_notify,
}
# import library 'checker'
concat::fragment { 'icinga2::feature::checker':
target => "${conf_dir}/features-available/checker.conf",
content => "library \"checker\"\n\n",
order => '05',
}
# manage feature
icinga2::feature { 'checker':
ensure => $ensure,
}
}
|