]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/profile/manifests/postgresql/backup_pgbouncer.pp
Add postgresql monitoring
[perso/Immae/Projets/Puppet.git] / modules / profile / manifests / postgresql / backup_pgbouncer.pp
index 45b8ed5a5528a89cfde528dda73bc421441e4b02..c82eefdedf954be3068f68a6888d95488e434d43 100644 (file)
@@ -48,6 +48,16 @@ define profile::postgresql::backup_pgbouncer (
     content => "${pg_infos[pgbouncer_dbname]} = host=$pg_path$pg_port user=${pg_infos[dbuser]} dbname=${pg_infos[dbname]}",
   }
 
+  # FIXME: current pam configuration requires password for postgres
+  # @profile::monitoring::local_service { "Database ${pg_infos[pgbouncer_dbname]} is available in pgbouncer":
+  #   sudos => {
+  #     "naemon-postgresql-database-public" => "naemon ALL=(postgres) NOPASSWD: /usr/bin/psql -c select\ nspname\ from\ pg_catalog.pg_namespace ${pg_infos[pgbouncer_dbname]}"
+  #   },
+  #   local => {
+  #     check_command => "check_command_output!psql -c 'select nspname from pg_catalog.pg_namespace' ${pg_infos[pgbouncer_dbname]}!public!-r postgres",
+  #   }
+  # }
+
   # pg_hba for accessed cluster
   postgresql::server::pg_hba_rule { "$pg_backup_host - local access as ${pg_infos[dbuser]} user":
     description => "Allow local access to ${pg_infos[dbuser]} user",