fix(grafana): update dashboard queries and thresholds

- Fix Last Backup Status panel to use bool modifier for proper 1/0 values
- Change RPO threshold from 24h to 7 days (604800s) for status check
- Clean up table transformations to exclude duplicate fields
- Update variable refresh to trigger on time range change
This commit is contained in:
2026-01-17 13:24:54 +01:00
parent b120f1507e
commit d33f6d343a

View File

@@ -94,7 +94,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "dbbackup_rpo_seconds{instance=~\"$instance\"} < 86400", "expr": "dbbackup_rpo_seconds{instance=~\"$instance\"} < bool 604800",
"legendFormat": "{{database}}", "legendFormat": "{{database}}",
"range": true, "range": true,
"refId": "A" "refId": "A"
@@ -711,19 +711,6 @@
}, },
"pluginVersion": "10.2.0", "pluginVersion": "10.2.0",
"targets": [ "targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "dbbackup_rpo_seconds{instance=~\"$instance\"} < 86400",
"format": "table",
"instant": true,
"legendFormat": "__auto",
"range": false,
"refId": "Status"
},
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
@@ -769,26 +756,30 @@
"Time": true, "Time": true,
"Time 1": true, "Time 1": true,
"Time 2": true, "Time 2": true,
"Time 3": true,
"__name__": true, "__name__": true,
"__name__ 1": true, "__name__ 1": true,
"__name__ 2": true, "__name__ 2": true,
"__name__ 3": true,
"instance 1": true, "instance 1": true,
"instance 2": true, "instance 2": true,
"instance 3": true,
"job": true, "job": true,
"job 1": true, "job 1": true,
"job 2": true, "job 2": true,
"job 3": true "engine 1": true,
"engine 2": true
},
"indexByName": {
"Database": 0,
"Instance": 1,
"Engine": 2,
"RPO": 3,
"Size": 4
}, },
"indexByName": {},
"renameByName": { "renameByName": {
"Value #RPO": "RPO", "Value #RPO": "RPO",
"Value #Size": "Size", "Value #Size": "Size",
"Value #Status": "Status",
"database": "Database", "database": "Database",
"instance": "Instance" "instance": "Instance",
"engine": "Engine"
} }
} }
} }
@@ -1275,7 +1266,7 @@
"query": "label_values(dbbackup_rpo_seconds, instance)", "query": "label_values(dbbackup_rpo_seconds, instance)",
"refId": "StandardVariableQuery" "refId": "StandardVariableQuery"
}, },
"refresh": 1, "refresh": 2,
"regex": "", "regex": "",
"skipUrlSync": false, "skipUrlSync": false,
"sort": 1, "sort": 1,