diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-07-11 09:11:42 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-07-11 09:21:36 +0200 |
commit | d8bc769648c1528f5d749deee060d70e326ef431 (patch) | |
tree | 06b1e40db99815133dcc40e3e68531d45e1bd228 | |
parent | 0cdf494080b285e81b531a38dbbac7f7d8e9c990 (diff) | |
download | Puppet-d8bc769648c1528f5d749deee060d70e326ef431.tar.gz Puppet-d8bc769648c1528f5d749deee060d70e326ef431.tar.zst Puppet-d8bc769648c1528f5d749deee060d70e326ef431.zip |
Monitor rsync backups
-rw-r--r-- | modules/profile/manifests/postgresql/backup_dump.pp | 2 | ||||
-rw-r--r-- | modules/role/manifests/backup.pp | 6 | ||||
-rw-r--r-- | readme.md | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/modules/profile/manifests/postgresql/backup_dump.pp b/modules/profile/manifests/postgresql/backup_dump.pp index 5f456ed..e247cf0 100644 --- a/modules/profile/manifests/postgresql/backup_dump.pp +++ b/modules/profile/manifests/postgresql/backup_dump.pp | |||
@@ -63,7 +63,7 @@ define profile::postgresql::backup_dump ( | |||
63 | "naemon-postgresql-dumps-$pg_host" => "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!7!$pg_user", |
67 | } | 67 | } |
68 | } | 68 | } |
69 | } | 69 | } |
diff --git a/modules/role/manifests/backup.pp b/modules/role/manifests/backup.pp index c0672c6..6b8d00c 100644 --- a/modules/role/manifests/backup.pp +++ b/modules/role/manifests/backup.pp | |||
@@ -125,5 +125,11 @@ class role::backup ( | |||
125 | order => "$order_dirname-$order_part", | 125 | order => "$order_dirname-$order_part", |
126 | } | 126 | } |
127 | } | 127 | } |
128 | |||
129 | @profile::monitoring::local_service { "Last backup in $base is not too old": | ||
130 | local => { | ||
131 | check_command => "check_last_file_date!$base!14", | ||
132 | } | ||
133 | } | ||
128 | } | 134 | } |
129 | } | 135 | } |
@@ -22,10 +22,9 @@ reusable component. (The structure is inspired from the tutorial at | |||
22 | - Add some monitoring: | 22 | - Add some monitoring: |
23 | - modules/profile/manifests/postgresql/ssl.pp (check postgresql certificate) | 23 | - modules/profile/manifests/postgresql/ssl.pp (check postgresql certificate) |
24 | - modules/profile/manifests/postgresql/backup\_pgbouncer.pp (check pgbouncer works) | 24 | - modules/profile/manifests/postgresql/backup\_pgbouncer.pp (check pgbouncer works) |
25 | - modules/profile/manifests/apache.pp (check website is accessible and ssl) | ||
26 | - modules/profile/manifests/mail.pp (check e-mails are going through) | 25 | - modules/profile/manifests/mail.pp (check e-mails are going through) |
27 | - modules/profile/manifests/redis.pp (check redis is running) | 26 | - modules/profile/manifests/redis.pp (check redis is running) |
28 | - modules/role/\* (role-specific checks) | 27 | - modules/role/manifests/cryptoportfolio (role-specific checks) |
29 | - Add redis replication and dumps | 28 | - Add redis replication and dumps |
30 | - Restore backups for cryptoportfolio | 29 | - Restore backups for cryptoportfolio |
31 | - Ensure latest by default for packages | 30 | - Ensure latest by default for packages |