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')