From: Ismaƫl Bouya Date: Thu, 26 Jul 2018 10:01:01 +0000 (+0200) Subject: Fix freshness for monitoring X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=60fb787df260a2fb9cd87761d19eed6e78d0d797;p=perso%2FImmae%2FProjets%2FPuppet.git Fix freshness for monitoring --- diff --git a/modules/profile/manifests/monitoring/local_service.pp b/modules/profile/manifests/monitoring/local_service.pp index 4d38d69..cf8ef78 100644 --- a/modules/profile/manifests/monitoring/local_service.pp +++ b/modules/profile/manifests/monitoring/local_service.pp @@ -31,16 +31,14 @@ define profile::monitoring::local_service ( [true, false].each |$services_for_master| { if $services_for_master { - $default_local = { - mode => "0644", - target => $::profile::monitoring::params::services_for_master, - check_interval => $::profile::monitoring::params::service_local["check_interval"], - retry_interval => $::profile::monitoring::params::service_local["retry_interval"], - host_name => $::profile::monitoring::params::service_local["host_name"], - use => $::profile::monitoring::params::service_types["passive"], - servicegroups => $service_group, - notify => [], - } + $default_local = merge( + $::profile::monitoring::params::service_local_for_master, + { + mode => "0644", + target => $::profile::monitoring::params::services_for_master, + servicegroups => $service_group, + notify => [], + }) $t = "master - " $services_key = $master } else { diff --git a/modules/profile/manifests/monitoring/params.pp b/modules/profile/manifests/monitoring/params.pp index 27f895e..285393c 100644 --- a/modules/profile/manifests/monitoring/params.pp +++ b/modules/profile/manifests/monitoring/params.pp @@ -39,4 +39,11 @@ class profile::monitoring::params { retry_interval => "1", }) + $service_local_for_master = { + host_name => $service_local["host_name"], + check_interval => $service_local["check_interval"], + retry_interval => $service_local["retry_interval"], + check_freshness => Integer(Integer($service_local["check_interval"]) * 1.5), + use => $service_types["passive"], + } }