From 9f5a955d40985ce3166fff9a4fcc89a11a1a3c5e Mon Sep 17 00:00:00 2001 From: 2319021847 <2319021847@2319021847> Date: Mon, 27 Feb 2017 16:13:46 +0800 Subject: [PATCH] add standby information --- pg_monz/usr-local-bin/pgsql_standby.sh | 2 +- pg_monz/usr-local-etc/pgsql_funcs.conf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pg_monz/usr-local-bin/pgsql_standby.sh b/pg_monz/usr-local-bin/pgsql_standby.sh index 4e57775..3c0f9f3 100755 --- a/pg_monz/usr-local-bin/pgsql_standby.sh +++ b/pg_monz/usr-local-bin/pgsql_standby.sh @@ -5,5 +5,5 @@ PGSHELL_CONFDIR="$1" # Load the psql connection option parameters. source $PGSHELL_CONFDIR/pgsql_funcs.conf -result=$(psql -A -t -h $PGHOST -p $PGPORT -U $PGROLE -d $PGDATABASE -c "select pg_is_in_recovery()::int" 2>&1) +result=$(psql -A -t -h $PGSTANDBY -p $PGPORT -U $PGROLE -d $PGDATABASE -c "select pg_is_in_recovery()::int" 2>&1) echo "$result" diff --git a/pg_monz/usr-local-etc/pgsql_funcs.conf b/pg_monz/usr-local-etc/pgsql_funcs.conf index 96fc91c..6b24eb2 100644 --- a/pg_monz/usr-local-etc/pgsql_funcs.conf +++ b/pg_monz/usr-local-etc/pgsql_funcs.conf @@ -2,3 +2,4 @@ PGHOST=127.0.0.1 PGPORT=5432 PGROLE=postgres PGDATABASE=postgres +PGSTANDBY=standby_host \ No newline at end of file