aboutsummaryrefslogtreecommitdiff
path: root/modules/profile/manifests/monitoring/services.pp
blob: 95c6efba8bfb2ff026d4a3898e58267a9dc034e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
class profile::monitoring::services {

  profile::monitoring::local_service {
    "Size on root partition":
      local => {
        check_command => "check_local_disk!20%!10%!/",
      };
    "Total number of process":
      local => {
        check_command => "check_local_procs!50!100!RSZDT",
      };
    "Average load":
      local => {
        check_command => "check_local_load!8.0,8.0,8.0!10.0,10.0,10.0",
      };
    "Swap usage":
      local => {
        check_command => "check_local_swap!20!10",
      };
    "fail2ban is active":
      sudos   => {
        "naemon-fail2ban" => "naemon  ALL=(root) NOPASSWD: /usr/bin/fail2ban-client ping",
      },
      local   => {
        check_command => "check_command_output!fail2ban-client ping!pong!-r root",
      };
    "NTP is activated and working":
      local => {
        check_command => "check_ntp",
      };
    "No mdadm array is degraded":
      common => {
        ensure => (find_file("/proc/mdstat") == undef) ? { true => "absent", default =>"present" },
      },
      local => {
        check_command => "check_md_raid",
      };
  }

  Profile::Monitoring::Local_service <| |>
  Profile::Monitoring::External_service <| |>
}