]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Monitor rsync backups
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Wed, 11 Jul 2018 07:11:42 +0000 (09:11 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Wed, 11 Jul 2018 07:21:36 +0000 (09:21 +0200)
modules/profile/manifests/postgresql/backup_dump.pp
modules/role/manifests/backup.pp
readme.md

index 5f456ed37060bd4393caf7dd05aabe813623e66f..e247cf027e64535e804060bcbcb5c9668179cb80 100644 (file)
@@ -63,7 +63,7 @@ define profile::postgresql::backup_dump (
       "naemon-postgresql-dumps-$pg_host" => "naemon  ALL=($pg_user) NOPASSWD: /usr/bin/find $pg_backup_path -mindepth 1 -maxdepth 1 -printf %T@?n",
     },
     local => {
-      check_command => "check_last_file_date!$pg_backup_path!10!$pg_user",
+      check_command => "check_last_file_date!$pg_backup_path!7!$pg_user",
     }
   }
 }
index c0672c6c036b6032dae1471606853ca6f24e2a89..6b8d00c00d93b10af27ba96724931eadbecaa5ac 100644 (file)
@@ -125,5 +125,11 @@ class role::backup (
         order   => "$order_dirname-$order_part",
       }
     }
+
+    @profile::monitoring::local_service { "Last backup in $base is not too old":
+      local => {
+        check_command => "check_last_file_date!$base!14",
+      }
+    }
   }
 }
index d8d804699507773ad068d211263f1b7ded314e14..74bb2945e2d19242a7bb5c39859d300c2610f6aa 100644 (file)
--- a/readme.md
+++ b/readme.md
@@ -22,10 +22,9 @@ reusable component. (The structure is inspired from the tutorial at
 - Add some monitoring:
   - modules/profile/manifests/postgresql/ssl.pp (check postgresql certificate)
   - modules/profile/manifests/postgresql/backup\_pgbouncer.pp (check pgbouncer works)
-  - modules/profile/manifests/apache.pp (check website is accessible and ssl)
   - modules/profile/manifests/mail.pp (check e-mails are going through)
   - modules/profile/manifests/redis.pp (check redis is running)
-  - modules/role/\* (role-specific checks)
+  - modules/role/manifests/cryptoportfolio (role-specific checks)
 - Add redis replication and dumps
 - Restore backups for cryptoportfolio
 - Ensure latest by default for packages