]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Fix freshness for monitoring
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Thu, 26 Jul 2018 10:01:01 +0000 (12:01 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Thu, 26 Jul 2018 10:02:36 +0000 (12:02 +0200)
modules/profile/manifests/monitoring/local_service.pp
modules/profile/manifests/monitoring/params.pp

index 4d38d69eac4c71a473f59ca77c28a10c12359141..cf8ef782b5480644a60fc433bc452ccb7a33b354 100644 (file)
@@ -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 {
index 27f895e998f639fcd6235f41923f19999a9e7024..285393ca5c58a14aa4d7ac14c87c253c4f0abd30 100644 (file)
@@ -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"],
+  }
 }