diff --git a/examples/NPBackup v3 Grafana Dashboard.json b/examples/NPBackup v3 Grafana Dashboard.json index 72ffdb5..7487339 100644 --- a/examples/NPBackup v3 Grafana Dashboard.json +++ b/examples/NPBackup v3 Grafana Dashboard.json @@ -1,2859 +1,3107 @@ { - "__inputs": [ + "__inputs": [ + { + "name": "DS_MIMIR", + "label": "Mimir", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "11.2.2" + }, + { + "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": [ { - "name": "DS_PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" + "builtIn": 1, + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" } - ], - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "11.2.0" - }, - { - "type": "panel", - "id": "heatmap", - "name": "Heatmap", - "version": "" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" + ] + }, + "description": "Show status of restic backups done with NPBackup", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 11064, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "t3jzheN4z" }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ + "id": 10, + "panels": [], + "targets": [ { - "builtIn": 1, "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "t3jzheN4z" }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" + "refId": "A" } - ] + ], + "title": "NPBackup Success & Failures", + "type": "row" }, - "description": "Show status of restic backups done with NPBackup", - "editable": true, - "fiscalYearStartMonth": 0, - "gnetId": 11064, - "graphTooltip": 0, - "id": null, - "links": [], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": { - "type": "prometheus", - "uid": "t3jzheN4z" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 10, - "panels": [], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "t3jzheN4z" - }, - "refId": "A" - } - ], - "title": "NPBackup Success & Failures", - "type": "row" + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Number of succesful npbackup executions", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ + "description": "Number of succesful npbackup executions", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0 + }, { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + "color": "#299c46", + "value": 0 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d44a3a", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 0 - }, - { - "color": "#299c46", - "value": 0 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 1 - }, - "id": 5, - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ] }, - "showPercentChange": false, - "text": {}, - "textMode": "auto", - "wideLayout": true + "unit": "none" }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\"} == 0)[$__range:]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Successful Ops", - "type": "stat" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Number of failed npbackup executions", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 1 + }, + "id": 5, + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\"} == 0)[$__range:]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Successful Ops", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "Number of failed npbackup executions", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#299c46", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0.1 + }, { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + "color": "#d44a3a", + "value": 0.1 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 0.1 - }, - { - "color": "#d44a3a", - "value": 0.1 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 4, - "y": 1 - }, - "id": 4, - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ] }, - "showPercentChange": false, - "text": {}, - "textMode": "auto", - "wideLayout": true + "unit": "none" }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\"} > 0)[$__range:]))", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "", - "range": true, - "refId": "A" - } - ], - "title": "Failed Ops", - "type": "stat" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Number of failed npbackup executions", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 1 + }, + "id": 4, + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\"} > 0)[$__range:]))", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Failed Ops", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "Number of failed npbackup executions", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + "color": "#299c46", + "value": null } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 8, - "y": 1 - }, - "id": 32, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ] }, - "showPercentChange": false, - "text": {}, - "textMode": "auto", - "wideLayout": true + "unit": "none" }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=\"backup\"})[$__range:]))", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "", - "range": true, - "refId": "A" - } - ], - "title": "Backup ops", - "type": "stat" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Number of succesful npbackup executions", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 1 + }, + "id": 32, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=\"backup\"})[$__range:]))", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Backup ops", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "Number of succesful npbackup executions", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0 + }, { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + "color": "#299c46", + "value": 0 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d44a3a", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 0 - }, - { - "color": "#299c46", - "value": 0 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 12, - "y": 1 - }, - "id": 38, - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ] }, - "showPercentChange": false, - "text": {}, - "textMode": "auto", - "wideLayout": true + "unit": "none" }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "count(count_over_time((restic_backup_failure{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\"} == 0)[$__range:]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Successful backup", - "type": "stat" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Number of succesful npbackup executions", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 1 + }, + "id": 38, + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "expr": "count(count_over_time((restic_backup_failure{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\"} == 0)[$__range:]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Successful backup", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "Number of succesful npbackup executions", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + "color": "red", + "value": 1 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 18, - "y": 1 - }, - "id": 43, - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ] }, - "showPercentChange": false, - "text": {}, - "textMode": "auto", - "wideLayout": true + "unit": "none" }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "count(count_over_time((restic_backup_failure{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\"} > 0)[$__range:]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Failed backups", - "type": "stat" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Number of failed npbackup executions", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 1 + }, + "id": 43, + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "expr": "count(count_over_time((restic_backup_failure{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\"} > 0)[$__range:]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Failed backups", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "Number of failed npbackup executions", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + "color": "#299c46", + "value": null } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 4 - }, - "id": 33, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ] }, - "showPercentChange": false, - "text": {}, - "textMode": "auto", - "wideLayout": true + "unit": "none" }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=\"check\"})[$__range:]))", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "", - "range": true, - "refId": "A" - } - ], - "title": "Check ops", - "type": "stat" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Number of failed npbackup executions", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 4 + }, + "id": 33, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=\"check\"})[$__range:]))", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Check ops", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "Number of failed npbackup executions", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + "color": "#299c46", + "value": null } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 4, - "y": 4 - }, - "id": 34, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ] }, - "showPercentChange": false, - "text": {}, - "textMode": "auto", - "wideLayout": true + "unit": "none" }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=\"forget\"})[$__range:]))", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "", - "range": true, - "refId": "A" - } - ], - "title": "Forget ops", - "type": "stat" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Number of failed npbackup executions", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ + "gridPos": { + "h": 3, + "w": 3, + "x": 3, + "y": 4 + }, + "id": 34, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=\"forget\"})[$__range:]))", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Forget ops", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "Number of failed npbackup executions", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + "color": "#299c46", + "value": null } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 8, - "y": 4 - }, - "id": 35, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ] }, - "showPercentChange": false, - "text": {}, - "textMode": "auto", - "wideLayout": true + "unit": "none" }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=\"prune\"})[$__range:]))", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "", - "range": true, - "refId": "A" - } - ], - "title": "Prune ops", - "type": "stat" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Number of failed npbackup executions", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ + "gridPos": { + "h": 3, + "w": 3, + "x": 6, + "y": 4 + }, + "id": 35, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=\"prune\"})[$__range:]))", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Prune ops", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "Number of failed npbackup executions", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + "color": "#299c46", + "value": null } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 12, - "y": 4 - }, - "id": 40, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ] }, - "showPercentChange": false, - "text": {}, - "textMode": "auto", - "wideLayout": true + "unit": "none" }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=\"unlock\"})[$__range:]))", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "", - "range": true, - "refId": "A" - } - ], - "title": "Unlock ops", - "type": "stat" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Number of failed npbackup executions", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ + "gridPos": { + "h": 3, + "w": 3, + "x": 9, + "y": 4 + }, + "id": 40, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=\"unlock\"})[$__range:]))", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Unlock ops", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "Number of failed npbackup executions", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + "color": "#299c46", + "value": null } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 16, - "y": 4 - }, - "id": 41, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ] }, - "showPercentChange": false, - "text": {}, - "textMode": "auto", - "wideLayout": true + "unit": "none" }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=\"restore\"})[$__range:]))", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "", - "range": true, - "refId": "A" - } - ], - "title": "Restore ops", - "type": "stat" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Number of failed npbackup executions", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ + "gridPos": { + "h": 3, + "w": 3, + "x": 12, + "y": 4 + }, + "id": 41, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=\"restore\"})[$__range:]))", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Restore ops", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "Number of failed npbackup executions", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + "color": "#299c46", + "value": null } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 20, - "y": 4 - }, - "id": 42, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ] }, - "showPercentChange": false, - "text": {}, - "textMode": "auto", - "wideLayout": true + "unit": "none" }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=\"housekeeping\"})[$__range:]))", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "", - "range": true, - "refId": "A" - } - ], - "title": "Housekeeping ops", - "type": "stat" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Number of failed npbackup executions", - "fieldConfig": { - "defaults": { - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false + "gridPos": { + "h": 3, + "w": 3, + "x": 15, + "y": 4 + }, + "id": 42, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=\"housekeeping\"})[$__range:]))", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Housekeeping ops", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "Number of failed npbackup executions", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } }, - "scaleDistribution": { - "type": "linear" - } - }, - "fieldMinMax": false - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 12, - "x": 0, - "y": 7 - }, - "id": 37, - "maxDataPoints": 100, - "options": { - "calculate": false, - "calculation": { - "xBuckets": { - "mode": "size" - }, - "yBuckets": { - "mode": "size", - "scale": { - "type": "linear" - } + "type": "special" } - }, - "cellGap": 1, - "color": { - "exponent": 0.4, - "fill": "purple", - "mode": "opacity", - "reverse": false, - "scale": "exponential", - "scheme": "Oranges", - "steps": 128 - }, - "exemplars": { - "color": "rgba(255,0,255,0.7)" - }, - "filterValues": { - "le": 1e-9 - }, - "legend": { - "show": true - }, - "rowsFrame": { - "layout": "auto" - }, - "tooltip": { - "mode": "single", - "showColorScale": false, - "yHistogram": false - }, - "yAxis": { - "axisPlacement": "left", - "axisWidth": 100, - "reverse": false, - "unit": "" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum by (action) (count_over_time(npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\"}[$__range:]))", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{action}}", - "range": true, - "refId": "A" - } - ], - "title": "Action repartition", - "type": "heatmap" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ + ], + "thresholds": { + "mode": "absolute", + "steps": [ { - "options": { - "match": "null", - "result": { - "index": 0, - "text": "GOOD" - } - }, - "type": "special" + "color": "#299c46", + "value": null } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 6, - "x": 12, - "y": 7 - }, - "id": 44, - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ] }, - "showPercentChange": false, - "text": {}, - "textMode": "auto", - "wideLayout": true + "unit": "none" }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "count(deriv(count_over_time(group by (backup_job) (npbackup_exec_state{})[4d:])[1h:]) < 0)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "", - "range": true, - "refId": "A" - } - ], - "title": "No valid backup in 4 days", - "type": "stat" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Number of failed npbackup executions", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ + "gridPos": { + "h": 3, + "w": 3, + "x": 18, + "y": 4 + }, + "id": 46, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=\"upgrade\"})[$__range:]))", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Upgrade ops", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "Number of failed npbackup executions", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ { - "options": { - "match": "null", - "result": { - "index": 0, - "text": "GOOD" - } - }, - "type": "special" + "color": "#299c46", + "value": null } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 6, - "x": 18, - "y": 7 - }, - "id": 39, - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ] }, - "showPercentChange": false, - "text": {}, - "textMode": "auto", - "wideLayout": true + "unit": "none" }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "count(deriv(count_over_time(group by (backup_job) (npbackup_exec_state{})[30d:])[1h:]) < 0)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "", - "range": true, - "refId": "A" - } - ], - "title": "Not seen in 30 days", - "type": "stat" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "List of latest npbackup execution success", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "dark-red", - "mode": "thresholds" - }, - "custom": { - "align": "left", - "cellOptions": { - "mode": "basic", - "type": "color-background" - }, - "filterable": true, - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "green", - "value": 0 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 24, - "x": 0, - "y": 12 - }, - "id": 28, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false + "gridPos": { + "h": 3, + "w": 3, + "x": 21, + "y": 4 + }, + "id": 47, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count(count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=\"stats\"})[$__range:]))", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Stats ops", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "Number of failed npbackup executions", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "npversion" + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false } - ] + }, + "fieldMinMax": false, + "mappings": [] }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\"} == 0)[$__range:])", - "format": "table", - "instant": true, - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{ backup_job }}", - "refId": "A" - } + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 7 + }, + "id": 37, + "maxDataPoints": 100, + "options": { + "displayLabels": [ + "percent" ], - "title": "Successful runs", - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "Date", - "binary": { - "left": "timestamp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": true, + "values": [] + }, + "pieType": "donut", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (action) (count_over_time(npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\"}[$__range:]))", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{action}}", + "range": true, + "refId": "A" + } + ], + "title": "Action repartition", + "type": "piechart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - { - "id": "convertFieldType", - "options": { - "conversions": [ - { - "destinationType": "time", - "targetField": "Date" + "mappings": [ + { + "options": { + "match": "null", + "result": { + "index": 0, + "text": "GOOD" } - ], - "fields": {} - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Backup Date": false, - "Date": false, - "Time": true, - "Value": true, - "__tenant_id__": false, - "exported_instance": true, - "exported_job": true, - "instance": true, - "job": true, - "timestamp": true - }, - "includeByName": {}, - "indexByName": { - "Date": 0, - "Time": 1, - "Value": 7, - "__tenant_id__": 2, - "action": 8, - "backup_job": 3, - "backup_type": 9, - "group": 10, - "instance": 4, - "job": 5, - "npversion": 11, - "repo_name": 12, - "timestamp": 6 }, - "renameByName": {} + "type": "special" } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "List of latest npbackup execution success", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "dark-red", - "mode": "thresholds" - }, - "custom": { - "align": "left", - "cellOptions": { - "mode": "basic", - "type": "color-background" - }, - "filterable": true, - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 22 - }, - "id": 29, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Backup Date" - } - ] + "unit": "none" }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\"} > 0)[$__range:])", - "format": "table", - "instant": true, - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{ backup_job }}", - "refId": "A" - } - ], - "title": "Failures", - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "Date", - "binary": { - "left": "timestamp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 12, + "y": 7 + }, + "id": 44, + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count(deriv(count_over_time(group by (backup_job) (npbackup_exec_state{})[4d:])[1h:]) < 0)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "No valid backup in 4 days", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "Number of failed npbackup executions", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - { - "id": "convertFieldType", - "options": { - "conversions": [ - { - "destinationType": "time", - "targetField": "Date" + "mappings": [ + { + "options": { + "match": "null", + "result": { + "index": 0, + "text": "GOOD" } - ], - "fields": {} + }, + "type": "special" } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] }, - { - "id": "organize", - "options": { - "excludeByName": { - "Backup Date": false, - "Time": true, - "Value": true, - "__tenant_id__": false, - "exported_instance": true, - "exported_job": true, - "instance": true, - "job": true, - "timestamp": true - }, - "includeByName": {}, - "indexByName": { - "Date": 0, - "Time": 1, - "Value": 7, - "__tenant_id__": 2, - "action": 8, - "backup_job": 3, - "backup_type": 9, - "group": 10, - "instance": 4, - "job": 5, - "npversion": 11, - "repo_name": 12, - "timestamp": 6 + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 18, + "y": 7 + }, + "id": 39, + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count(deriv(count_over_time(group by (backup_job) (npbackup_exec_state{})[30d:])[1h:]) < 0)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Not seen in 30 days", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "List of latest npbackup execution success", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "dark-red", + "mode": "thresholds" + }, + "custom": { + "align": "left", + "cellOptions": { + "mode": "basic", + "type": "color-background" + }, + "filterable": true, + "inspect": false + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, - "renameByName": {} - } - } - ], - "type": "table" + { + "color": "green", + "value": 0 + } + ] + }, + "unit": "none" + }, + "overrides": [] }, - { - "collapsed": false, - "datasource": { - "type": "prometheus", - "uid": "t3jzheN4z" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 31 - }, - "id": 19, - "panels": [], - "repeat": "config", - "repeatDirection": "h", - "targets": [ + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 28, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ { - "datasource": { - "type": "prometheus", - "uid": "t3jzheN4z" - }, - "refId": "A" + "desc": true, + "displayName": "npversion" } - ], - "title": "Backup operations", - "type": "row" + ] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "dark-red", - "mode": "thresholds" - }, - "custom": { - "align": "left", - "cellOptions": { - "mode": "basic", - "type": "color-background" - }, - "filterable": true, - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 32 - }, - "id": 30, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": false, - "fields": "", - "reducer": [ - "sum" + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\"} == 0)[$__range:])", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ backup_job }}", + "refId": "A" + } + ], + "title": "Successful runs", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Date", + "binary": { + "left": "timestamp", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } + }, + { + "id": "convertFieldType", + "options": { + "conversions": [ + { + "destinationType": "time", + "targetField": "Date" + } ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Backup Date" - } - ] + "fields": {} + } }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "count_over_time(group by (backup_job) (npbackup_exec_state{action=\"backup\"})[4d:]) < 1", - "format": "table", - "instant": true, - "interval": "", - "intervalFactor": 2, - "legendFormat": "__auto", - "refId": "A" + { + "id": "organize", + "options": { + "excludeByName": { + "Backup Date": false, + "Date": false, + "Time": true, + "Value": true, + "__tenant_id__": false, + "exported_instance": true, + "exported_job": true, + "instance": true, + "job": true, + "timestamp": true + }, + "includeByName": {}, + "indexByName": { + "Date": 0, + "Time": 1, + "Value": 7, + "__tenant_id__": 2, + "action": 8, + "backup_job": 3, + "backup_type": 9, + "group": 10, + "instance": 4, + "job": 5, + "npversion": 11, + "repo_name": 12, + "timestamp": 6 + }, + "renameByName": {} } - ], - "title": "No Valid backup in 4 days", - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "Backup Date", - "binary": { - "left": "timestamp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "convertFieldType", - "options": { - "conversions": [ - { - "destinationType": "time", - "targetField": "Backup Date" - } - ], - "fields": {} - } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "List of latest npbackup execution success", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "dark-red", + "mode": "thresholds" + }, + "custom": { + "align": "left", + "cellOptions": { + "mode": "basic", + "type": "color-background" + }, + "filterable": true, + "inspect": false + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + } + ] }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 22 + }, + "id": 29, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ { - "id": "organize", - "options": { - "excludeByName": { - "Backup Date": false, - "Time": true, - "Value": true, - "__tenant_id__": false, - "exported_instance": true, - "exported_job": true, - "instance": true, - "job": true, - "timestamp": true - }, - "indexByName": { - "Backup Date": 0, - "Time": 1, - "Value": 9, - "__tenant_id__": 2, - "backup_job": 3, - "exported_instance": 4, - "exported_job": 5, - "instance": 6, - "job": 7, - "timestamp": 8 - }, - "renameByName": {} - } + "desc": true, + "displayName": "Backup Date" } - ], - "type": "table" + ] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "dark-red", - "mode": "thresholds" - }, - "custom": { - "align": "left", - "cellOptions": { - "mode": "basic", - "type": "color-background" - }, - "filterable": true, - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 39 - }, - "id": 31, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": false, - "fields": "", - "reducer": [ - "sum" + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count_over_time((npbackup_exec_state{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\"} > 0)[$__range:])", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ backup_job }}", + "refId": "A" + } + ], + "title": "Failures", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Date", + "binary": { + "left": "timestamp", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } + }, + { + "id": "convertFieldType", + "options": { + "conversions": [ + { + "destinationType": "time", + "targetField": "Date" + } ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Backup Date" - } - ] + "fields": {} + } }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "deriv(count_over_time(group by (backup_job) (npbackup_exec_state{})[30d:])[1h:]) < 0", - "format": "table", - "instant": true, - "interval": "", - "intervalFactor": 2, - "legendFormat": "__auto", - "refId": "A" + { + "id": "organize", + "options": { + "excludeByName": { + "Backup Date": false, + "Time": true, + "Value": true, + "__tenant_id__": false, + "exported_instance": true, + "exported_job": true, + "instance": true, + "job": true, + "timestamp": true + }, + "includeByName": {}, + "indexByName": { + "Date": 0, + "Time": 1, + "Value": 7, + "__tenant_id__": 2, + "action": 8, + "backup_job": 3, + "backup_type": 9, + "group": 10, + "instance": 4, + "job": 5, + "npversion": 11, + "repo_name": 12, + "timestamp": 6 + }, + "renameByName": {} } - ], - "title": "Not seen in 30 days", - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "Backup Date", - "binary": { - "left": "timestamp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } + } + ], + "type": "table" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "t3jzheN4z" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 31 + }, + "id": 19, + "panels": [], + "repeat": "config", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "t3jzheN4z" }, - { - "id": "convertFieldType", - "options": { - "conversions": [ - { - "destinationType": "time", - "targetField": "Backup Date" - } - ], - "fields": {} - } + "refId": "A" + } + ], + "title": "Backup operations", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "dark-red", + "mode": "thresholds" + }, + "custom": { + "align": "left", + "cellOptions": { + "mode": "basic", + "type": "color-background" + }, + "filterable": true, + "inspect": false + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + } + ] }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 32 + }, + "id": 30, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ { - "id": "organize", - "options": { - "excludeByName": { - "Backup Date": false, - "Time": true, - "Value": true, - "__tenant_id__": false, - "exported_instance": true, - "exported_job": true, - "instance": true, - "job": true, - "timestamp": true - }, - "indexByName": { - "Backup Date": 0, - "Time": 1, - "Value": 9, - "__tenant_id__": 2, - "backup_job": 3, - "exported_instance": 4, - "exported_job": 5, - "instance": 6, - "job": 7, - "timestamp": 8 - }, - "renameByName": {} - } + "desc": true, + "displayName": "Backup Date" } - ], - "type": "table" + ] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count_over_time(group by (backup_job) (npbackup_exec_state{action=\"backup\"})[4d:]) < 1", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "__auto", + "refId": "A" + } + ], + "title": "No Valid backup in 4 days", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Backup Date", + "binary": { + "left": "timestamp", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "bars", - "fillOpacity": 100, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" + { + "id": "convertFieldType", + "options": { + "conversions": [ + { + "destinationType": "time", + "targetField": "Backup Date" } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 0, - "y": 46 - }, - "id": 24, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + ], + "fields": {} } }, - "pluginVersion": "10.4.2", - "targets": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Backup Date": false, + "Time": true, + "Value": true, + "__tenant_id__": false, + "exported_instance": true, + "exported_job": true, + "instance": true, + "job": true, + "timestamp": true + }, + "indexByName": { + "Backup Date": 0, + "Time": 1, + "Value": 9, + "__tenant_id__": 2, + "backup_job": 3, + "exported_instance": 4, + "exported_job": 5, + "instance": 6, + "job": 7, + "timestamp": 8 + }, + "renameByName": {} + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "dark-red", + "mode": "thresholds" + }, + "custom": { + "align": "left", + "cellOptions": { + "mode": "basic", + "type": "color-background" + }, + "filterable": true, + "inspect": false + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 39 + }, + "id": 31, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "restic_total_duration_seconds{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\"}", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{backup_job}} - {{backup_type}}", - "range": true, - "refId": "A" + "desc": true, + "displayName": "Backup Date" } - ], - "title": "Durations", - "type": "timeseries" + ] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "pluginVersion": "11.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "deriv(count_over_time(group by (backup_job) (npbackup_exec_state{})[30d:])[1h:]) < 0", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "__auto", + "refId": "A" + } + ], + "title": "Not seen in 30 days", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Backup Date", + "binary": { + "left": "timestamp", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "bars", - "fillOpacity": 100, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + { + "id": "convertFieldType", + "options": { + "conversions": [ + { + "destinationType": "time", + "targetField": "Backup Date" + } + ], + "fields": {} + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Backup Date": false, + "Time": true, + "Value": true, + "__tenant_id__": false, + "exported_instance": true, + "exported_job": true, + "instance": true, + "job": true, + "timestamp": true + }, + "indexByName": { + "Backup Date": 0, + "Time": 1, + "Value": 9, + "__tenant_id__": 2, + "backup_job": 3, + "exported_instance": 4, + "exported_job": 5, + "instance": 6, + "job": 7, + "timestamp": 8 + }, + "renameByName": {} + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 46 + }, + "id": 24, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "expr": "restic_total_duration_seconds{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{backup_job}} - {{backup_type}}", + "range": true, + "refId": "A" + } + ], + "title": "Durations", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, - "thresholdsStyle": { - "mode": "off" + { + "color": "red", + "value": 80 } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 8, - "y": 46 - }, - "id": 22, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + ] + }, + "unit": "decbytes" }, - "pluginVersion": "10.4.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "restic_snasphot_size_bytes{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\"}", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{ backup_job }} {{backup_type}}", - "range": true, - "refId": "A" - } - ], - "title": "Snapshot Size in restore mode", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "bars", - "fillOpacity": 100, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 46 + }, + "id": 22, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "expr": "restic_snasphot_size_bytes{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\"}", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ backup_job }} {{backup_type}}", + "range": true, + "refId": "A" + } + ], + "title": "Snapshot Size in restore mode", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, - "thresholdsStyle": { - "mode": "off" + { + "color": "red", + "value": 80 } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 16, - "y": 46 - }, - "id": 26, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + ] + }, + "unit": "decbytes" }, - "pluginVersion": "10.4.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "restic_data_added{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{ backup_job }} {{backup_type}}", - "range": true, - "refId": "A" - } - ], - "title": "Added bytes", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 54 + }, + "id": 26, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "expr": "restic_data_added{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ backup_job }} {{backup_type}}", + "range": true, + "refId": "A" + } + ], + "title": "Added bytes", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, - "thresholdsStyle": { - "mode": "off" + { + "color": "red", + "value": 80 } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 53 - }, - "id": 23, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.4.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "sum(restic_files{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\",state=\"changed\"}) by (backup_job)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "changed {{ backup_job }}", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "sum(restic_repo_files{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\",state=\"new\"}) by (backup_job)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "new - {{ backup_job }}", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "sum(restic_repo_files{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\",state=\"unmodified\"}) by (backup_job)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "unmodified - {{ backup_job }}", - "range": true, - "refId": "C" + ] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "sum(restic_repo_files{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\",state=\"total\"}) by (backup_job)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "processed - {{ backup_job }}", - "range": true, - "refId": "D" - } - ], - "title": "Number of files in repo", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "unit": "decbytes" }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 54 + }, + "id": 45, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "expr": "restic_data_stored{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ backup_job }} {{backup_type}}", + "range": true, + "refId": "A" + } + ], + "title": "Stored bytes", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, - "thresholdsStyle": { - "mode": "off" + { + "color": "red", + "value": 80 } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 53 - }, - "id": 27, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + ] + }, + "unit": "short" }, - "pluginVersion": "10.4.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "sum(restic_dirs{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\",state=\"changed\"}) by (backup_job)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "changed - {{ backup_job }}", - "range": true, - "refId": "A" + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 61 + }, + "id": 23, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "sum(restic_repo_dirs{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\",state=\"new\"}) by (backup_job)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "new - {{ backup_job }}", - "range": true, - "refId": "B" + "editorMode": "code", + "expr": "sum(restic_files{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\",state=\"changed\"}) by (backup_job)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "changed {{ backup_job }}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "sum(restic_repo_dirs{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\",state=\"unmodified\"}) by (backup_job)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "unmodified - {{ backup_job }}", - "range": true, - "refId": "C" - } - ], - "title": "Number of directories", - "type": "timeseries" - }, - { - "collapsed": false, - "datasource": { - "type": "prometheus", - "uid": "t3jzheN4z" + "editorMode": "code", + "expr": "sum(restic_repo_files{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\",state=\"new\"}) by (backup_job)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "new - {{ backup_job }}", + "range": true, + "refId": "B" }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 60 + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "expr": "sum(restic_repo_files{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\",state=\"unmodified\"}) by (backup_job)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "unmodified - {{ backup_job }}", + "range": true, + "refId": "C" }, - "id": 11, - "panels": [], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "t3jzheN4z" - }, - "refId": "A" - } - ], - "title": "Global Tenant stats", - "type": "row" + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "expr": "sum(restic_repo_files{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\",state=\"total\"}) by (backup_job)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "processed - {{ backup_job }}", + "range": true, + "refId": "D" + } + ], + "title": "Number of files in repo", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, - "thresholdsStyle": { - "mode": "off" + { + "color": "red", + "value": 80 } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 61 - }, - "id": 17, - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true + ] }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + "unit": "short" }, - "pluginVersion": "9.2.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "restic_total_duration_seconds{__tenant_id__=~\"$tenant\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{ backup_job }}", - "range": true, - "refId": "A" - } - ], - "title": "Total Duration", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 61 - }, - "id": 25, - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 61 + }, + "id": 27, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + "editorMode": "code", + "expr": "sum(restic_dirs{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\",state=\"changed\"}) by (backup_job)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "changed - {{ backup_job }}", + "range": true, + "refId": "A" }, - "pluginVersion": "10.4.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "restic_data_added{__tenant_id__=~\"$tenant\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{ backup_job }}", - "range": true, - "refId": "A" - } - ], - "title": "Processed size", - "type": "timeseries" - } - ], - "refresh": "", - "schemaVersion": 39, - "tags": [ - "backups", - "restic" - ], - "templating": { - "list": [ { - "current": {}, "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "definition": "label_values(restic_backup_failure,__tenant_id__)", - "hide": 0, - "includeAll": true, - "multi": true, - "name": "tenant", - "options": [], - "query": { - "qryType": 1, - "query": "label_values(restic_backup_failure,__tenant_id__)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "expr": "sum(restic_repo_dirs{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\",state=\"new\"}) by (backup_job)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "new - {{ backup_job }}", + "range": true, + "refId": "B" }, { - "current": {}, "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "definition": "label_values(restic_backup_failure{__tenant_id__=~\"$tenant\"},backup_job)", - "hide": 0, - "includeAll": true, - "multi": true, - "name": "backup_job", - "options": [], - "query": { - "qryType": 1, - "query": "label_values(restic_backup_failure{__tenant_id__=~\"$tenant\"},backup_job)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "expr": "sum(restic_repo_dirs{backup_job=~\"$backup_job\",__tenant_id__=~\"$tenant\",action=~\"$action\",state=\"unmodified\"}) by (backup_job)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "unmodified - {{ backup_job }}", + "range": true, + "refId": "C" + } + ], + "title": "Number of directories", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "t3jzheN4z" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 68 + }, + "id": 11, + "panels": [], + "targets": [ { - "current": {}, "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "definition": "label_values(npbackup_exec_state,action)", - "hide": 0, - "includeAll": true, - "label": "action", - "multi": true, - "name": "action", - "options": [], - "query": { - "qryType": 1, - "query": "label_values(npbackup_exec_state,action)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" + "uid": "t3jzheN4z" + }, + "refId": "A" + } + ], + "title": "Global Tenant stats", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 69 + }, + "id": 17, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.3", + "targets": [ { - "current": {}, "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "definition": "label_values(npbackup_exec_state,action)", - "hide": 0, - "includeAll": true, - "multi": true, - "name": "Filters", - "options": [], - "query": { - "qryType": 1, - "query": "label_values(npbackup_exec_state,action)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "expr": "restic_total_duration_seconds{__tenant_id__=~\"$tenant\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ backup_job }}", + "range": true, + "refId": "A" } - ] - }, - "time": { - "from": "now-15h", - "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" - ] + "title": "Total Duration", + "type": "timeseries" }, - "timezone": "", - "title": "NPBackup v3 Bakcup Statistics", - "uid": "iNGJDIgRz", - "version": 19, - "weekStart": "" - } \ No newline at end of file + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 69 + }, + "id": 25, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "editorMode": "code", + "expr": "restic_data_added{__tenant_id__=~\"$tenant\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ backup_job }}", + "range": true, + "refId": "A" + } + ], + "title": "Processed size", + "type": "timeseries" + } + ], + "refresh": "", + "schemaVersion": 39, + "tags": [ + "backups", + "restic" + ], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "definition": "label_values(restic_backup_failure,__tenant_id__)", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "tenant", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(restic_backup_failure,__tenant_id__)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "definition": "label_values(restic_backup_failure{__tenant_id__=~\"$tenant\"},backup_job)", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "backup_job", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(restic_backup_failure{__tenant_id__=~\"$tenant\"},backup_job)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "definition": "label_values(npbackup_exec_state,action)", + "hide": 0, + "includeAll": true, + "label": "action", + "multi": true, + "name": "action", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(npbackup_exec_state,action)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_MIMIR}" + }, + "definition": "label_values(npbackup_exec_state,action)", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "Filters", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(npbackup_exec_state,action)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-15h", + "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": "Sauvegardes NPBackup v3 20241104", + "uid": "XNGJDIgRx", + "version": 5, + "weekStart": "" +} \ No newline at end of file diff --git a/examples/kvm-qemu/cube-backup.sh b/examples/kvm-qemu/cube-backup.sh index d505783..b10fa6d 100644 --- a/examples/kvm-qemu/cube-backup.sh +++ b/examples/kvm-qemu/cube-backup.sh @@ -1,16 +1,7 @@ #!/usr/bin/env bash -# Script to create KVM snapshots using libvirt -# Have npbackup backup the qcow2 file + the xml file of the VM -# then have the script erase the snapshot +# Script ver 2024110401 -# Script ver 2024102902 for NPBackup V3 - - -#TODO: remove xml modding after we tested latest snapshot remover -#TODO: support modding XML file from offline domains to remove snapshot and replace by backing file after qemu-img commit -#TODO: npbackup doesn't know if snapshot creation failed -# - see if including $vm.SNAPSHOT_FAILED file helps #TODO: blockcommit removes current snapshots, even if not done by cube # - it's interesting to make housekeeping, let's make this an option @@ -28,6 +19,7 @@ BACKUP_FILE_LIST="${ROOT_DIR}/npbackup_cube_file.lst" NPBACKUP_EXECUTABLE="/usr/local/bin/npbackup-cli/npbackup-cli" NPBACKUP_CONF_FILE_TEMPLATE="${ROOT_DIR}/npbackup-cube.conf.template" NPBACKUP_CONF_FILE="${ROOT_DIR}/npbackup-cube.conf" +SNAPSHOT_FAILED_FILE="${ROOT_DIR}/SNAPSHOT_FAILED" # Superseed tenants if this is set, else it is extracted from machine name, eg machine.tenant.something TENANT_OVERRIDE=netperfect @@ -78,7 +70,7 @@ function create_snapshot { echo "${xml}" > "${ROOT_DIR}/${vm}.xml" echo "${ROOT_DIR}/${vm}.xml" >> "$BACKUP_FILE_LIST" - # Get current disk paths + # Get current disk paths to include into snapshot for disk_path in $(virsh domblklist $vm --details | grep file | grep disk | awk '{print $4}'); do if [ -f "${disk_path}" ]; then # Add current disk path and all necessary backing files for current disk to backup file list @@ -92,13 +84,14 @@ function create_snapshot { fi done log "Creating snapshot for $vm" + rm -f "${SNAPSHOT_FAILED_FILE}" > /dev/null 2>&1 virsh snapshot-create-as $vm --name "${backup_identifier}" --description "${backup_identifier}" --atomic --quiesce --disk-only >> "$LOG_FILE" 2>&1 if [ $? -ne 0 ]; then - log "Failed to create snapshot for $vm with quiesce option. Trying without quiesce." + log "Failed to create snapshot for $vm with quiesce option. Trying without quiesce. Data will be nonconsistent" virsh snapshot-create-as $vm --name "${backup_identifier}" --description "${backup_identifier}.noquiesce" --atomic --disk-only >> "$LOG_FILE" 2>&1 if [ $? -ne 0 ]; then - log "Failed to create snapshot for $vm without quiesce option. Cannot backup that file." "ERROR" - echo "$vm.SNAPSHOT_FAILED" >> "$BACKUP_FILE_LIST" + log "Failed to create snapshot for $vm without quiesce option. Backup will be done, but data will be nonconsistent and perhaps unusable." "ERROR" + echo "$vm" > "${SNAPSHOT_FAILED_FILE}" else CURRENT_VM_SNAPSHOT="${vm}" fi @@ -176,7 +169,7 @@ function remove_snapshot { virsh blockcommit $vm "$disk_name" --active --pivot --verbose --delete >> "$LOG_FILE" 2>&1 else log "Trying to offline blockcommit for $disk_name: $disk_path" - # -p = progress, we actually don't need that here + # -p = progress, we actually don't need that hee qemu-img commit -dp "$disk_path" >> "$LOG_FILE" 2>&1 log "Note that you will need to modify the XML manually" @@ -218,8 +211,6 @@ function remove_snapshot { else log "Will not delete metadata from snapshot ${backup_identifier} for $vm" fi - log "Delete former XML file" - rm -f "${ROOT_DIR}/${vm}.xml" } @@ -238,6 +229,9 @@ function run { if [ "${CURRENT_VM_SNAPSHOT}" != "" ]; then remove_snapshot "${CURRENT_VM_SNAPSHOT}" "${BACKUP_IDENTIFIER}" fi + log "Delete former XML file" + rm -f "${ROOT_DIR}/${vm}.xml" > /dev/null 2>&1 + rm -f "${SNAPSHOT_FAILED_FILE}" > /dev/null 2>&1 done } diff --git a/examples/kvm-qemu/npbackup.cube.template b/examples/kvm-qemu/npbackup.cube.template index bbd527c..676be27 100644 --- a/examples/kvm-qemu/npbackup.cube.template +++ b/examples/kvm-qemu/npbackup.cube.template @@ -39,8 +39,9 @@ groups: exclude_files_larger_than: additional_parameters: additional_backup_only_parameters: - minimum_backup_size_error: 10 MiB - pre_exec_commands: [] + minimum_backup_size_error: 10 GiB + pre_exec_commands: + - '[ -f /opt/cube/SNAPSHOT_FAILED ] && echo "Snapshot failed for $(cat /opt/cube/SNAPSHOT_FAILED)" && exit 1' pre_exec_per_command_timeout: 3600 pre_exec_failure_is_fatal: false post_exec_commands: [] diff --git a/npbackup/__main__.py b/npbackup/__main__.py index a83d181..e9b5881 100644 --- a/npbackup/__main__.py +++ b/npbackup/__main__.py @@ -148,7 +148,7 @@ def cli_interface(): parser.add_argument( "--full-check", action="store_true", - help="Deprecated in favor or '--check full'. Full check repository (read all data)", + help="Deprecated in favor of '--check full'. Full check repository (read all data)", ) parser.add_argument( "--check",