diff --git a/check_pg_streaming_replication b/check_pg_streaming_replication index 0cd18a4..378fa5b 100755 --- a/check_pg_streaming_replication +++ b/check_pg_streaming_replication @@ -305,11 +305,11 @@ then debug "Last replayed LSN: $LAST_REPLAYED_LSN" - # Get master connection information from recovery.conf file - MASTER_CONN_INFOS=$( egrep '^ *primary_conninfo' $RECOVERY_CONF|sed "s/^ *primary_conninfo *= *\(.\+\) *$/\1/" ) + # Get master connection information from primary_conninfo configuration parameter + MASTER_CONN_INFOS=$( psql_get "SHOW primary_conninfo" ) if [ ! -n "$MASTER_CONN_INFOS" ] then - echo "UNKNOWN: Can't retrieve master connection information form recovery.conf file" + echo "UNKNOWN: Can't retrieve master connection information from primary_conninfo configuration parameter" exit 3 fi debug "Master connection information: $MASTER_CONN_INFOS"