diff --git a/nixos/modules/monitoring/server/grafana-dashboards/backups.json b/nixos/modules/monitoring/server/grafana-dashboards/backups.json index 5c9f9ef28457eac67a73826b46a34eddb6b53619..df77fb3747d17ac8bd86848e966b470dceae8669 100644 --- a/nixos/modules/monitoring/server/grafana-dashboards/backups.json +++ b/nixos/modules/monitoring/server/grafana-dashboards/backups.json @@ -142,7 +142,7 @@ ] }, "gridPos": { - "h": 7, + "h": 5, "w": 12, "x": 0, "y": 1 @@ -298,7 +298,7 @@ ] }, "gridPos": { - "h": 7, + "h": 5, "w": 12, "x": 12, "y": 1 @@ -443,10 +443,10 @@ "overrides": [] }, "gridPos": { - "h": 7, + "h": 5, "w": 12, "x": 0, - "y": 8 + "y": 6 }, "id": 41, "options": { @@ -578,10 +578,10 @@ "overrides": [] }, "gridPos": { - "h": 7, + "h": 5, "w": 12, "x": 12, - "y": 8 + "y": 6 }, "id": 42, "options": { @@ -714,10 +714,10 @@ "overrides": [] }, "gridPos": { - "h": 7, + "h": 5, "w": 12, "x": 0, - "y": 15 + "y": 11 }, "id": 52, "options": { @@ -848,10 +848,10 @@ "overrides": [] }, "gridPos": { - "h": 7, + "h": 5, "w": 12, "x": 12, - "y": 15 + "y": 11 }, "id": 53, "options": { @@ -939,10 +939,10 @@ "overrides": [] }, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 0, - "y": 22 + "y": 16 }, "id": 49, "options": { @@ -1007,6 +1007,134 @@ } ], "type": "barchart" + }, + { + "datasource": { + "type": "loki", + "uid": "000000002" + }, + "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 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 55, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.4.7", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "000000002" + }, + "expr": "{unit=\"borgbackup-job-daily.service\"} |= \"compressed_size\" | pattern \"<_>\\\"compressed_size\\\": <compressed_size>,\"", + "hide": false, + "legendFormat": "{{host}} archive", + "refId": "This archive size in bytes" + }, + { + "datasource": { + "type": "loki", + "uid": "000000002" + }, + "expr": "{unit=\"borgbackup-job-daily.service\"} |= \"unique_csize\" | pattern \"<_>\\\"unique_csize\\\": <unique_csize>,\"", + "hide": false, + "legendFormat": "{{host}} all archives", + "refId": "All archives deduplicated size" + } + ], + "title": "Backup set size", + "transformations": [ + { + "id": "labelsToFields", + "options": { + "keepLabels": [ + "host", + "unique_csize", + "compressed_size" + ] + } + }, + { + "id": "convertFieldType", + "options": { + "conversions": [ + { + "destinationType": "number", + "targetField": "unique_csize" + }, + { + "destinationType": "number", + "targetField": "compressed_size" + } + ], + "fields": {} + } + }, + { + "id": "merge", + "options": {} + } + ], + "type": "timeseries" } ], "refresh": "5m",