diff --git a/changelogs/fragments/401.yml b/changelogs/fragments/401.yml new file mode 100644 index 00000000..ad6c5542 --- /dev/null +++ b/changelogs/fragments/401.yml @@ -0,0 +1,2 @@ +bugfixes: + - exporter - fix the pgbackrest-info.sh to force the necessary console output level that it expects diff --git a/postgres_exporter/linux/pgbackrest-info.sh b/postgres_exporter/linux/pgbackrest-info.sh index 89ef0f2e..2538d718 100755 --- a/postgres_exporter/linux/pgbackrest-info.sh +++ b/postgres_exporter/linux/pgbackrest-info.sh @@ -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 @@ -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