]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/profile/manifests/postgresql/backup_dump.pp
Monitor rsync backups
[perso/Immae/Projets/Puppet.git] / modules / profile / manifests / postgresql / backup_dump.pp
index 53fb20ee0b3b2336ac7e3fd241252ceb09f44833..e247cf027e64535e804060bcbcb5c9668179cb80 100644 (file)
@@ -57,4 +57,13 @@ define profile::postgresql::backup_dump (
       },
     ]
   }
+
+  @profile::monitoring::local_service { "Last postgresql dump in $pg_backup_path is not too old":
+    sudos => {
+      "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!7!$pg_user",
+    }
+  }
 }