X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprofile%2Fmanifests%2Fmonitoring%2Fservices.pp;h=5ff3c6dcb358215d3c367ed513f423535d212535;hb=63102a9ba9acce5697d4a0487df038b25ad8f28d;hp=b20a3528546c1ad6bf7c142feb099b04cb7c7850;hpb=b5305b5cad5cbb0a2c072b29f2d4dc05126c39d4;p=perso%2FImmae%2FProjets%2FPuppet.git diff --git a/modules/profile/manifests/monitoring/services.pp b/modules/profile/manifests/monitoring/services.pp index b20a352..5ff3c6d 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 => { @@ -25,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 => { @@ -38,4 +53,5 @@ class profile::monitoring::services { } Profile::Monitoring::Local_service <| |> + Profile::Monitoring::External_service <| |> }