From 63102a9ba9acce5697d4a0487df038b25ad8f28d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 26 Jul 2018 12:26:36 +0200 Subject: [PATCH] Put longer time for ntp checks --- modules/profile/manifests/monitoring/commands.pp | 2 +- modules/profile/manifests/monitoring/params.pp | 10 +++++----- modules/profile/manifests/monitoring/services.pp | 9 +++++++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/profile/manifests/monitoring/commands.pp b/modules/profile/manifests/monitoring/commands.pp index 7c5d8ed..fddff66 100644 --- a/modules/profile/manifests/monitoring/commands.pp +++ b/modules/profile/manifests/monitoring/commands.pp @@ -46,7 +46,7 @@ class profile::monitoring::commands inherits profile::monitoring { "check_local_swap": command_line => '$USER1$/check_swap -n ok -w $ARG1$ -c $ARG2$'; "check_ntp": - command_line => '$USER1$/check_ntp_time -H 0.arch.pool.ntp.org'; + command_line => '$USER1$/check_ntp_time -t 30 -q -H 0.arch.pool.ntp.org'; "check_md_raid": command_line => '$USER2$/check_md_raid', require => File["$plugins/check_md_raid"]; diff --git a/modules/profile/manifests/monitoring/params.pp b/modules/profile/manifests/monitoring/params.pp index 285393c..fa8dc5e 100644 --- a/modules/profile/manifests/monitoring/params.pp +++ b/modules/profile/manifests/monitoring/params.pp @@ -40,10 +40,10 @@ class profile::monitoring::params { }) $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"], + host_name => $service_local["host_name"], + check_interval => $service_local["check_interval"], + retry_interval => $service_local["retry_interval"], + freshness_threshold => Integer(60 * Integer($service_local["check_interval"]) * 1.5), + use => $service_types["passive"], } } diff --git a/modules/profile/manifests/monitoring/services.pp b/modules/profile/manifests/monitoring/services.pp index 0ecc135..5ff3c6d 100644 --- a/modules/profile/manifests/monitoring/services.pp +++ b/modules/profile/manifests/monitoring/services.pp @@ -35,8 +35,13 @@ class profile::monitoring::services { check_command => "check_command_output!fail2ban-client ping!pong!-r root", }; "NTP is activated and working": - local => { - check_command => "check_ntp", + master => { + check_interval => "60", + freshness_threshold => Integer(60*60*1.5), + }, + local => { + check_command => "check_ntp", + check_interval => "60" }; "No mdadm array is degraded": common => { -- 2.41.0