]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/profile/manifests/postgresql/master.pp
Add postgresql monitoring
[perso/Immae/Projets/Puppet.git] / modules / profile / manifests / postgresql / master.pp
index 02315a615d7e771edaba1e6828582099bd387142..e775eb439b3c0bcf4bff79ec318a25448e8ca5a4 100644 (file)
@@ -59,5 +59,15 @@ define profile::postgresql::master (
       handle_slot   => true,
       add_self_role => true,
     }
+
+    @profile::monitoring::local_service { "Postgresql replication for $backup_host is up to date":
+      sudos => {
+        "naemon-postgresql-replication-$backup_host" => "naemon ALL=(postgres) NOPASSWD: /etc/naemon/monitoring-plugins/check_postgres_replication $backup_host /run/postgresql 5432"
+
+      },
+      local => {
+        check_command => "check_postgresql_replication!$backup_host!/run/postgresql/!5432",
+      }
+    }
   }
 }