From 0a3a766bf1577ab2ea429bfa4d490a8014a59775 Mon Sep 17 00:00:00 2001 From: Keith Fiske Date: Wed, 24 Apr 2024 11:13:42 -0400 Subject: [PATCH] fix: fix pgbackrest script to use proper console log level (#402) * 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 --- changelogs/fragments/401.yml | 2 ++ postgres_exporter/linux/pgbackrest-info.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/401.yml 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