1 class profile::monitoring::services {
3 $warn_1_load = 1.5*$facts["processorcount"]
4 $warn_5_load = $facts["processorcount"]
5 $warn_15_load = $facts["processorcount"]
6 $warn_load = join([$warn_1_load, $warn_5_load, $warn_15_load], ",")
8 $max_1_load = 2*$facts["processorcount"]
9 $max_5_load = $facts["processorcount"]
10 $max_15_load = $facts["processorcount"]
11 $max_load = join([$max_1_load, $max_5_load, $max_15_load], ",")
13 profile::monitoring::local_service {
14 "Size on root partition":
16 check_command => "check_local_disk!20%!10%!/",
18 "Total number of process":
20 check_command => "check_local_procs!50!100!RSZDT",
24 check_command => "check_local_load!$warn_load!$max_load",
28 check_command => "check_local_swap!20!10",
32 "naemon-fail2ban" => "naemon ALL=(root) NOPASSWD: /usr/bin/fail2ban-client ping",
35 check_command => "check_command_output!fail2ban-client ping!pong!-r root",
37 "NTP is activated and working":
39 check_command => "check_ntp",
41 "No mdadm array is degraded":
43 ensure => (find_file("/proc/mdstat") == undef) ? { true => "absent", default =>"present" },
46 check_command => "check_md_raid",
50 Profile::Monitoring::Local_service <| |>
51 Profile::Monitoring::External_service <| |>