Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix handling of 3 number backrest version #421

Merged
merged 2 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/420.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- postgres_exporter - Fix query for pgBackRest monitoring to handle 3 number versions
2 changes: 1 addition & 1 deletion postgres_exporter/linux/queries_backrest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ccp_backrest_last_info:
)
SELECT a.config_file
, a.stanza
, a.backup_data->'backrest'->>'version' AS backrest_repo_version
, split_part(a.backup_data->'backrest'->>'version', '.', 1) || lpad(split_part(a.backup_data->'backrest'->>'version', '.', 2), 2, '0') || lpad(coalesce(nullif(split_part(a.backup_data->'backrest'->>'version', '.', 3), ''), '00'), 2, '0') AS backrest_repo_version
, a.backup_data->'database'->>'repo-key' AS repo
, a.backup_data->>'type' AS backup_type
, a.backup_data->'info'->'repository'->>'delta' AS repo_backup_size_bytes
Expand Down