From 9a28b4833be4263d8cf6d7fdfb93d5641c5ab47e Mon Sep 17 00:00:00 2001 From: sberk42 Date: Wed, 29 Jul 2020 17:43:13 +0200 Subject: [PATCH] Revert "new Grafana version and adjust to personal needs" This reverts commit 2bf2efe0687ae7e43eb83364e629c7d369f3fdd8. --- grafana/Dashboard.json | 1672 ++++++++++++++++++++-------------------- grafana/README.md | 6 +- 2 files changed, 835 insertions(+), 843 deletions(-) diff --git a/grafana/Dashboard.json b/grafana/Dashboard.json index 020f23c..a2072cb 100644 --- a/grafana/Dashboard.json +++ b/grafana/Dashboard.json @@ -20,7 +20,7 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "7.1.0" + "version": "6.7.4" }, { "type": "panel", @@ -42,20 +42,15 @@ }, { "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table-old", - "name": "Table (old)", + "id": "table", + "name": "Table", "version": "" } ], "annotations": { "list": [ { + "$$hashKey": "object:41", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -66,83 +61,66 @@ } ] }, - "description": "Monitor FRITZ!Box routers using prometheus and fritzbox_exporter", + "description": "Monitor FRITZ!Box routers.", "editable": true, - "gnetId": 12579, + "gnetId": 713, "graphTooltip": 2, "id": null, "links": [], "panels": [ { "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "#1f78c1" + ], "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "Disconnected", - "type": 1, - "value": "0" - }, - { - "id": 2, - "op": "=", - "text": "Connected", - "type": 1, - "value": "1" - } - ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 1 - }, - { - "color": "#1f78c1", - "value": 1 - } - ] - }, - "unit": "none" - }, - "overrides": [] + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true }, "id": 10, "interval": null, "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 }, - "textMode": "auto" + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false }, - "pluginVersion": "7.1.0", + "tableColumn": "", "targets": [ { "dsType": "prometheus", @@ -186,59 +164,46 @@ "target": "" } ], + "thresholds": "1,1", "title": "WAN Connection Status", - "type": "stat" + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + }, + { + "op": "=", + "text": "Disconnected", + "value": "0" + }, + { + "op": "=", + "text": "Connected", + "value": "1" + } + ], + "valueName": "current" }, { "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "#1f78c1" + ], "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "Disconnected", - "type": 1, - "value": "0" - }, - { - "id": 2, - "op": "=", - "text": "Connected", - "type": 1, - "value": "1" - } - ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 1 - }, - { - "color": "#1f78c1", - "value": 1 - } - ] - }, - "unit": "none" - }, - "overrides": [] + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true }, "gridPos": { "h": 3, @@ -249,22 +214,38 @@ "id": 9, "interval": null, "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 }, - "textMode": "auto" + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false }, - "pluginVersion": "7.1.0", + "tableColumn": "", "targets": [ { "dsType": "prometheus", @@ -308,54 +289,34 @@ "target": "" } ], + "thresholds": "1,1", "title": "DSL Link Status", - "type": "stat" + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + }, + { + "op": "=", + "text": "Disconnected", + "value": "0" + }, + { + "op": "=", + "text": "Connected", + "value": "1" + } + ], + "valueName": "current" }, { "cacheTimeout": null, "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "decimals": 0, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 7000000, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 2500000 - }, - { - "color": "red", - "value": 5000000 - } - ] - }, - "unit": "Bps" - }, - "overrides": [] - }, "gridPos": { - "h": 5, + "h": 6, "w": 6, "x": 12, "y": 0 @@ -363,23 +324,58 @@ "id": 11, "links": [], "options": { - "orientation": "horizontal", - "reduceOptions": { + "fieldOptions": { "calcs": [ - "last" + "lastNotNull" ], - "fields": "", + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "max": 116000000, + "min": 0, + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 50000000 + }, + { + "color": "red", + "value": 100000000 + } + ] + }, + "unit": "bps" + }, + "overrides": [], "values": false }, + "orientation": "horizontal", "showThresholdLabels": false, "showThresholdMarkers": true }, - "pluginVersion": "7.1.0", + "pluginVersion": "6.7.4", "targets": [ { "dsType": "prometheus", "expr": "gateway_wan_bytes_receive_rate", - "format": "table", "groupBy": [ { "params": [ @@ -388,7 +384,6 @@ "type": "time" } ], - "instant": false, "interval": "", "legendFormat": "", "measurement": "fritzbox_value", @@ -426,52 +421,8 @@ { "cacheTimeout": null, "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "decimals": 1, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 1100000, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - }, - { - "color": "green", - "value": 250000 - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 500000 - }, - { - "color": "#e24d42", - "value": 1000000 - } - ] - }, - "unit": "Bps" - }, - "overrides": [] - }, "gridPos": { - "h": 5, + "h": 6, "w": 6, "x": 18, "y": 0 @@ -479,23 +430,62 @@ "id": 12, "links": [], "options": { - "orientation": "horizontal", - "reduceOptions": { + "fieldOptions": { "calcs": [ - "last" + "lastNotNull" ], - "fields": "", + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "max": 40000000, + "min": 0, + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + }, + { + "color": "green", + "value": 5000000 + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 10000000 + }, + { + "color": "#e24d42", + "value": 30000000 + } + ] + }, + "unit": "bps" + }, + "overrides": [], "values": false }, + "orientation": "horizontal", "showThresholdLabels": false, "showThresholdMarkers": true }, - "pluginVersion": "7.1.0", + "pluginVersion": "6.7.4", "targets": [ { "dsType": "prometheus", "expr": "gateway_wan_bytes_send_rate", - "format": "table", "groupBy": [ { "params": [ @@ -540,51 +530,22 @@ }, { "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 1, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "Disconnected", - "type": 1, - "value": "0" - }, - { - "id": 2, - "op": "=", - "text": "Connected", - "type": 1, - "value": "1" - } - ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(50, 172, 45, 0.97)", - "value": 1 - } - ] - }, - "unit": "dtdurations" - }, - "overrides": [] + "decimals": 1, + "format": "dtdurations", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true }, "gridPos": { "h": 3, @@ -595,22 +556,38 @@ "id": 21, "interval": null, "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 }, - "textMode": "auto" + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false }, - "pluginVersion": "7.1.0", + "tableColumn": "", "targets": [ { "dsType": "prometheus", @@ -654,46 +631,47 @@ "target": "" } ], + "thresholds": "1,1", "title": "Fritzbox Uptime", - "type": "stat" + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + }, + { + "op": "=", + "text": "Disconnected", + "value": "0" + }, + { + "op": "=", + "text": "Connected", + "value": "1" + } + ], + "valueName": "current" }, { "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 1, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 1 - }, - { - "color": "rgba(50, 172, 45, 0.97)", - "value": 1 - } - ] - }, - "unit": "dtdurations" - }, - "overrides": [] + "decimals": 1, + "format": "dtdurations", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true }, "gridPos": { "h": 3, @@ -704,22 +682,38 @@ "id": 13, "interval": null, "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 }, - "textMode": "auto" + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false }, - "pluginVersion": "7.1.0", + "tableColumn": "", "targets": [ { "dsType": "prometheus", @@ -763,8 +757,18 @@ "target": "" } ], + "thresholds": "1,1", "title": "Connection Uptime", - "type": "stat" + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, { "cacheTimeout": null, @@ -777,12 +781,231 @@ ], "datasource": "${DS_PROMETHEUS}", "decimals": 1, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "format": "decbytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 6 + }, + "id": 3, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "tableColumn": "", + "targets": [ + { + "dsType": "prometheus", + "expr": "gateway_wan_bytes_received", + "groupBy": [], + "interval": "", + "legendFormat": "", + "measurement": "fritzbox_value", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT cumulative_sum(non_negative_difference(last(\"value\"))) FROM \"fritzbox_value\" WHERE (\"type_instance\" = 'totalbytesreceived') AND $timeFilter GROUP BY time($__interval)", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + "10s" + ], + "type": "non_negative_derivative" + } + ] + ], + "tags": [ + { + "key": "type_instance", + "operator": "=", + "value": "totalbytesreceived" + } + ], + "target": "" + } + ], + "thresholds": "", + "title": "Total Download", + "type": "singlestat", + "valueFontSize": "100%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": true, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "${DS_PROMETHEUS}", + "decimals": 1, + "format": "decbytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 6 + }, + "id": 8, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(137, 15, 2, 0.18)", + "full": false, + "lineColor": "#e24d42", + "show": true + }, + "tableColumn": "", + "targets": [ + { + "dsType": "prometheus", + "expr": "gateway_wan_bytes_sent", + "groupBy": [], + "interval": "", + "legendFormat": "", + "measurement": "fritzbox_value", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT cumulative_sum(non_negative_difference(last(\"value\"))) FROM \"fritzbox_value\" WHERE (\"type_instance\" = 'totalbytessent') AND $timeFilter GROUP BY time($__interval)", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "non_negative_difference" + } + ] + ], + "tags": [ + { + "key": "type_instance", + "operator": "=", + "value": "totalbytessent" + } + ], + "target": "" + } + ], + "thresholds": "", + "title": "Total Upload", + "type": "singlestat", + "valueFontSize": "100%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "${DS_PROMETHEUS}", + "decimals": 1, "format": "decbytes", "gauge": { "maxValue": 100, @@ -795,7 +1018,7 @@ "h": 4, "w": 6, "x": 12, - "y": 5 + "y": 6 }, "hideTimeOverride": false, "id": 22, @@ -832,7 +1055,7 @@ "lineColor": "rgb(31, 120, 193)", "show": true }, - "tableColumn": "gateway_wan_bytes_received{gateway=\"fritz.box\", instance=\"fritzbox-exporter-svc.fritzbox:9133\", job=\"fritzbox\"}", + "tableColumn": "", "targets": [ { "dsType": "prometheus", @@ -897,12 +1120,6 @@ ], "datasource": "${DS_PROMETHEUS}", "decimals": 1, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, "format": "decbytes", "gauge": { "maxValue": 100, @@ -915,7 +1132,7 @@ "h": 4, "w": 6, "x": 18, - "y": 5 + "y": 6 }, "id": 16, "interval": null, @@ -951,7 +1168,7 @@ "lineColor": "#e24d42", "show": true }, - "tableColumn": "gateway_wan_bytes_sent{gateway=\"fritz.box\", instance=\"fritzbox-exporter-svc.fritzbox:9133\", job=\"fritzbox\"}", + "tableColumn": "", "targets": [ { "dsType": "prometheus", @@ -1005,206 +1222,104 @@ "valueName": "range" }, { - "cacheTimeout": null, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 1, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, + "fill": 1, + "fillGradient": 0, "gridPos": { - "h": 4, - "w": 6, + "h": 8, + "w": 12, "x": 0, - "y": 6 + "y": 10 }, - "id": 3, - "interval": null, - "links": [], - "maxDataPoints": 100, + "hiddenSeries": false, + "id": 24, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "sum" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "dataLinks": [] }, - "pluginVersion": "7.1.0", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { - "dsType": "prometheus", - "expr": "gateway_wan_bytes_received", - "groupBy": [], + "expr": "gateway_wlan_current_connections", "interval": "", - "legendFormat": "", - "measurement": "fritzbox_value", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT cumulative_sum(non_negative_difference(last(\"value\"))) FROM \"fritzbox_value\" WHERE (\"type_instance\" = 'totalbytesreceived') AND $timeFilter GROUP BY time($__interval)", - "rawQuery": false, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [ - "10s" - ], - "type": "non_negative_derivative" - } - ] - ], - "tags": [ - { - "key": "type_instance", - "operator": "=", - "value": "totalbytesreceived" - } - ], - "target": "" - } - ], - "title": "Total Download", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 1, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" + "legendFormat": "2.4 GHz", + "refId": "A" }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 6, - "y": 6 - }, - "id": 8, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "sum" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "7.1.0", - "targets": [ { - "dsType": "prometheus", - "expr": "gateway_wan_bytes_sent", - "groupBy": [], + "expr": "gateway_wlan2_current_connections", "interval": "", - "legendFormat": "", - "measurement": "fritzbox_value", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT cumulative_sum(non_negative_difference(last(\"value\"))) FROM \"fritzbox_value\" WHERE (\"type_instance\" = 'totalbytessent') AND $timeFilter GROUP BY time($__interval)", - "rawQuery": false, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "non_negative_difference" - } - ] - ], - "tags": [ - { - "key": "type_instance", - "operator": "=", - "value": "totalbytessent" - } - ], - "target": "" + "legendFormat": "5 GHz", + "refId": "B" + }, + { + "expr": "gateway_wlan_current_connections+gateway_wlan2_current_connections", + "interval": "", + "legendFormat": "Total", + "refId": "C" } ], - "title": "Total Upload", - "type": "stat" + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "WLAN Connections", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": { @@ -1221,21 +1336,14 @@ "dashes": false, "datasource": "${DS_PROMETHEUS}", "editable": true, - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, "fill": 1, "fillGradient": 0, "grid": {}, "gridPos": { - "h": 6, + "h": 7, "w": 6, "x": 12, - "y": 9 + "y": 10 }, "hiddenSeries": false, "id": 18, @@ -1254,8 +1362,10 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, "percentage": false, - "pluginVersion": "7.1.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -1547,23 +1657,15 @@ "dashLength": 10, "dashes": false, "datasource": "${DS_PROMETHEUS}", - "description": "", "editable": true, - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, "fill": 0, "fillGradient": 0, "grid": {}, "gridPos": { - "h": 6, + "h": 7, "w": 6, "x": 18, - "y": 9 + "y": 10 }, "hiddenSeries": false, "id": 17, @@ -1581,8 +1683,10 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, "percentage": false, - "pluginVersion": "7.1.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -1597,7 +1701,7 @@ { "alias": "download", "dsType": "prometheus", - "expr": "delta(gateway_wan_bytes_received[120s])/120", + "expr": "delta(gateway_wan_bytes_received[1m])/60", "fields": [ { "func": "mean", @@ -1654,7 +1758,7 @@ { "alias": "upload", "dsType": "prometheus", - "expr": "delta(gateway_wan_bytes_sent[120s])/120", + "expr": "delta(gateway_wan_bytes_sent[1m])/60", "fields": [ { "func": "mean", @@ -1753,267 +1857,6 @@ }, "zerofill": true }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 10 - }, - "hiddenSeries": false, - "id": 24, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.0", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "gateway_wlan_current_connections", - "interval": "", - "legendFormat": "2.4 GHz", - "refId": "A" - }, - { - "expr": "gateway_wlan2_current_connections", - "interval": "", - "legendFormat": "5 GHz", - "refId": "B" - }, - { - "expr": "gateway_wlan_current_connections+gateway_wlan2_current_connections", - "interval": "", - "legendFormat": "Total", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "WLAN Connections", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "columns": [], - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fontSize": "100%", - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 15 - }, - "id": 14, - "links": [], - "pageSize": null, - "scroll": true, - "showHeader": true, - "sort": { - "col": 0, - "desc": true - }, - "styles": [ - { - "alias": "Time", - "align": "auto", - "dateFormat": "MMMM D, YYYY LT", - "pattern": "Time", - "type": "date" - }, - { - "alias": "", - "align": "auto", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 2, - "pattern": "/.*/", - "thresholds": [], - "type": "number", - "unit": "decbytes" - } - ], - "targets": [ - { - "alias": "Download", - "dsType": "prometheus", - "expr": "gateway_wan_bytes_received", - "groupBy": [ - { - "params": [ - "1d" - ], - "type": "time" - } - ], - "interval": "", - "legendFormat": "Download", - "measurement": "fritzbox_value", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT non_negative_difference(last(cumulative_sum)) FROM (\nSELECT cumulative_sum(non_negative_difference(\"value\")) FROM \"fritzbox_value\" WHERE (\"type_instance\" = 'totalbytesreceived') AND $timeFilter \n) WHERE $timeFilter GROUP BY time(1d) tz('Europe/Berlin')", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "max" - }, - { - "params": [ - "10s" - ], - "type": "non_negative_derivative" - } - ] - ], - "tags": [ - { - "key": "type_instance", - "operator": "=", - "value": "totalbytesreceived" - } - ], - "target": "" - }, - { - "alias": "Upload", - "dsType": "prometheus", - "expr": "gateway_wan_bytes_sent", - "groupBy": [ - { - "params": [ - "1d" - ], - "type": "time" - } - ], - "interval": "", - "legendFormat": "Upload", - "measurement": "fritzbox_value", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT non_negative_difference(last(cumulative_sum)) FROM (\nSELECT cumulative_sum(non_negative_difference(\"value\")) FROM \"fritzbox_value\" WHERE (\"type_instance\" = 'totalbytessent') AND $timeFilter\n) WHERE $timeFilter GROUP BY time(1d) tz('Europe/Berlin')", - "rawQuery": true, - "refId": "B", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "max" - }, - { - "params": [ - "10s" - ], - "type": "non_negative_derivative" - } - ] - ], - "tags": [ - { - "key": "type_instance", - "operator": "=", - "value": "totalbytesreceived" - } - ], - "target": "" - } - ], - "title": "Daily Traffic", - "transform": "timeseries_to_columns", - "type": "table-old" - }, { "aliasColors": { "Download": "#1f78c1", @@ -2025,20 +1868,13 @@ "dashLength": 10, "dashes": false, "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] - }, "fill": 1, "fillGradient": 0, "gridPos": { - "h": 6, + "h": 7, "w": 12, "x": 0, - "y": 16 + "y": 18 }, "hiddenSeries": false, "id": 2, @@ -2060,8 +1896,10 @@ "linewidth": 1, "links": [], "nullPointMode": "null", + "options": { + "dataLinks": [] + }, "percentage": false, - "pluginVersion": "7.1.0", "pointradius": 5, "points": false, "renderer": "flot", @@ -2216,17 +2054,166 @@ "align": false, "alignLevel": null } + }, + { + "columns": [], + "datasource": "${DS_PROMETHEUS}", + "fontSize": "100%", + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 25 + }, + "id": 14, + "links": [], + "pageSize": null, + "scroll": true, + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "MMMM D, YYYY LT", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "decbytes" + } + ], + "targets": [ + { + "alias": "Download", + "dsType": "prometheus", + "expr": "gateway_wan_bytes_received", + "groupBy": [ + { + "params": [ + "1d" + ], + "type": "time" + } + ], + "interval": "", + "legendFormat": "Download", + "measurement": "fritzbox_value", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT non_negative_difference(last(cumulative_sum)) FROM (\nSELECT cumulative_sum(non_negative_difference(\"value\")) FROM \"fritzbox_value\" WHERE (\"type_instance\" = 'totalbytesreceived') AND $timeFilter \n) WHERE $timeFilter GROUP BY time(1d) tz('Europe/Berlin')", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "max" + }, + { + "params": [ + "10s" + ], + "type": "non_negative_derivative" + } + ] + ], + "tags": [ + { + "key": "type_instance", + "operator": "=", + "value": "totalbytesreceived" + } + ], + "target": "" + }, + { + "alias": "Upload", + "dsType": "prometheus", + "expr": "gateway_wan_bytes_sent", + "groupBy": [ + { + "params": [ + "1d" + ], + "type": "time" + } + ], + "interval": "", + "legendFormat": "Upload", + "measurement": "fritzbox_value", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT non_negative_difference(last(cumulative_sum)) FROM (\nSELECT cumulative_sum(non_negative_difference(\"value\")) FROM \"fritzbox_value\" WHERE (\"type_instance\" = 'totalbytessent') AND $timeFilter\n) WHERE $timeFilter GROUP BY time(1d) tz('Europe/Berlin')", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "max" + }, + { + "params": [ + "10s" + ], + "type": "non_negative_derivative" + } + ] + ], + "tags": [ + { + "key": "type_instance", + "operator": "=", + "value": "totalbytesreceived" + } + ], + "target": "" + } + ], + "title": "Daily Traffic", + "transform": "timeseries_to_columns", + "type": "table" } ], "refresh": false, - "schemaVersion": 26, + "schemaVersion": 22, "style": "dark", "tags": [], "templating": { "list": [] }, "time": { - "from": "now-24h", + "from": "now-7d", "to": "now" }, "timepicker": { @@ -2257,5 +2244,8 @@ "timezone": "", "title": "FRITZ!Box Status", "uid": "000000013", - "version": 5 -} + "variables": { + "list": [] + }, + "version": 18 +} \ No newline at end of file diff --git a/grafana/README.md b/grafana/README.md index a59129d..82fa5af 100644 --- a/grafana/README.md +++ b/grafana/README.md @@ -1,6 +1,8 @@ # Grafana dashboard working with this exporter This dashboard is based on the following dashboard: -https://grafana.com/grafana/dashboards/12579 +https://grafana.com/grafana/dashboards/713 -Adjusted to my personal max down- and upstream and upgraded to the newest grafana version. +Instead of influx it uses prometheus and has been modified and enhanced. + +The dashboard is now also published to [Grafana](https://grafana.com/grafana/dashboards/12579)