aboutsummaryrefslogtreecommitdiff
path: root/modules/profile/manifests
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-07-10 10:45:04 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-07-11 08:02:15 +0200
commitbff7d1b743bc2239d7ce7ced37dd03e4e846c03d (patch)
treee8f46c07837c1c44c599673072fe34d55c767683 /modules/profile/manifests
parenta0df248a2be61557b8a67c3d6e4df24dc3e7843e (diff)
downloadPuppet-bff7d1b743bc2239d7ce7ced37dd03e4e846c03d.tar.gz
Puppet-bff7d1b743bc2239d7ce7ced37dd03e4e846c03d.tar.zst
Puppet-bff7d1b743bc2239d7ce7ced37dd03e4e846c03d.zip
Add monitoring for backup
Diffstat (limited to 'modules/profile/manifests')
-rw-r--r--modules/profile/manifests/fstab.pp6
-rw-r--r--modules/profile/manifests/monitoring/local_service.pp8
-rw-r--r--modules/profile/manifests/postgresql/backup_dump.pp6
3 files changed, 13 insertions, 7 deletions
diff --git a/modules/profile/manifests/fstab.pp b/modules/profile/manifests/fstab.pp
index 8ecfe72..3af316e 100644
--- a/modules/profile/manifests/fstab.pp
+++ b/modules/profile/manifests/fstab.pp
@@ -15,6 +15,12 @@ class profile::fstab (
15 device => "UUID=${infos[1]}", 15 device => "UUID=${infos[1]}",
16 fstype => $infos[2] 16 fstype => $infos[2]
17 } 17 }
18
19 @profile::monitoring::local_service { "Size on ${infos[0]} partition":
20 local => {
21 check_command => "check_local_disk!10%!5%!${infos[0]}",
22 };
23 }
18 } 24 }
19 } 25 }
20} 26}
diff --git a/modules/profile/manifests/monitoring/local_service.pp b/modules/profile/manifests/monitoring/local_service.pp
index 0caf72e..9af7c7a 100644
--- a/modules/profile/manifests/monitoring/local_service.pp
+++ b/modules/profile/manifests/monitoring/local_service.pp
@@ -46,10 +46,10 @@ define profile::monitoring::local_service (
46 }) 46 })
47 47
48 $sudos.each |$sudo_name, $content| { 48 $sudos.each |$sudo_name, $content| {
49 sudo::conf { $sudo_name: 49 ensure_resource("sudo::conf", $sudo_name, {
50 content => $content, 50 content => $content,
51 before => Nagios_service[$service_description], 51 before => Nagios_service[$service_description],
52 } 52 })
53 } 53 }
54 54
55 [true, false].each |$services_for_master| { 55 [true, false].each |$services_for_master| {
diff --git a/modules/profile/manifests/postgresql/backup_dump.pp b/modules/profile/manifests/postgresql/backup_dump.pp
index 5e469c5..5f456ed 100644
--- a/modules/profile/manifests/postgresql/backup_dump.pp
+++ b/modules/profile/manifests/postgresql/backup_dump.pp
@@ -60,10 +60,10 @@ define profile::postgresql::backup_dump (
60 60
61 @profile::monitoring::local_service { "Last postgresql dump in $pg_backup_path is not too old": 61 @profile::monitoring::local_service { "Last postgresql dump in $pg_backup_path is not too old":
62 sudos => { 62 sudos => {
63 "naemon-postgresql-dumps" => "naemon ALL=($pg_user) NOPASSWD: /usr/bin/find $pg_backup_path -mindepth 1 -maxdepth 1 -printf %T@\\n", 63 "naemon-postgresql-dumps-$pg_host" => "naemon ALL=($pg_user) NOPASSWD: /usr/bin/find $pg_backup_path -mindepth 1 -maxdepth 1 -printf %T@?n",
64 } 64 },
65 local => { 65 local => {
66 check_command => "check_last_file_date!$pg_backup_path!10!$pg_user" 66 check_command => "check_last_file_date!$pg_backup_path!10!$pg_user",
67 } 67 }
68 } 68 }
69} 69}