apiVersion: v1 kind: ConfigMap metadata: name: grafana-dashboard-fritzbox-hosts namespace: monitoring labels: grafana_dashboard: '1' annotations: grafana_dashboard_folder: "🏠 Home" data: fritzbox-hosts.json: |- { "uid": "fritzbox-hosts", "title": "📶 FRITZ!Box Home Network", "tags": ["network", "fritzbox", "hosts", "prometheus"], "timezone": "browser", "schemaVersion": 39, "version": 1, "refresh": "30s", "editable": false, "graphTooltip": 2, "time": { "from": "now-24h", "to": "now" }, "panels": [ { "title": "Device Status", "type": "stat", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 5, "w": 8, "x": 0, "y": 0 }, "fieldConfig": { "defaults": { "mappings": [ { "type": "value", "options": { "0": { "text": "OFFLINE", "color": "red" }, "1": { "text": "ONLINE", "color": "green" } } } ], "color": { "mode": "thresholds" } } }, "options": { "graphMode": "none", "colorMode": "background", "textMode": "auto", "reduceOptions": { "values": false, "calcs": [ "lastNotNull" ] } }, "targets": [ { "expr": "gateway_host_active{hostname=\"$host\"}", "legendFormat": "Status", "refId": "A" } ] }, { "title": "Device Info", "type": "table", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 5, "w": 16, "x": 8, "y": 0 }, "targets": [ { "expr": "gateway_host_active{hostname=\"$host\"}", "format": "table", "instant": true, "refId": "A" } ], "transformations": [ { "id": "organize", "options": { "excludeByName": { "Time": true, "Value": true, "__name__": true, "gateway": true, "job": true, "instance": true, "hostname": true }, "renameByName": { "ipaddress": "IP Address", "macaddress": "MAC Address", "interfacetype": "Connection Interface" } } } ] }, { "title": "Connection History", "type": "state-timeline", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 8, "w": 24, "x": 0, "y": 5 }, "fieldConfig": { "defaults": { "mappings": [ { "type": "value", "options": { "0": { "text": "OFFLINE", "color": "red" }, "1": { "text": "ONLINE", "color": "green" } } } ], "color": { "mode": "thresholds" } } }, "options": { "showValue": "never", "align": "left", "mergeValues": true }, "targets": [ { "expr": "gateway_host_active{hostname=\"$host\"}", "legendFormat": "{{hostname}}", "refId": "A" } ] } ], "templating": { "list": [ { "current": {}, "datasource": { "type": "prometheus", "uid": "prometheus" }, "definition": "label_values(gateway_host_active, hostname)", "hide": 0, "includeAll": false, "label": "Select Local Device", "multi": false, "name": "host", "options": [], "query": { "query": "label_values(gateway_host_active, hostname)", "refId": "StandardVariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 1, "type": "query" } ] } }