From 852af83d3cc37a6c76b3b98160e83135f7bdb089 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 3 Aug 2016 12:49:36 -0700 Subject: [PATCH] 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. --- .../zulip_nagios_server/check_postgres_replication_lag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/puppet/zulip/files/nagios_plugins/zulip_nagios_server/check_postgres_replication_lag b/puppet/zulip/files/nagios_plugins/zulip_nagios_server/check_postgres_replication_lag index 70113d4c55..2e56f00e84 100755 --- a/puppet/zulip/files/nagios_plugins/zulip_nagios_server/check_postgres_replication_lag +++ b/puppet/zulip/files/nagios_plugins/zulip_nagios_server/check_postgres_replication_lag @@ -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: