apiVersion: v1 kind: ConfigMap metadata: name: grafana-dashboard-fritzbox namespace: monitoring labels: grafana_dashboard: '1' annotations: grafana_dashboard_folder: "Grabengasse7" data: fritzbox.json: |- { "uid": "fritzbox", "title": "📶 FRITZ!Box Status", "tags": ["network", "fritzbox", "infrastructure", "prometheus"], "timezone": "browser", "schemaVersion": 39, "version": 1, "refresh": "10s", "editable": false, "graphTooltip": 2, "time": { "from": "now-24h", "to": "now" }, "panels": [ { "title": "🌐 WAN Connectivity", "type": "row", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "collapsed": false }, { "title": "IP Connection Status", "type": "stat", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 4, "w": 4, "x": 0, "y": 1 }, "fieldConfig": { "defaults": { "mappings": [ { "type": "value", "options": { "0": { "text": "DISCONNECTED", "color": "red" }, "1": { "text": "CONNECTED", "color": "green" } } } ], "color": { "mode": "thresholds" } } }, "options": { "graphMode": "none", "colorMode": "background", "textMode": "auto", "reduceOptions": { "values": false, "calcs": [ "lastNotNull" ] } }, "targets": [ { "expr": "gateway_connection_status{connection=\"IP\"}", "legendFormat": "IP Status", "refId": "A" } ] }, { "title": "DSL Link Status", "type": "stat", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 4, "w": 4, "x": 4, "y": 1 }, "fieldConfig": { "defaults": { "mappings": [ { "type": "value", "options": { "0": { "text": "LINK DOWN", "color": "red" }, "1": { "text": "LINK UP", "color": "green" } } } ], "color": { "mode": "thresholds" } } }, "options": { "graphMode": "none", "colorMode": "background", "textMode": "auto", "reduceOptions": { "values": false, "calcs": [ "lastNotNull" ] } }, "targets": [ { "expr": "gateway_connection_status{connection=\"Physical Link\"}", "legendFormat": "DSL Link", "refId": "A" } ] }, { "title": "Connection Uptime", "type": "stat", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 4, "w": 4, "x": 8, "y": 1 }, "fieldConfig": { "defaults": { "unit": "s", "color": { "mode": "fixed", "fixedColor": "blue" } } }, "options": { "graphMode": "none", "colorMode": "value", "textMode": "auto", "reduceOptions": { "values": false, "calcs": [ "lastNotNull" ] } }, "targets": [ { "expr": "gateway_connection_uptime_seconds", "legendFormat": "Uptime", "refId": "A" } ] }, { "title": "Downstream DSL Sync", "type": "gauge", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 4, "w": 6, "x": 12, "y": 1 }, "fieldConfig": { "defaults": { "unit": "bps", "min": 0, "max": 300000000, "color": { "mode": "fixed", "fixedColor": "green" } } }, "options": { "reduceOptions": { "values": false, "calcs": [ "lastNotNull" ] } }, "targets": [ { "expr": "gateway_max_bitrate{direction=\"Down\"}", "legendFormat": "Down Sync", "refId": "A" } ] }, { "title": "Upstream DSL Sync", "type": "gauge", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 4, "w": 6, "x": 18, "y": 1 }, "fieldConfig": { "defaults": { "unit": "bps", "min": 0, "max": 50000000, "color": { "mode": "fixed", "fixedColor": "green" } } }, "options": { "reduceOptions": { "values": false, "calcs": [ "lastNotNull" ] } }, "targets": [ { "expr": "gateway_max_bitrate{direction=\"Up\"}", "legendFormat": "Up Sync", "refId": "A" } ] }, { "title": "📈 Traffic & Speed", "type": "row", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 5 }, "collapsed": false }, { "title": "Real-time Traffic Rates", "type": "timeseries", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 8, "w": 16, "x": 0, "y": 6 }, "fieldConfig": { "defaults": { "unit": "Bps", "custom": { "lineWidth": 2, "fillOpacity": 10, "spanNulls": true, "showPoints": "never" } }, "overrides": [ { "matcher": { "id": "byName", "options": "Download (Rx)" }, "properties": [ { "id": "color", "value": { "fixedColor": "#4CAF50", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Upload (Tx)" }, "properties": [ { "id": "color", "value": { "fixedColor": "#2196F3", "mode": "fixed" } } ] } ] }, "options": { "legend": { "displayMode": "table", "placement": "bottom", "calcs": [ "lastNotNull", "mean", "max" ] }, "tooltip": { "mode": "multi", "sort": "desc" } }, "targets": [ { "expr": "gateway_traffic_rate{direction=\"Received\"}", "legendFormat": "Download (Rx)", "refId": "A" }, { "expr": "gateway_traffic_rate{direction=\"Sent\"}", "legendFormat": "Upload (Tx)", "refId": "B" } ] }, { "title": "Total Downloaded Data", "type": "stat", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 4, "w": 8, "x": 16, "y": 6 }, "fieldConfig": { "defaults": { "unit": "bytes", "color": { "mode": "fixed", "fixedColor": "green" } } }, "options": { "graphMode": "none", "colorMode": "value", "textMode": "auto", "reduceOptions": { "values": false, "calcs": [ "lastNotNull" ] } }, "targets": [ { "expr": "gateway_traffic_64{direction=\"Received\", unit=\"Bytes\"}", "legendFormat": "Total Downloaded", "refId": "A" } ] }, { "title": "Total Uploaded Data", "type": "stat", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 4, "w": 8, "x": 16, "y": 10 }, "fieldConfig": { "defaults": { "unit": "bytes", "color": { "mode": "fixed", "fixedColor": "blue" } } }, "options": { "graphMode": "none", "colorMode": "value", "textMode": "auto", "reduceOptions": { "values": false, "calcs": [ "lastNotNull" ] } }, "targets": [ { "expr": "gateway_traffic_64{direction=\"Sent\", unit=\"Bytes\"}", "legendFormat": "Total Uploaded", "refId": "A" } ] }, { "title": "🛡️ WireGuard VPN Tunnel", "type": "row", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 14 }, "collapsed": false }, { "title": "VPN Connection Status", "type": "stat", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 4, "w": 6, "x": 0, "y": 15 }, "fieldConfig": { "defaults": { "mappings": [ { "type": "value", "options": { "0": { "text": "DISCONNECTED", "color": "red" }, "1": { "text": "CONNECTED", "color": "green" } } } ], "color": { "mode": "thresholds" } } }, "options": { "graphMode": "none", "colorMode": "background", "textMode": "auto", "reduceOptions": { "values": false, "calcs": [ "lastNotNull" ] } }, "targets": [ { "expr": "(time() - wireguard_latest_handshake_seconds{interface=\"wg0\"} < 300) or on() vector(0)", "legendFormat": "VPN Status", "refId": "A" } ] }, { "title": "Last VPN Handshake", "type": "stat", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 4, "w": 6, "x": 6, "y": 15 }, "fieldConfig": { "defaults": { "unit": "s", "color": { "mode": "thresholds" }, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "orange", "value": 300 }, { "color": "red", "value": 600 } ] } } }, "options": { "graphMode": "none", "colorMode": "value", "textMode": "auto", "reduceOptions": { "values": false, "calcs": [ "lastNotNull" ] } }, "targets": [ { "expr": "time() - wireguard_latest_handshake_seconds{interface=\"wg0\"}", "legendFormat": "Handshake Delay", "refId": "A" } ] }, { "title": "VPN Traffic Rates", "type": "timeseries", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 15 }, "fieldConfig": { "defaults": { "unit": "Bps", "custom": { "lineWidth": 2, "fillOpacity": 10, "spanNulls": true, "showPoints": "never" } }, "overrides": [ { "matcher": { "id": "byName", "options": "Received (Rx)" }, "properties": [ { "id": "color", "value": { "fixedColor": "#4CAF50", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Sent (Tx)" }, "properties": [ { "id": "color", "value": { "fixedColor": "#2196F3", "mode": "fixed" } } ] } ] }, "options": { "legend": { "displayMode": "table", "placement": "bottom", "calcs": [ "lastNotNull", "mean", "max" ] }, "tooltip": { "mode": "multi", "sort": "desc" } }, "targets": [ { "expr": "rate(wireguard_received_bytes_total{interface=\"wg0\"}[5m])", "legendFormat": "Received (Rx)", "refId": "A" }, { "expr": "rate(wireguard_sent_bytes_total{interface=\"wg0\"}[5m])", "legendFormat": "Sent (Tx)", "refId": "B" } ] } ] }