From c4e1d9f02ab693ba200e9c2cd2fadbf437ddbeab Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Tue, 21 Jan 2014 17:10:56 -0500 Subject: [PATCH] puppet: check_postgres_backup: Connect to the 'postgres' database This allows the utility to run on trac.zulip.net, which doesn't have a 'zulip' database. (imported from commit c8eabb89e5e161191d6f2c92ca2b1428b17a9aa0) --- .../zulip_internal/files/nagios_plugins/check_postgres_backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/puppet/zulip_internal/files/nagios_plugins/check_postgres_backup b/puppet/zulip_internal/files/nagios_plugins/check_postgres_backup index f44750561f..655b83155d 100755 --- a/puppet/zulip_internal/files/nagios_plugins/check_postgres_backup +++ b/puppet/zulip_internal/files/nagios_plugins/check_postgres_backup @@ -16,7 +16,7 @@ def report(state, msg): print "%s: %s" % (state, msg) exit(states[state]) -if subprocess.check_output(['psql', '-t', '-c', +if subprocess.check_output(['psql', 'postgres', '-t', '-c', 'SELECT pg_is_in_recovery()']).strip() != 'f': report('OK', 'this is not the primary')