check_postgres_replication_lag: Fix psql command line.

This allows the plugin to be run as users other than the "zulip" user,
where the "zulip" database would not be the default.
This commit is contained in:
Tim Abbott 2016-08-03 12:49:36 -07:00
parent 5194485d74
commit 852af83d3c
1 changed files with 2 additions and 2 deletions

View File

@ -22,8 +22,8 @@ def report(state, msg):
def get_loc_over_ssh(host, func):
try:
return subprocess.check_output(['ssh', host, '-l', 'zulip',
'psql -t -c "SELECT %s()"' % (func,)],
return subprocess.check_output(['ssh', host,
'psql zulip -t -c "SELECT %s()"' % (func,)],
stderr=subprocess.STDOUT,
universal_newlines=True)
except subprocess.CalledProcessError as e: