Skip to content

Commit d484fa8

Browse files
authored
Fix backup status query (#484)
The backup status query was incorrectly changed before. This change uses the original query as a model, but simplifies the query based on the underlying metrics. Notes: - The prometheus min function takes one metric; - The last incremental backup returns the last incr, diff, or full - The last diff backup returns the last diff or full - The last full backup returns the last full This is true currently for PGO OTEL and postgres_exporter solutions.
1 parent 0537920 commit d484fa8

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

changelogs/fragments/481.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bugfixes:
2+
- grafana - Fixed container postgresql details dashboard query for last completed backup

grafana/containers/postgresql_details.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
"pluginVersion": "7.4.5",
152152
"targets": [
153153
{
154-
"expr": "min(ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"}, ccp_backrest_last_diff_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"}, ccp_backrest_last_full_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"})",
154+
"expr": "min(ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} or ccp_backrest_last_diff_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} or ccp_backrest_last_full_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"}) ",
155155
"format": "time_series",
156156
"interval": "",
157157
"intervalFactor": 1,

0 commit comments

Comments
 (0)