]>
Commit | Line | Data |
---|---|---|
d8f933bd | 1 | class profile::monitoring::services { |
d8f933bd IB |
2 | |
3 | Nagios_service { | |
69624636 IB |
4 | ensure => "present", |
5 | owner => "naemon", | |
6 | group => "naemon", | |
7 | notify => Service["naemon"], | |
8 | before => Service["naemon"], | |
9 | require => File["/etc/naemon"], | |
d8f933bd IB |
10 | } |
11 | ||
d8f933bd IB |
12 | sudo::conf { |
13 | default: | |
14 | sudo_file_name => "naemon"; | |
15 | 'naemon-fail2ban': | |
16 | content => "naemon ALL=(root) NOPASSWD: /usr/bin/fail2ban-client ping"; | |
17 | } | |
18 | ||
69624636 | 19 | profile::monitoring::local_service { |
d8f933bd | 20 | "Size on root partition": |
69624636 IB |
21 | local => { |
22 | check_command => "check_local_disk!20%!10%!/", | |
23 | }; | |
d8f933bd | 24 | "Total number of process": |
69624636 IB |
25 | local => { |
26 | check_command => "check_local_procs!50!100!RSZDT", | |
27 | }; | |
d8f933bd | 28 | "Average load": |
69624636 IB |
29 | local => { |
30 | check_command => "check_local_load!8.0,8.0,8.0!10.0,10.0,10.0", | |
31 | }; | |
d8f933bd | 32 | "Swap usage": |
69624636 IB |
33 | local => { |
34 | check_command => "check_local_swap!20!10", | |
35 | }; | |
d8f933bd | 36 | "fail2ban is active": |
69624636 IB |
37 | local => { |
38 | check_command => "check_command_output!fail2ban-client ping!pong!-r root", | |
39 | require => Sudo::Conf["naemon-fail2ban"], | |
40 | }; | |
d8f933bd | 41 | "NTP is activated and working": |
69624636 IB |
42 | local => { |
43 | check_command => "check_ntp", | |
44 | }; | |
45 | "No mdadm array is degraded": | |
46 | common => { | |
47 | ensure => (find_file("/proc/mdstat") == undef) ? { true => "absent", default =>"present" }, | |
48 | }, | |
49 | local => { | |
50 | check_command => "check_md_raid", | |
51 | }; | |
d8f933bd IB |
52 | } |
53 | } |