{ "__inputs": [ { "name": "DS_INFLUXDB", "label": "InfluxDB", "description": "", "type": "datasource", "pluginId": "influxdb", "pluginName": "InfluxDB" } ], "__elements": {}, "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "11.1.3" }, { "type": "datasource", "id": "influxdb", "name": "InfluxDB", "version": "1.0.0" }, { "type": "panel", "id": "stat", "name": "Stat", "version": "" } ], "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, "links": [], "liveNow": false, "panels": [ { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 2, "panels": [], "repeat": "hostname", "repeatDirection": "h", "title": "${hostname}", "type": "row" }, { "datasource": { "type": "influxdb", "uid": "${DS_INFLUXDB}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "green", "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "red", "value": null }, { "color": "orange", "value": -604800 }, { "color": "yellow", "value": -172800 }, { "color": "green", "value": -86400 } ] }, "unit": "dtdurations" }, "overrides": [] }, "gridPos": { "h": 7, "w": 6, "x": 0, "y": 1 }, "id": 1, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.1.3", "targets": [ { "datasource": { "type": "influxdb", "uid": "${DS_INFLUXDB}" }, "query": "from(bucket: \"borg\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"info\")\n |> filter(fn: (r) => r[\"hostname\"] == \"${hostname}\")\n |> filter(fn: (r) => r[\"_field\"] == \"name\")\n |> last()\n |> map(fn: (r) => ({r with _value: (int(v: r[\"_time\"]) - int(v: now())) / 1000000000}))\n |> yield(name: \"last\")", "refId": "A" } ], "title": "Last Backup", "transparent": true, "type": "stat" }, { "datasource": { "type": "influxdb", "uid": "${DS_INFLUXDB}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 109951162778 }, { "color": "orange", "value": 549755813888 }, { "color": "red", "value": 879609302231 } ] }, "unit": "bytes" }, "overrides": [] }, "gridPos": { "h": 7, "w": 10, "x": 6, "y": 1 }, "id": 3, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.1.3", "targets": [ { "datasource": { "type": "influxdb", "uid": "${DS_INFLUXDB}" }, "query": "from(bucket: \"borg\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"info\")\n |> filter(fn: (r) => r[\"hostname\"] == \"${hostname}\")\n |> filter(fn: (r) => r[\"_field\"] == \"original_size\" or r[\"_field\"] == \"deduplicated_size\" or r[\"_field\"] == \"compressed_size\")\n |> drop(columns: [\"hostname\", \"repo_location\"])\n |> yield(name: \"last\")", "refId": "A" } ], "title": "Size", "transparent": true, "type": "stat" }, { "datasource": { "type": "influxdb", "uid": "${DS_INFLUXDB}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 300 }, { "color": "orange", "value": 600 }, { "color": "red", "value": 1800 } ] }, "unit": "s" }, "overrides": [] }, "gridPos": { "h": 7, "w": 4, "x": 16, "y": 1 }, "id": 4, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.1.3", "targets": [ { "datasource": { "type": "influxdb", "uid": "${DS_INFLUXDB}" }, "query": "from(bucket: \"borg\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"info\")\n |> filter(fn: (r) => r[\"hostname\"] == \"${hostname}\")\n |> filter(fn: (r) => r[\"_field\"] == \"duration\")\n |> drop(columns: [\"hostname\", \"repo_location\"])\n |> yield(name: \"last\")", "refId": "A" } ], "title": "Duration", "transparent": true, "type": "stat" }, { "datasource": { "type": "influxdb", "uid": "${DS_INFLUXDB}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 7, "w": 4, "x": 20, "y": 1 }, "id": 9, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.1.3", "targets": [ { "datasource": { "type": "influxdb", "uid": "${DS_INFLUXDB}" }, "query": "from(bucket: \"borg\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"info\")\n |> filter(fn: (r) => r[\"hostname\"] == \"${hostname}\")\n |> filter(fn: (r) => r[\"_field\"] == \"nfiles\")\n |> drop(columns: [\"hostname\", \"repo_location\"])\n |> yield(name: \"last\")", "refId": "A" } ], "title": "File count", "transparent": true, "type": "stat" } ], "refresh": "", "schemaVersion": 39, "tags": [], "templating": { "list": [ { "current": {}, "datasource": { "type": "influxdb", "uid": "${DS_INFLUXDB}" }, "definition": "import \"influxdata/influxdb/schema\"\nschema.tagValues(\n bucket: \"borg\",\n tag: \"hostname\"\n)", "hide": 0, "includeAll": false, "label": "Hostname", "multi": true, "name": "hostname", "options": [], "query": "import \"influxdata/influxdb/schema\"\nschema.tagValues(\n bucket: \"borg\",\n tag: \"hostname\"\n)", "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" } ] }, "time": { "from": "now-90d", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Backups", "uid": "f75cc020-f0e2-4877-a276-b4aafe9c4a8b", "version": 6, "weekStart": "" }