From e1ad24fa2ab77903af95e9a57687b08bb81b84cc Mon Sep 17 00:00:00 2001 From: Evangelos Foutras <evangelos@foutrelis.com> Date: Mon, 28 Jun 2021 00:10:34 +0300 Subject: [PATCH] Add Borg Backups dashboard Currently only tracks repo sizes and total backup space used (as a sum of the former, not the real exact space used on each storage location). --- roles/grafana/files/dashboards/backups.json | 234 ++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 roles/grafana/files/dashboards/backups.json diff --git a/roles/grafana/files/dashboards/backups.json b/roles/grafana/files/dashboards/backups.json new file mode 100644 index 000000000..ead813022 --- /dev/null +++ b/roles/grafana/files/dashboards/backups.json @@ -0,0 +1,234 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 47, + "links": [], + "panels": [ + { + "datasource": "Prometheus", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.0.3", + "targets": [ + { + "exemplar": true, + "expr": "borg_hetzner_repo_size_bytes{}", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "{{ instance }}", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(borg_hetzner_repo_size_bytes) + 154573468884", + "hide": false, + "interval": "", + "legendFormat": "Total size of all repos (+ apollo)", + "refId": "B" + }, + { + "exemplar": true, + "expr": "10000*2^30", + "hide": false, + "interval": "", + "legendFormat": "Storage Box quota", + "refId": "C" + } + ], + "title": "Borg Repository Size (Hetzner)", + "type": "timeseries" + }, + { + "datasource": "Prometheus", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 3, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.0.3", + "targets": [ + { + "exemplar": true, + "expr": "borg_offsite_repo_size_bytes{}", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "{{ instance }}", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(borg_offsite_repo_size_bytes) + 2502953482529 + 151779047659", + "hide": false, + "interval": "", + "legendFormat": "Total size of all repos (+ orion & apollo)", + "refId": "B" + } + ], + "title": "Borg Repository Size (Offsite)", + "type": "timeseries" + } + ], + "refresh": "", + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6M", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Borg Backups", + "uid": "Rnqpymznz", + "version": 27 +} \ No newline at end of file -- GitLab