From b5d92dc40627e96fd81ade2744d1576cf7671eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 14 Jul 2018 18:13:43 +0200 Subject: Fix monitoring load average --- modules/profile/manifests/monitoring/services.pp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/profile/manifests/monitoring/services.pp b/modules/profile/manifests/monitoring/services.pp index 95c6efb..0ecc135 100644 --- a/modules/profile/manifests/monitoring/services.pp +++ b/modules/profile/manifests/monitoring/services.pp @@ -1,5 +1,15 @@ class profile::monitoring::services { + $warn_1_load = 1.5*$facts["processorcount"] + $warn_5_load = $facts["processorcount"] + $warn_15_load = $facts["processorcount"] + $warn_load = join([$warn_1_load, $warn_5_load, $warn_15_load], ",") + + $max_1_load = 2*$facts["processorcount"] + $max_5_load = $facts["processorcount"] + $max_15_load = $facts["processorcount"] + $max_load = join([$max_1_load, $max_5_load, $max_15_load], ",") + profile::monitoring::local_service { "Size on root partition": local => { @@ -11,7 +21,7 @@ class profile::monitoring::services { }; "Average load": local => { - check_command => "check_local_load!8.0,8.0,8.0!10.0,10.0,10.0", + check_command => "check_local_load!$warn_load!$max_load", }; "Swap usage": local => { -- cgit v1.2.3