From 2c086e491b92d21191db2b2beb964ab2465f920c Mon Sep 17 00:00:00 2001 From: ngosang Date: Tue, 6 Dec 2022 21:49:33 +0100 Subject: [PATCH] Update Grafana dashboard --- grafana/grafana_dashboard.json | 133 +++++++++++++++++++++++++++------ 1 file changed, 111 insertions(+), 22 deletions(-) diff --git a/grafana/grafana_dashboard.json b/grafana/grafana_dashboard.json index 9a24b6b..1977ae7 100644 --- a/grafana/grafana_dashboard.json +++ b/grafana/grafana_dashboard.json @@ -1,4 +1,53 @@ { + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "9.3.0" + }, + { + "type": "panel", + "id": "piechart", + "name": "Pie chart", + "version": "" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], "annotations": { "list": [ { @@ -26,14 +75,22 @@ "fiscalYearStartMonth": 0, "gnetId": 9846, "graphTooltip": 0, - "id": 40, - "links": [], + "id": null, + "links": [ + { + "icon": "external link", + "tags": [ + "system" + ], + "type": "dashboards" + } + ], "liveNow": false, "panels": [ { "datasource": { "type": "prometheus", - "uid": "fmMKqssGk" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -102,7 +159,11 @@ "expr": "restic_check_success", "interval": "", "legendFormat": "", - "refId": "A" + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + } } ], "title": "Repository Check", @@ -111,7 +172,7 @@ { "datasource": { "type": "prometheus", - "uid": "fmMKqssGk" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -228,7 +289,11 @@ "interval": "", "intervalFactor": 1, "legendFormat": "{{client_hostname}}", - "refId": "A" + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + } }, { "exemplar": true, @@ -239,7 +304,11 @@ "interval": "", "intervalFactor": 1, "legendFormat": "{{client_hostname}}", - "refId": "B" + "refId": "B", + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + } } ], "title": "Last backup", @@ -279,7 +348,7 @@ { "datasource": { "type": "prometheus", - "uid": "fmMKqssGk" + "uid": "${DS_PROMETHEUS}" }, "description": "", "fieldConfig": { @@ -343,7 +412,11 @@ "interval": "", "intervalFactor": 1, "legendFormat": "{{client_hostname}}", - "refId": "A" + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + } } ], "title": "Total snapshot count", @@ -378,7 +451,7 @@ { "datasource": { "type": "prometheus", - "uid": "fmMKqssGk" + "uid": "${DS_PROMETHEUS}" }, "description": "", "fieldConfig": { @@ -455,7 +528,11 @@ "interval": "", "intervalFactor": 1, "legendFormat": "{{client_hostname}}", - "refId": "A" + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + } } ], "title": "Total backup size", @@ -490,7 +567,7 @@ { "datasource": { "type": "prometheus", - "uid": "fmMKqssGk" + "uid": "${DS_PROMETHEUS}" }, "description": "", "fieldConfig": { @@ -552,7 +629,11 @@ "interval": "", "intervalFactor": 1, "legendFormat": "{{client_hostname}}", - "refId": "A" + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + } } ], "title": "Total backup size", @@ -583,7 +664,7 @@ { "datasource": { "type": "prometheus", - "uid": "fmMKqssGk" + "uid": "${DS_PROMETHEUS}" }, "description": "", "fieldConfig": { @@ -642,7 +723,7 @@ { "datasource": { "type": "prometheus", - "uid": "fmMKqssGk" + "uid": "${DS_PROMETHEUS}" }, "exemplar": true, "expr": "restic_backup_files_total", @@ -686,7 +767,7 @@ { "datasource": { "type": "prometheus", - "uid": "fmMKqssGk" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -772,7 +853,11 @@ "interval": "", "intervalFactor": 2, "legendFormat": "{{client_hostname}}", - "refId": "A" + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + } } ], "title": "Total backup size", @@ -781,7 +866,7 @@ { "datasource": { "type": "prometheus", - "uid": "fmMKqssGk" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -863,7 +948,7 @@ { "datasource": { "type": "prometheus", - "uid": "fmMKqssGk" + "uid": "${DS_PROMETHEUS}" }, "exemplar": true, "expr": "sum by(client_hostname,client_username) (restic_backup_files_total)", @@ -880,7 +965,7 @@ { "datasource": { "type": "prometheus", - "uid": "fmMKqssGk" + "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -966,7 +1051,11 @@ "interval": "", "intervalFactor": 2, "legendFormat": "{{client_hostname}}", - "refId": "A" + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + } } ], "title": "Total snapshot count", @@ -1014,6 +1103,6 @@ "timezone": "", "title": "Restic Exporter", "uid": "2JzZl3B7k", - "version": 22, + "version": 23, "weekStart": "" } \ No newline at end of file