]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/profile/manifests/postgresql.pp
Add monitoring for etherpad
[perso/Immae/Projets/Puppet.git] / modules / profile / manifests / postgresql.pp
index 97ce57291b6bbf4abf9de7c2e04932b5dbe04435..fedbcb1ef7574f5675690a3b83bf25d01177873d 100644 (file)
@@ -28,5 +28,13 @@ class profile::postgresql (
 
   profile::postgresql::base_pg_hba_rules { "default": }
 
+  @profile::monitoring::local_service { "Databases are present in postgresql":
+    sudos => {
+      "naemon-postgresql-database-public" => "naemon ALL=(postgres) NOPASSWD: /usr/bin/psql -c select\\ nspname\\ from\\ pg_catalog.pg_namespace"
+    },
+    local => {
+      check_command => "check_command_output!psql -c 'select nspname from pg_catalog.pg_namespace'!public!-r postgres",
+    }
+  }
 }