restic-exporter/grafana/grafana_dashboard.json

1113 lines
25 KiB
JSON
Raw Permalink Normal View History

2022-12-06 20:40:47 +01:00
{
2022-12-06 21:49:33 +01:00
"__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": ""
}
],
2022-12-06 20:40:47 +01:00
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"description": "Restic statistics dashboard",
"editable": true,
"fiscalYearStartMonth": 0,
"gnetId": 9846,
"graphTooltip": 0,
2022-12-06 21:49:33 +01:00
"id": null,
"links": [
{
"icon": "external link",
"tags": [
"system"
],
"type": "dashboards"
}
],
2022-12-06 20:40:47 +01:00
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus",
2022-12-06 21:49:33 +01:00
"uid": "${DS_PROMETHEUS}"
2022-12-06 20:40:47 +01:00
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"0": {
"color": "red",
"index": 1,
"text": "ERROR"
},
"1": {
"color": "green",
"index": 0,
"text": "OK"
}
},
"type": "value"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 18,
2022-12-06 20:40:47 +01:00
"x": 0,
"y": 0
},
"id": 40,
"options": {
"colorMode": "background",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "9.3.0",
"targets": [
{
"exemplar": true,
"expr": "restic_check_success",
"interval": "",
"legendFormat": "",
2022-12-06 21:49:33 +01:00
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
}
2022-12-06 20:40:47 +01:00
}
],
"title": "Repository Check",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 2
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 6,
"x": 18,
"y": 0
},
"id": 42,
"options": {
"colorMode": "background",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "9.3.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": true,
"expr": "restic_locks_total",
"interval": "",
"legendFormat": "",
"range": true,
"refId": "A"
}
],
"title": "Repository Locks",
"type": "stat"
},
2022-12-06 20:40:47 +01:00
{
"datasource": {
"type": "prometheus",
2022-12-06 21:49:33 +01:00
"uid": "${DS_PROMETHEUS}"
2022-12-06 20:40:47 +01:00
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"filterable": false,
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "last_backup"
},
"properties": [
{
"id": "custom.displayMode",
"value": "auto"
},
{
"id": "unit",
"value": "dateTimeAsIso"
}
]
},
{
"matcher": {
"id": "byName",
"options": "last_backup_since"
},
"properties": [
{
"id": "custom.displayMode",
"value": "color-background"
},
{
"id": "unit",
"value": "s"
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 604800
},
{
"color": "red",
"value": 1209600
}
]
}
}
]
}
]
},
"gridPos": {
"h": 9,
"w": 18,
2022-12-06 20:40:47 +01:00
"x": 0,
"y": 3
},
"id": 27,
"links": [],
"maxDataPoints": 100,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"frameIndex": 1,
"showHeader": true,
"sortBy": [
{
"desc": false,
"displayName": "client_hostname"
}
]
},
"pluginVersion": "9.3.0",
"targets": [
{
"exemplar": true,
"expr": "restic_backup_timestamp * 1000",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{client_hostname}}",
2022-12-06 21:49:33 +01:00
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
}
2022-12-06 20:40:47 +01:00
},
{
"exemplar": true,
"expr": "time() - restic_backup_timestamp",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{client_hostname}}",
2022-12-06 21:49:33 +01:00
"refId": "B",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
}
2022-12-06 20:40:47 +01:00
}
],
"title": "Last backup",
"transformations": [
{
"id": "merge",
"options": {}
},
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true,
"backup_id": true,
"backup_type": true,
"client_hostname": false,
"client_id": true,
"client_os_version": true,
"client_username": true,
"client_version": false,
2022-12-06 20:40:47 +01:00
"instance": true,
"job": true,
"snapshot_hash": true,
"snapshot_id": true
},
"indexByName": {},
"renameByName": {
"Value": "",
"Value #A": "last_backup",
"Value #B": "last_backup_since"
}
}
}
],
"type": "table"
},
{
"datasource": {
"type": "prometheus",
2022-12-06 21:49:33 +01:00
"uid": "${DS_PROMETHEUS}"
2022-12-06 20:40:47 +01:00
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"filterable": false,
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 6,
"x": 18,
2022-12-06 20:40:47 +01:00
"y": 3
},
"id": 32,
"links": [],
"maxDataPoints": 100,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"frameIndex": 1,
"showHeader": true,
"sortBy": [
{
"desc": false,
"displayName": "client_hostname"
}
]
},
"pluginVersion": "9.3.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
2022-12-06 20:40:47 +01:00
"exemplar": true,
"expr": "restic_backup_snapshots_total",
"format": "table",
"instant": true,
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{client_hostname}}",
"refId": "A"
2022-12-06 20:40:47 +01:00
}
],
"title": "Total snapshot count",
"transformations": [
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true,
"__name__": true,
"backup_id": true,
"backup_type": true,
"client_hostname": false,
"client_id": true,
"client_os_version": true,
"client_username": true,
"client_version": true,
"instance": true,
"job": true,
"snapshot_hash": true,
"snapshot_id": true
},
"indexByName": {},
"renameByName": {
"Value": "total_snapshot_count"
}
}
}
],
"type": "table"
},
{
"datasource": {
"type": "prometheus",
2022-12-06 21:49:33 +01:00
"uid": "${DS_PROMETHEUS}"
2022-12-06 20:40:47 +01:00
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"filterable": false,
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "total_backup_size"
},
"properties": [
{
"id": "unit",
"value": "bytes"
}
]
}
]
},
"gridPos": {
"h": 9,
"w": 18,
2022-12-06 20:40:47 +01:00
"x": 0,
"y": 12
},
"id": 34,
"links": [],
"maxDataPoints": 100,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"frameIndex": 1,
"showHeader": true,
"sortBy": [
{
"desc": false,
"displayName": "client_hostname"
}
]
},
"pluginVersion": "9.3.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
2022-12-06 20:40:47 +01:00
"exemplar": true,
"expr": "restic_backup_size_total",
"format": "table",
"instant": true,
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{client_hostname}}",
"refId": "A"
},
{
2022-12-06 21:49:33 +01:00
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": true,
"expr": "restic_backup_files_total",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{client_hostname}}",
"refId": "B"
2022-12-06 20:40:47 +01:00
}
],
"title": "Total backup size & files",
2022-12-06 20:40:47 +01:00
"transformations": [
{
"id": "joinByField",
"options": {
"byField": "client_hostname",
"mode": "outer"
}
},
2022-12-06 20:40:47 +01:00
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true,
"Time 1": true,
"Time 2": true,
2022-12-06 20:40:47 +01:00
"__name__": true,
"__name__ 1": true,
2022-12-06 20:40:47 +01:00
"backup_id": true,
"backup_type": true,
"client_hostname": false,
"client_id": true,
"client_os_version": true,
"client_username": true,
"client_username 1": true,
"client_username 2": true,
2022-12-06 20:40:47 +01:00
"client_version": true,
"client_version 1": true,
"client_version 2": true,
2022-12-06 20:40:47 +01:00
"instance": true,
"instance 1": true,
"instance 2": true,
2022-12-06 20:40:47 +01:00
"job": true,
"job 1": true,
"job 2": true,
2022-12-06 20:40:47 +01:00
"snapshot_hash": true,
"snapshot_hash 1": true,
"snapshot_hash 2": true,
2022-12-06 20:40:47 +01:00
"snapshot_id": true
},
"indexByName": {},
"renameByName": {
"Time 2": "",
"Value": "total_backup_size",
"Value #A": "total_backup_size",
"Value #B": "total_backup_files"
2022-12-06 20:40:47 +01:00
}
}
}
],
"type": "table"
},
{
"datasource": {
"type": "prometheus",
2022-12-06 21:49:33 +01:00
"uid": "${DS_PROMETHEUS}"
2022-12-06 20:40:47 +01:00
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": [],
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 6,
"x": 18,
2022-12-06 20:40:47 +01:00
"y": 12
},
"id": 35,
"links": [],
"maxDataPoints": 100,
"options": {
"displayLabels": [
"percent"
],
"legend": {
"displayMode": "list",
"placement": "bottom",
"showLegend": false,
"values": []
},
"pieType": "donut",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "/^Value$/",
"values": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "8.1.4",
"targets": [
{
"exemplar": true,
"expr": "restic_backup_size_total",
"format": "table",
"instant": true,
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{client_hostname}}",
2022-12-06 21:49:33 +01:00
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
}
2022-12-06 20:40:47 +01:00
}
],
"title": "Total backup size",
"transformations": [
{
"id": "organize",
"options": {
"excludeByName": {
"Time": false,
"__name__": true,
"backup_id": true,
"client_hostname": false,
"client_username": true,
"instance": true,
"job": true,
"snapshot_id": true
},
"indexByName": {},
"renameByName": {
"Value": "",
"snapshot_id": ""
}
}
}
],
"type": "piechart"
},
{
"datasource": {
"type": "prometheus",
2022-12-06 21:49:33 +01:00
"uid": "${DS_PROMETHEUS}"
2022-12-06 20:40:47 +01:00
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 30,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"links": [],
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "decbytes"
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 24,
"x": 0,
"y": 21
},
"id": 8,
"links": [],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "8.5.0",
"targets": [
{
"exemplar": true,
"expr": "sum by(client_hostname,client_username) (restic_backup_size_total)",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{client_hostname}}",
2022-12-06 21:49:33 +01:00
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
}
2022-12-06 20:40:47 +01:00
}
],
"title": "Total backup size",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
2022-12-06 21:49:33 +01:00
"uid": "${DS_PROMETHEUS}"
2022-12-06 20:40:47 +01:00
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 30,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"links": [],
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 15,
"x": 0,
"y": 30
},
"id": 41,
"links": [],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "8.5.0",
"targets": [
{
"datasource": {
"type": "prometheus",
2022-12-06 21:49:33 +01:00
"uid": "${DS_PROMETHEUS}"
2022-12-06 20:40:47 +01:00
},
"exemplar": true,
"expr": "sum by(client_hostname,client_username) (restic_backup_files_total)",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{client_hostname}}",
"refId": "A"
}
],
"title": "Total backup files",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
2022-12-06 21:49:33 +01:00
"uid": "${DS_PROMETHEUS}"
2022-12-06 20:40:47 +01:00
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 30,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"links": [],
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 9,
"x": 15,
"y": 30
},
"id": 30,
"links": [],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "8.5.0",
"targets": [
{
"exemplar": true,
"expr": "sum by(client_hostname,client_username) (restic_backup_snapshots_total)",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{client_hostname}}",
2022-12-06 21:49:33 +01:00
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
}
2022-12-06 20:40:47 +01:00
}
],
"title": "Total snapshot count",
"type": "timeseries"
}
],
"refresh": "",
"schemaVersion": 37,
"style": "dark",
"tags": [
"system"
],
"templating": {
"list": []
},
"time": {
"from": "now-7d",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "",
"title": "Restic Exporter",
"uid": "2JzZl3B7k",
"version": 25,
2022-12-06 20:40:47 +01:00
"weekStart": ""
}