Skip to content

Commit

Permalink
fix: fix pgbackrest script to use proper console log level (#402)
Browse files Browse the repository at this point in the history
* fix: fix pgbackrest script to use proper console log level

* fix: fix pgbackrest script to user proper constol log level for stderr

* fix: update version requirements for grafana

* chore: revert last commit
  • Loading branch information
keithf4 authored Apr 24, 2024
1 parent e11f5e3 commit 0a3a766
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 --log-level-stderr=warn 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 --log-level-stderr=warn info | tr -d '\n') | grep $SYSTEM_ID
if [ $? == 0 ]; then
break
fi
Expand Down

0 comments on commit 0a3a766

Please sign in to comment.