Skip to content

Commit

Permalink
fix: fix pgbackrest script to use proper console log level
Browse files Browse the repository at this point in the history
  • Loading branch information
keithf4 committed Apr 17, 2024
1 parent 3d31a66 commit aa40269
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/401.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- exporter - fix the pgbackrest-info.sh to force the necessary console output level that it expects
4 changes: 2 additions & 2 deletions postgres_exporter/linux/pgbackrest-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ elif [ ! -z "$BACKREST_CONFIGS" ] && [ -z "$BACKREST_STANZAS" ]; then
read -r -a config_array <<< "$BACKREST_CONFIGS"
for conf in "${config_array[@]}"
do
echo $(echo -n "$conf|" | tr '/' '_'; pgbackrest --config=$conf --output=json info | tr -d '\n') | grep $SYSTEM_ID
echo $(echo -n "$conf|" | tr '/' '_'; pgbackrest --config=$conf --output=json --log-level-console=info info | tr -d '\n') | grep $SYSTEM_ID
if [ $? == 0 ]; then
break
fi
Expand All @@ -37,7 +37,7 @@ elif [ -z "$BACKREST_CONFIGS" ] && [ ! -z "$BACKREST_STANZAS" ]; then
for stanza in "${stanza_array[@]}"
do
export PGBACKREST_STANZA=$stanza
echo $(echo -n "$conf|" | tr '/' '_'; pgbackrest --output=json info | tr -d '\n') | grep $SYSTEM_ID
echo $(echo -n "$conf|" | tr '/' '_'; pgbackrest --output=json --log-level-console=info info | tr -d '\n') | grep $SYSTEM_ID
if [ $? == 0 ]; then
break
fi
Expand Down

0 comments on commit aa40269

Please sign in to comment.