diff --git a/site-modules/profile/manifests/icinga2/master.pp b/site-modules/profile/manifests/icinga2/master.pp --- a/site-modules/profile/manifests/icinga2/master.pp +++ b/site-modules/profile/manifests/icinga2/master.pp @@ -63,6 +63,13 @@ target => "/etc/icinga2/zones.d/${zonename}/${::fqdn}.conf", } + ::icinga2::object::service {'check-deposit': + import => ['generic-service-check-e2e'], + apply => true, + check_command => 'check-deposit-cmd', + target => "/etc/icinga2/zones.d/${zonename}/${::fqdn}.conf", + } + ::Icinga2::Object::Host <<| |>> ::Icinga2::Object::Endpoint <<| |>> ::Icinga2::Object::Zone <<| |>> diff --git a/site-modules/profile/manifests/icinga2/objects/e2e_checks.pp b/site-modules/profile/manifests/icinga2/objects/e2e_checks.pp --- a/site-modules/profile/manifests/icinga2/objects/e2e_checks.pp +++ b/site-modules/profile/manifests/icinga2/objects/e2e_checks.pp @@ -16,7 +16,9 @@ ensure => present } - ::icinga2::object::checkcommand {'check_deposit': + $template_file = '/etc/icinga2/conf.d/templates.conf' + + ::icinga2::object::checkcommand {'check-deposit-cmd': import => ['plugin-check-command'], command => [ "/usr/bin/swh", "icinga_plugins", "check-deposit", @@ -29,6 +31,8 @@ "--archive", "${deposit_archive}", "--metadata", "${deposit_metadata}", ], + # XXX: Should probably be split into usual commands with arguments + # arguments => ... target => $checks_file, require => Package[$packages] } diff --git a/site-modules/profile/manifests/icinga2/objects/templates.pp b/site-modules/profile/manifests/icinga2/objects/templates.pp --- a/site-modules/profile/manifests/icinga2/objects/templates.pp +++ b/site-modules/profile/manifests/icinga2/objects/templates.pp @@ -57,4 +57,12 @@ } } } + + ::icinga2::object::service {'generic-service-check-e2e': + template => true, + max_check_attempts => 5, + check_interval => '24h', + retry_interval => '30s', + target => $template_file, + } }