diff options
Diffstat (limited to 'modules/profile/manifests/monitoring/services.pp')
-rw-r--r-- | modules/profile/manifests/monitoring/services.pp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/modules/profile/manifests/monitoring/services.pp b/modules/profile/manifests/monitoring/services.pp new file mode 100644 index 0000000..95c6efb --- /dev/null +++ b/modules/profile/manifests/monitoring/services.pp | |||
@@ -0,0 +1,42 @@ | |||
1 | class profile::monitoring::services { | ||
2 | |||
3 | profile::monitoring::local_service { | ||
4 | "Size on root partition": | ||
5 | local => { | ||
6 | check_command => "check_local_disk!20%!10%!/", | ||
7 | }; | ||
8 | "Total number of process": | ||
9 | local => { | ||
10 | check_command => "check_local_procs!50!100!RSZDT", | ||
11 | }; | ||
12 | "Average load": | ||
13 | local => { | ||
14 | check_command => "check_local_load!8.0,8.0,8.0!10.0,10.0,10.0", | ||
15 | }; | ||
16 | "Swap usage": | ||
17 | local => { | ||
18 | check_command => "check_local_swap!20!10", | ||
19 | }; | ||
20 | "fail2ban is active": | ||
21 | sudos => { | ||
22 | "naemon-fail2ban" => "naemon ALL=(root) NOPASSWD: /usr/bin/fail2ban-client ping", | ||
23 | }, | ||
24 | local => { | ||
25 | check_command => "check_command_output!fail2ban-client ping!pong!-r root", | ||
26 | }; | ||
27 | "NTP is activated and working": | ||
28 | local => { | ||
29 | check_command => "check_ntp", | ||
30 | }; | ||
31 | "No mdadm array is degraded": | ||
32 | common => { | ||
33 | ensure => (find_file("/proc/mdstat") == undef) ? { true => "absent", default =>"present" }, | ||
34 | }, | ||
35 | local => { | ||
36 | check_command => "check_md_raid", | ||
37 | }; | ||
38 | } | ||
39 | |||
40 | Profile::Monitoring::Local_service <| |> | ||
41 | Profile::Monitoring::External_service <| |> | ||
42 | } | ||