diff --git a/k8s/home-assistant/home-assistant.secret.yaml b/k8s/home-assistant/home-assistant.secret.yaml index 9d7f3aa..fac001e 100644 Binary files a/k8s/home-assistant/home-assistant.secret.yaml and b/k8s/home-assistant/home-assistant.secret.yaml differ diff --git a/k8s/monitoring/dashboards/grafana-dashboard-energy-monitor.yaml b/k8s/monitoring/dashboards/grafana-dashboard-energy-monitor.yaml index 8d13aaf..c6347d2 100644 --- a/k8s/monitoring/dashboards/grafana-dashboard-energy-monitor.yaml +++ b/k8s/monitoring/dashboards/grafana-dashboard-energy-monitor.yaml @@ -1,92 +1,146 @@ apiVersion: v1 +data: + energy-monitor.json: '{"uid": "energy-monitor", "title": "\u26a1 Energy Monitor", + "tags": ["home", "energy", "solar", "power", "auto-generated"], "timezone": "browser", + "schemaVersion": 39, "version": 1, "refresh": "5m", "editable": false, "graphTooltip": + 1, "time": {"from": "now-24h", "to": "now"}, "panels": [{"title": "\u26a1 Live + Power", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 0}, "collapsed": + false}, {"title": "\u2600\ufe0f Solar", "type": "stat", "datasource": {"type": + "prometheus", "uid": "prometheus"}, "gridPos": {"h": 4, "w": 4, "x": 0, "y": 1}, + "fieldConfig": {"defaults": {"unit": "watt", "decimals": 0, "thresholds": {"mode": + "absolute", "steps": [{"color": "#555", "value": null}, {"color": "#FFD700", "value": + 100}, {"color": "#73BF69", "value": 500}, {"color": "#37872D", "value": 2000}]}, + "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": + "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": + ["lastNotNull"]}}, "targets": [{"expr": "homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_systemleistung\"}", + "format": "time_series", "refId": "A"}]}, {"title": "\ud83c\udfe0 Self-Use", "type": + "stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": + {"h": 4, "w": 4, "x": 4, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt", + "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555", + "value": null}, {"color": "#73BF69", "value": 100}, {"color": "#FFD700", "value": + 1000}, {"color": "#FF7383", "value": 3000}]}, "color": {"mode": "thresholds"}}}, + "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", + "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"expr": + "homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_eigene_leistung\"}", + "format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udd0c Grid Import", + "type": "stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": + {"h": 4, "w": 4, "x": 8, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt", + "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#73BF69", + "value": null}, {"color": "#FFD700", "value": 500}, {"color": "#FF7383", "value": + 2000}, {"color": "#C4162A", "value": 5000}]}, "color": {"mode": "thresholds"}}}, + "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", + "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"expr": + "homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_bezugsleistung\"}", + "format": "time_series", "refId": "A"}]}, {"title": "\u2197\ufe0f Grid Export", + "type": "stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": + {"h": 4, "w": 4, "x": 12, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt", + "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555", + "value": null}, {"color": "#5794F2", "value": 100}, {"color": "#1F60C4", "value": + 500}, {"color": "#3274D9", "value": 2000}]}, "color": {"mode": "thresholds"}}}, + "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", + "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"expr": + "homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_einspeiseleistung\"}", + "format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udd0b Battery SoC", + "type": "gauge", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": + {"h": 4, "w": 4, "x": 16, "y": 1}, "fieldConfig": {"defaults": {"unit": "percent", + "decimals": 0, "min": 0, "max": 100, "thresholds": {"mode": "absolute", "steps": + [{"color": "#C4162A", "value": null}, {"color": "#FF7383", "value": 20}, {"color": + "#FFD700", "value": 40}, {"color": "#73BF69", "value": 60}]}, "color": {"mode": + "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}, + "orientation": "auto", "showThresholdLabels": true, "showThresholdMarkers": true}, + "targets": [{"expr": "homeassistant_sensor_battery_percent{entity=\"sensor.ladeaufstellung_soc\"}", + "format": "time_series", "refId": "A"}]}, {"title": "\ud83c\udfe1 Total House", + "type": "stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": + {"h": 4, "w": 4, "x": 20, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt", + "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555", + "value": null}, {"color": "#73BF69", "value": 200}, {"color": "#FFD700", "value": + 1000}, {"color": "#FF7383", "value": 3000}, {"color": "#C4162A", "value": 5000}]}, + "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": + "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": + ["lastNotNull"]}}, "targets": [{"expr": "homeassistant_sensor_power_w{entity=\"sensor.home_strommesserat_currentpowerconsumption\"}", + "format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udcc8 Power Flow", + "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 5}, "collapsed": false}, + {"title": "Power Timeline", "type": "timeseries", "datasource": {"type": "prometheus", + "uid": "prometheus"}, "gridPos": {"h": 10, "w": 24, "x": 0, "y": 6}, "fieldConfig": + {"defaults": {"unit": "watt", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": + true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options": + "Solar"}, "properties": [{"id": "color", "value": {"fixedColor": "#FFD700", "mode": + "fixed"}}, {"id": "custom.fillOpacity", "value": 15}]}, {"matcher": {"id": "byName", + "options": "Self-Use"}, "properties": [{"id": "color", "value": {"fixedColor": + "#73BF69", "mode": "fixed"}}]}, {"matcher": {"id": "byName", "options": "Grid + Import"}, "properties": [{"id": "color", "value": {"fixedColor": "#FF7383", "mode": + "fixed"}}]}, {"matcher": {"id": "byName", "options": "Grid Export"}, "properties": + [{"id": "color", "value": {"fixedColor": "#5794F2", "mode": "fixed"}}, {"id": + "custom.lineStyle", "value": {"fill": "dash", "dash": [8, 4]}}]}, {"matcher": + {"id": "byName", "options": "Local Load"}, "properties": [{"id": "color", "value": + {"fixedColor": "#C4162A", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": + "table", "placement": "bottom", "calcs": ["max", "mean", "lastNotNull"]}, "tooltip": + {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "SOLAR", "expr": "homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_systemleistung\"}", + "format": "time_series"}, {"refId": "SELF", "expr": "homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_eigene_leistung\"}", + "format": "time_series"}, {"refId": "IMPORT", "expr": "homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_bezugsleistung\"}", + "format": "time_series"}, {"refId": "EXPORT", "expr": "homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_einspeiseleistung\"}", + "format": "time_series"}, {"refId": "LOAD", "expr": "homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_lokale_lastleistung\"}", + "format": "time_series"}]}, {"title": "\ud83d\udcca Energy Summary (Today)", "type": + "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 16}, "collapsed": false}, {"title": + "\u2600\ufe0f Solar Produced", "type": "bargauge", "datasource": {"type": "prometheus", + "uid": "prometheus"}, "gridPos": {"h": 4, "w": 6, "x": 0, "y": 17}, "fieldConfig": + {"defaults": {"unit": "kwatth", "decimals": 1, "min": 0, "thresholds": {"mode": + "absolute", "steps": [{"color": "#555", "value": null}, {"color": "#FFD700", "value": + 5}, {"color": "#73BF69", "value": 15}, {"color": "#37872D", "value": 30}]}, "color": + {"mode": "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": + ["lastNotNull"]}, "orientation": "horizontal", "displayMode": "basic", "showUnfilled": + true}, "targets": [{"expr": "homeassistant_sensor_energy_kwh{entity=\"sensor.garten_bzp3n7g1b0_systemerzeugung_heute\"}", + "format": "time_series", "refId": "A"}]}, {"title": "\ud83c\udfe0 Self-Consumed", + "type": "bargauge", "datasource": {"type": "prometheus", "uid": "prometheus"}, + "gridPos": {"h": 4, "w": 6, "x": 6, "y": 17}, "fieldConfig": {"defaults": {"unit": + "kwatth", "decimals": 1, "min": 0, "thresholds": {"mode": "absolute", "steps": + [{"color": "#555", "value": null}, {"color": "#73BF69", "value": 5}, {"color": + "#FFD700", "value": 15}, {"color": "#FF7383", "value": 30}]}, "color": {"mode": + "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}, + "orientation": "horizontal", "displayMode": "basic", "showUnfilled": true}, "targets": + [{"expr": "homeassistant_sensor_energy_kwh{entity=\"sensor.garten_bzp3n7g1b0_eigenverbrauch_heute\"}", + "format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udd0c Grid Imported", + "type": "bargauge", "datasource": {"type": "prometheus", "uid": "prometheus"}, + "gridPos": {"h": 4, "w": 6, "x": 12, "y": 17}, "fieldConfig": {"defaults": {"unit": + "kwatth", "decimals": 1, "min": 0, "thresholds": {"mode": "absolute", "steps": + [{"color": "#73BF69", "value": null}, {"color": "#FFD700", "value": 2}, {"color": + "#FF7383", "value": 10}, {"color": "#C4162A", "value": 20}]}, "color": {"mode": + "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}, + "orientation": "horizontal", "displayMode": "basic", "showUnfilled": true}, "targets": + [{"expr": "homeassistant_sensor_energy_kwh{entity=\"sensor.garten_bzp3n7g1b0_netzbezug_heute\"}", + "format": "time_series", "refId": "A"}]}, {"title": "\u2197\ufe0f Grid Exported", + "type": "bargauge", "datasource": {"type": "prometheus", "uid": "prometheus"}, + "gridPos": {"h": 4, "w": 6, "x": 18, "y": 17}, "fieldConfig": {"defaults": {"unit": + "kwatth", "decimals": 1, "min": 0, "thresholds": {"mode": "absolute", "steps": + [{"color": "#555", "value": null}, {"color": "#5794F2", "value": 2}, {"color": + "#1F60C4", "value": 10}, {"color": "#3274D9", "value": 20}]}, "color": {"mode": + "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}, + "orientation": "horizontal", "displayMode": "basic", "showUnfilled": true}, "targets": + [{"expr": "homeassistant_sensor_energy_kwh{entity=\"sensor.export_ins_netz_heute\"}", + "format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udcc8 Energy Trend", + "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 21}, "collapsed": false}, + {"title": "Daily Energy", "type": "timeseries", "datasource": {"type": "prometheus", + "uid": "prometheus"}, "gridPos": {"h": 10, "w": 24, "x": 0, "y": 22}, "fieldConfig": + {"defaults": {"unit": "kwatth", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": + true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options": + "Solar"}, "properties": [{"id": "color", "value": {"fixedColor": "#FFD700", "mode": + "fixed"}}]}, {"matcher": {"id": "byName", "options": "Self-Use"}, "properties": + [{"id": "color", "value": {"fixedColor": "#73BF69", "mode": "fixed"}}]}, {"matcher": + {"id": "byName", "options": "Grid Import"}, "properties": [{"id": "color", "value": + {"fixedColor": "#FF7383", "mode": "fixed"}}]}, {"matcher": {"id": "byName", "options": + "Grid Export"}, "properties": [{"id": "color", "value": {"fixedColor": "#5794F2", + "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": + "bottom", "calcs": ["sum", "mean"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, + "targets": [{"refId": "SOLAR", "expr": "homeassistant_sensor_energy_kwh{entity=\"sensor.garten_bzp3n7g1b0_systemerzeugung_heute\"}", + "format": "time_series"}, {"refId": "SELF", "expr": "homeassistant_sensor_energy_kwh{entity=\"sensor.garten_bzp3n7g1b0_eigenverbrauch_heute\"}", + "format": "time_series"}, {"refId": "IMPORT", "expr": "homeassistant_sensor_energy_kwh{entity=\"sensor.garten_bzp3n7g1b0_netzbezug_heute\"}", + "format": "time_series"}, {"refId": "EXPORT", "expr": "homeassistant_sensor_energy_kwh{entity=\"sensor.export_ins_netz_heute\"}", + "format": "time_series"}]}]}' kind: ConfigMap metadata: - name: grafana-dashboard-energy-monitor - namespace: monitoring + annotations: + grafana_dashboard_folder: "\U0001F3E0 Home" labels: grafana_dashboard: '1' - annotations: - grafana_dashboard_folder: 🏠 Home -data: - energy-monitor.json: '{"uid": "energy-monitor", "title": "⚡ Energy Monitor", "tags": ["home", "energy", "solar", "power", "auto-generated"], "timezone": "browser", "schemaVersion": 39, "version": 1, "refresh": - "5m", "editable": false, "graphTooltip": 1, "time": {"from": "now-24h", "to": "now"}, "panels": [{"title": "⚡ Live Power", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 0}, "collapsed": false}, - {"title": "☀️ Solar", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 0, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt", "decimals": - 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555", "value": null}, {"color": "#FFD700", "value": 100}, {"color": "#73BF69", "value": 500}, {"color": "#37872D", "value": 2000}]}, "color": - {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: - \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_systemleistung\")\n |> - aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "🏠 Self-Use", "type": "stat", "datasource": {"type": "influxdb", - "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 4, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555", "value": - null}, {"color": "#73BF69", "value": 100}, {"color": "#FFD700", "value": 1000}, {"color": "#FF7383", "value": 3000}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": - "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> - filter(fn: (r) => r[\"_measurement\"] == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_eigene_leistung\")\n |> aggregateWindow(every: v.windowPeriod, - fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "🔌 Grid Import", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, - "gridPos": {"h": 4, "w": 4, "x": 8, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#73BF69", "value": null}, {"color": "#FFD700", - "value": 500}, {"color": "#FF7383", "value": 2000}, {"color": "#C4162A", "value": 5000}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": - "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) - => r[\"_measurement\"] == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_bezugsleistung\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: - false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "↗️ Grid Export", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, - "w": 4, "x": 12, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555", "value": null}, {"color": "#5794F2", "value": 100}, - {"color": "#1F60C4", "value": 500}, {"color": "#3274D9", "value": 2000}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": - {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] - == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_einspeiseleistung\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> - yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "🔋 Battery SoC", "type": "gauge", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": - 16, "y": 1}, "fieldConfig": {"defaults": {"unit": "percent", "decimals": 0, "min": 0, "max": 100, "thresholds": {"mode": "absolute", "steps": [{"color": "#C4162A", "value": null}, {"color": "#FF7383", - "value": 20}, {"color": "#FFD700", "value": 40}, {"color": "#73BF69", "value": 60}]}, "color": {"mode": "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}, "orientation": - "auto", "showThresholdLabels": true, "showThresholdMarkers": true}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: -15m)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and - r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"ladeaufstellung_soc\")\n |> last()\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "🏡 Total House", "type": - "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 20, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt", "decimals": 0, "thresholds": {"mode": - "absolute", "steps": [{"color": "#555", "value": null}, {"color": "#73BF69", "value": 200}, {"color": "#FFD700", "value": 1000}, {"color": "#FF7383", "value": 3000}, {"color": "#C4162A", "value": 5000}]}, - "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": - "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id - == \"home_strommesserat_currentpowerconsumption\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": - "📈 Power Flow", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 5}, "collapsed": false}, {"title": "Power Timeline", "type": "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, - "gridPos": {"h": 10, "w": 24, "x": 0, "y": 6}, "fieldConfig": {"defaults": {"unit": "watt", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": [{"matcher": - {"id": "byName", "options": "Solar"}, "properties": [{"id": "color", "value": {"fixedColor": "#FFD700", "mode": "fixed"}}, {"id": "custom.fillOpacity", "value": 15}]}, {"matcher": {"id": "byName", "options": - "Self-Use"}, "properties": [{"id": "color", "value": {"fixedColor": "#73BF69", "mode": "fixed"}}]}, {"matcher": {"id": "byName", "options": "Grid Import"}, "properties": [{"id": "color", "value": {"fixedColor": - "#FF7383", "mode": "fixed"}}]}, {"matcher": {"id": "byName", "options": "Grid Export"}, "properties": [{"id": "color", "value": {"fixedColor": "#5794F2", "mode": "fixed"}}, {"id": "custom.lineStyle", - "value": {"fill": "dash", "dash": [8, 4]}}]}, {"matcher": {"id": "byName", "options": "Local Load"}, "properties": [{"id": "color", "value": {"fixedColor": "#C4162A", "mode": "fixed"}}]}]}, "options": - {"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["max", "mean", "lastNotNull"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "SOLAR", "query": "from(bucket: - \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_systemleistung\")\n |> - aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"source\", value: \"Solar\")", "resultFormat": "time_series"}, {"refId": "SELF", "query": - "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id - == \"garten_bzp3n7g1b0_eigene_leistung\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"source\", value: \"Self-Use\")", "resultFormat": - "time_series"}, {"refId": "IMPORT", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"W\" and r[\"_field\"] - == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_bezugsleistung\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> - set(key: \"source\", value: \"Grid Import\")", "resultFormat": "time_series"}, {"refId": "EXPORT", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> - filter(fn: (r) => r[\"_measurement\"] == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_einspeiseleistung\")\n |> aggregateWindow(every: v.windowPeriod, - fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"source\", value: \"Grid Export\")", "resultFormat": "time_series"}, {"refId": "LOAD", "query": "from(bucket: \"default\")\n |> - range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_lokale_lastleistung\")\n |> - aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"source\", value: \"Local Load\")", "resultFormat": "time_series"}]}, {"title": "📊 Energy - Summary (Today)", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 16}, "collapsed": false}, {"title": "☀️ Solar Produced", "type": "bargauge", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, - "gridPos": {"h": 4, "w": 6, "x": 0, "y": 17}, "fieldConfig": {"defaults": {"unit": "kwatth", "decimals": 1, "min": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555", "value": null}, {"color": - "#FFD700", "value": 5}, {"color": "#73BF69", "value": 15}, {"color": "#37872D", "value": 30}]}, "color": {"mode": "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}, - "orientation": "horizontal", "displayMode": "basic", "showUnfilled": true}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: -15m)\n |> filter(fn: (r) => r[\"_measurement\"] == \"kWh\" - and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_systemerzeugung_heute\")\n |> last()\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": - "🏠 Self-Consumed", "type": "bargauge", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 6, "x": 6, "y": 17}, "fieldConfig": {"defaults": {"unit": "kwatth", "decimals": - 1, "min": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555", "value": null}, {"color": "#73BF69", "value": 5}, {"color": "#FFD700", "value": 15}, {"color": "#FF7383", "value": 30}]}, - "color": {"mode": "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}, "orientation": "horizontal", "displayMode": "basic", "showUnfilled": true}, "targets": [{"query": - "from(bucket: \"default\")\n |> range(start: -15m)\n |> filter(fn: (r) => r[\"_measurement\"] == \"kWh\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_eigenverbrauch_heute\")\n |> - last()\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "🔌 Grid Imported", "type": "bargauge", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": - 4, "w": 6, "x": 12, "y": 17}, "fieldConfig": {"defaults": {"unit": "kwatth", "decimals": 1, "min": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#73BF69", "value": null}, {"color": "#FFD700", - "value": 2}, {"color": "#FF7383", "value": 10}, {"color": "#C4162A", "value": 20}]}, "color": {"mode": "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}, "orientation": - "horizontal", "displayMode": "basic", "showUnfilled": true}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: -15m)\n |> filter(fn: (r) => r[\"_measurement\"] == \"kWh\" and r[\"_field\"] - == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_netzbezug_heute\")\n |> last()\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "↗️ Grid Exported", - "type": "bargauge", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 6, "x": 18, "y": 17}, "fieldConfig": {"defaults": {"unit": "kwatth", "decimals": 1, "min": - 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555", "value": null}, {"color": "#5794F2", "value": 2}, {"color": "#1F60C4", "value": 10}, {"color": "#3274D9", "value": 20}]}, "color": {"mode": - "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}, "orientation": "horizontal", "displayMode": "basic", "showUnfilled": true}, "targets": [{"query": "from(bucket: - \"default\")\n |> range(start: -15m)\n |> filter(fn: (r) => r[\"_measurement\"] == \"kWh\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"export_ins_netz_heute\")\n |> last()\n |> - yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "📈 Energy Trend", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 21}, "collapsed": false}, {"title": "Daily Energy", "type": - "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 10, "w": 24, "x": 0, "y": 22}, "fieldConfig": {"defaults": {"unit": "kwatth", "custom": {"lineWidth": 2, - "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options": "Solar"}, "properties": [{"id": "color", "value": {"fixedColor": "#FFD700", "mode": - "fixed"}}]}, {"matcher": {"id": "byName", "options": "Self-Use"}, "properties": [{"id": "color", "value": {"fixedColor": "#73BF69", "mode": "fixed"}}]}, {"matcher": {"id": "byName", "options": "Grid - Import"}, "properties": [{"id": "color", "value": {"fixedColor": "#FF7383", "mode": "fixed"}}]}, {"matcher": {"id": "byName", "options": "Grid Export"}, "properties": [{"id": "color", "value": {"fixedColor": - "#5794F2", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["sum", "mean"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": - "SOLAR", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"kWh\" and r[\"_field\"] == \"value\")\n |> - filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_systemerzeugung_heute\")\n |> aggregateWindow(every: 1d, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"type\", value: - \"Solar\")", "resultFormat": "time_series"}, {"refId": "SELF", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] - == \"kWh\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_eigenverbrauch_heute\")\n |> aggregateWindow(every: 1d, fn: mean, createEmpty: false)\n |> yield(name: - \"mean\") |> set(key: \"type\", value: \"Self-Use\")", "resultFormat": "time_series"}, {"refId": "IMPORT", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> - filter(fn: (r) => r[\"_measurement\"] == \"kWh\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_netzbezug_heute\")\n |> aggregateWindow(every: 1d, fn: mean, - createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"type\", value: \"Grid Import\")", "resultFormat": "time_series"}, {"refId": "EXPORT", "query": "from(bucket: \"default\")\n |> range(start: - v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"kWh\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"export_ins_netz_heute\")\n |> - aggregateWindow(every: 1d, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"type\", value: \"Grid Export\")", "resultFormat": "time_series"}]}]}' + name: grafana-dashboard-energy-monitor + namespace: monitoring diff --git a/k8s/monitoring/dashboards/grafana-dashboard-fritzbox-hosts.yaml b/k8s/monitoring/dashboards/grafana-dashboard-fritzbox-hosts.yaml new file mode 100644 index 0000000..65b26e3 --- /dev/null +++ b/k8s/monitoring/dashboards/grafana-dashboard-fritzbox-hosts.yaml @@ -0,0 +1,200 @@ +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" + } + ] + } + } diff --git a/k8s/monitoring/dashboards/grafana-dashboard-fritzbox.yaml b/k8s/monitoring/dashboards/grafana-dashboard-fritzbox.yaml new file mode 100644 index 0000000..f1da482 --- /dev/null +++ b/k8s/monitoring/dashboards/grafana-dashboard-fritzbox.yaml @@ -0,0 +1,651 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: grafana-dashboard-fritzbox + namespace: monitoring + labels: + grafana_dashboard: '1' + annotations: + grafana_dashboard_folder: "🏠 Home" +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" + } + ] + } + ] + } diff --git a/k8s/monitoring/dashboards/grafana-dashboard-home-climate.yaml b/k8s/monitoring/dashboards/grafana-dashboard-home-climate.yaml index 71703c6..588cac2 100644 --- a/k8s/monitoring/dashboards/grafana-dashboard-home-climate.yaml +++ b/k8s/monitoring/dashboards/grafana-dashboard-home-climate.yaml @@ -1,98 +1,224 @@ apiVersion: v1 +data: + home-climate.json: '{"uid": "home-climate", "title": "\ud83c\udfe0 Home Climate", + "tags": ["home", "climate", "temperature", "humidity", "auto-generated", "prometheus"], + "timezone": "browser", "schemaVersion": 39, "version": 2, "refresh": "5m", "editable": + false, "graphTooltip": 1, "time": {"from": "now-24h", "to": "now"}, "panels": + [{"type": "row", "title": "\ud83c\udf10 Overview Trends", "gridPos": {"x": 0, + "y": 0, "w": 24, "h": 1}, "collapsed": false}, {"type": "timeseries", "title": + "Indoor vs Outdoor Temperature", "datasource": {"type": "prometheus", "uid": "prometheus"}, + "gridPos": {"x": 0, "y": 1, "w": 12, "h": 8}, "targets": [{"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.regensburg_regensburg_temperatur\"}", + "legendFormat": "Outdoor (Regensburg)"}, {"expr": "avg(homeassistant_sensor_temperature_celsius{entity=~\"sensor.home_.*_thermostat_temperature|sensor.home_wall_mounted_thermostat_pro_temperature\"})", + "legendFormat": "Average Indoor"}], "fieldConfig": {"defaults": {"unit": "celsius", + "custom": {"lineWidth": 2, "fillOpacity": 5}}, "overrides": [{"matcher": {"id": + "byName", "options": "Outdoor (Regensburg)"}, "properties": [{"id": "color", "value": + {"fixedColor": "light-blue", "mode": "fixed"}}, {"id": "custom.lineStyle", "value": + {"fill": "dash", "dash": [10, 5]}}]}, {"matcher": {"id": "byName", "options": + "Average Indoor"}, "properties": [{"id": "color", "value": {"fixedColor": "orange", + "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": + "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip": {"mode": "multi", "sort": + "desc"}}}, {"type": "timeseries", "title": "Average Indoor Humidity", "datasource": + {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 12, "y": 1, "w": + 12, "h": 8}, "targets": [{"expr": "avg(homeassistant_sensor_humidity_percent{entity=~\".*_humidity\"})", + "legendFormat": "Average Humidity"}], "fieldConfig": {"defaults": {"unit": "percent", + "custom": {"lineWidth": 2, "fillOpacity": 20}, "color": {"mode": "fixed", "fixedColor": + "blue"}}}, "options": {"legend": {"displayMode": "table", "placement": "bottom", + "calcs": ["mean", "lastNotNull"]}, "tooltip": {"mode": "multi"}}}, {"type": "row", + "title": "\ud83d\udcca Room Details", "gridPos": {"x": 0, "y": 9, "w": 24, "h": + 1}, "collapsed": false}, {"type": "timeseries", "title": "Wohnzimmer", "datasource": + {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0, "y": 10, "w": + 12, "h": 9}, "targets": [{"expr": "homeassistant_climate_target_temperature_celsius{entity=\"climate.home_wohnzimmer\"}", + "legendFormat": "\ud83c\udfaf Target"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_wall_mounted_thermostat_pro_temperature\"}", + "legendFormat": "\ud83c\udf21\ufe0f Thermostat"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_wohnzimmer_temperature\"}", + "legendFormat": "\ud83d\udd25 Heater"}, {"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_wall_mounted_thermostat_pro_humidity\"}", + "legendFormat": "\ud83d\udca7 Humidity"}], "fieldConfig": {"defaults": {"unit": + "celsius", "custom": {"spanNulls": true}}, "overrides": [{"matcher": {"id": "byName", + "options": "\ud83c\udfaf Target"}, "properties": [{"id": "custom.lineStyle", "value": + {"fill": "dash", "dash": [10, 10]}}, {"id": "color", "value": {"fixedColor": "dark-orange", + "mode": "fixed"}}, {"id": "custom.lineWidth", "value": 3}]}, {"matcher": {"id": + "byName", "options": "\ud83c\udf21\ufe0f Thermostat"}, "properties": [{"id": "color", + "value": {"fixedColor": "orange", "mode": "fixed"}}, {"id": "custom.lineWidth", + "value": 2}]}, {"matcher": {"id": "byRegexp", "options": ".*Heater.*"}, "properties": + [{"id": "custom.lineStyle", "value": {"fill": "dash", "dash": [2, 5]}}, {"id": + "color", "value": {"fixedColor": "red", "mode": "fixed"}}]}, {"matcher": {"id": + "byName", "options": "\ud83d\udca7 Humidity"}, "properties": [{"id": "custom.axisPlacement", + "value": "right"}, {"id": "unit", "value": "percent"}, {"id": "custom.fillOpacity", + "value": 10}, {"id": "custom.lineWidth", "value": 1}, {"id": "color", "value": + {"fixedColor": "blue", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": + "table", "placement": "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip": + {"mode": "multi", "sort": "desc"}}}, {"type": "timeseries", "title": "Wohnzimmer + #2", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": + 12, "y": 10, "w": 12, "h": 9}, "targets": [{"expr": "homeassistant_climate_target_temperature_celsius{entity=\"climate.home_wohnzimmer_2_og\"}", + "legendFormat": "\ud83c\udfaf Target"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_wohnzimmer_2_thermostat_temperature\"}", + "legendFormat": "\ud83c\udf21\ufe0f Thermostat"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_wohnzimmer_2_temperature\"}", + "legendFormat": "\ud83d\udd25 Heater"}, {"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_wohnzimmer_2_thermostat_humidity\"}", + "legendFormat": "\ud83d\udca7 Humidity"}], "fieldConfig": {"defaults": {"unit": + "celsius", "custom": {"spanNulls": true}}, "overrides": [{"matcher": {"id": "byName", + "options": "\ud83c\udfaf Target"}, "properties": [{"id": "custom.lineStyle", "value": + {"fill": "dash", "dash": [10, 10]}}, {"id": "color", "value": {"fixedColor": "dark-orange", + "mode": "fixed"}}, {"id": "custom.lineWidth", "value": 3}]}, {"matcher": {"id": + "byName", "options": "\ud83c\udf21\ufe0f Thermostat"}, "properties": [{"id": "color", + "value": {"fixedColor": "orange", "mode": "fixed"}}, {"id": "custom.lineWidth", + "value": 2}]}, {"matcher": {"id": "byRegexp", "options": ".*Heater.*"}, "properties": + [{"id": "custom.lineStyle", "value": {"fill": "dash", "dash": [2, 5]}}, {"id": + "color", "value": {"fixedColor": "red", "mode": "fixed"}}]}, {"matcher": {"id": + "byName", "options": "\ud83d\udca7 Humidity"}, "properties": [{"id": "custom.axisPlacement", + "value": "right"}, {"id": "unit", "value": "percent"}, {"id": "custom.fillOpacity", + "value": 10}, {"id": "custom.lineWidth", "value": 1}, {"id": "color", "value": + {"fixedColor": "blue", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": + "table", "placement": "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip": + {"mode": "multi", "sort": "desc"}}}, {"type": "timeseries", "title": "Arbeitszimmer", + "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0, + "y": 19, "w": 12, "h": 9}, "targets": [{"expr": "homeassistant_climate_target_temperature_celsius{entity=\"climate.home_arbeitszimmer_og\"}", + "legendFormat": "\ud83c\udfaf Target"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_arbeitszimmer_thermostat_temperature\"}", + "legendFormat": "\ud83c\udf21\ufe0f Thermostat"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_arbeitszimmer_temperature\"}", + "legendFormat": "\ud83d\udd25 Heater"}, {"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_arbeitszimmer_thermostat_humidity\"}", + "legendFormat": "\ud83d\udca7 Humidity"}], "fieldConfig": {"defaults": {"unit": + "celsius", "custom": {"spanNulls": true}}, "overrides": [{"matcher": {"id": "byName", + "options": "\ud83c\udfaf Target"}, "properties": [{"id": "custom.lineStyle", "value": + {"fill": "dash", "dash": [10, 10]}}, {"id": "color", "value": {"fixedColor": "dark-orange", + "mode": "fixed"}}, {"id": "custom.lineWidth", "value": 3}]}, {"matcher": {"id": + "byName", "options": "\ud83c\udf21\ufe0f Thermostat"}, "properties": [{"id": "color", + "value": {"fixedColor": "orange", "mode": "fixed"}}, {"id": "custom.lineWidth", + "value": 2}]}, {"matcher": {"id": "byRegexp", "options": ".*Heater.*"}, "properties": + [{"id": "custom.lineStyle", "value": {"fill": "dash", "dash": [2, 5]}}, {"id": + "color", "value": {"fixedColor": "red", "mode": "fixed"}}]}, {"matcher": {"id": + "byName", "options": "\ud83d\udca7 Humidity"}, "properties": [{"id": "custom.axisPlacement", + "value": "right"}, {"id": "unit", "value": "percent"}, {"id": "custom.fillOpacity", + "value": 10}, {"id": "custom.lineWidth", "value": 1}, {"id": "color", "value": + {"fixedColor": "blue", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": + "table", "placement": "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip": + {"mode": "multi", "sort": "desc"}}}, {"type": "timeseries", "title": "K\u00fcche", + "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 12, + "y": 19, "w": 12, "h": 9}, "targets": [{"expr": "homeassistant_climate_target_temperature_celsius{entity=\"climate.home_kuche\"}", + "legendFormat": "\ud83c\udfaf Target"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_kuche_wandthermostat_temperature\"}", + "legendFormat": "\ud83c\udf21\ufe0f Thermostat"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_kuche_vorne_temperature\"}", + "legendFormat": "\ud83d\udd25 Heater 1"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_kuche_bar_temperature\"}", + "legendFormat": "\ud83d\udd25 Heater 2"}, {"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_kuche_wandthermostat_humidity\"}", + "legendFormat": "\ud83d\udca7 Humidity"}], "fieldConfig": {"defaults": {"unit": + "celsius", "custom": {"spanNulls": true}}, "overrides": [{"matcher": {"id": "byName", + "options": "\ud83c\udfaf Target"}, "properties": [{"id": "custom.lineStyle", "value": + {"fill": "dash", "dash": [10, 10]}}, {"id": "color", "value": {"fixedColor": "dark-orange", + "mode": "fixed"}}, {"id": "custom.lineWidth", "value": 3}]}, {"matcher": {"id": + "byName", "options": "\ud83c\udf21\ufe0f Thermostat"}, "properties": [{"id": "color", + "value": {"fixedColor": "orange", "mode": "fixed"}}, {"id": "custom.lineWidth", + "value": 2}]}, {"matcher": {"id": "byRegexp", "options": ".*Heater.*"}, "properties": + [{"id": "custom.lineStyle", "value": {"fill": "dash", "dash": [2, 5]}}, {"id": + "color", "value": {"fixedColor": "red", "mode": "fixed"}}]}, {"matcher": {"id": + "byName", "options": "\ud83d\udca7 Humidity"}, "properties": [{"id": "custom.axisPlacement", + "value": "right"}, {"id": "unit", "value": "percent"}, {"id": "custom.fillOpacity", + "value": 10}, {"id": "custom.lineWidth", "value": 1}, {"id": "color", "value": + {"fixedColor": "blue", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": + "table", "placement": "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip": + {"mode": "multi", "sort": "desc"}}}, {"type": "timeseries", "title": "Badezimmer", + "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0, + "y": 28, "w": 12, "h": 9}, "targets": [{"expr": "homeassistant_climate_target_temperature_celsius{entity=\"climate.home_badezimmer\"}", + "legendFormat": "\ud83c\udfaf Target"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_wandthermostat_bad_temperature\"}", + "legendFormat": "\ud83c\udf21\ufe0f Thermostat"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_badezimmer_thermostat_temperature\"}", + "legendFormat": "\ud83d\udd25 Heater"}, {"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_wandthermostat_bad_humidity\"}", + "legendFormat": "\ud83d\udca7 Humidity"}], "fieldConfig": {"defaults": {"unit": + "celsius", "custom": {"spanNulls": true}}, "overrides": [{"matcher": {"id": "byName", + "options": "\ud83c\udfaf Target"}, "properties": [{"id": "custom.lineStyle", "value": + {"fill": "dash", "dash": [10, 10]}}, {"id": "color", "value": {"fixedColor": "dark-orange", + "mode": "fixed"}}, {"id": "custom.lineWidth", "value": 3}]}, {"matcher": {"id": + "byName", "options": "\ud83c\udf21\ufe0f Thermostat"}, "properties": [{"id": "color", + "value": {"fixedColor": "orange", "mode": "fixed"}}, {"id": "custom.lineWidth", + "value": 2}]}, {"matcher": {"id": "byRegexp", "options": ".*Heater.*"}, "properties": + [{"id": "custom.lineStyle", "value": {"fill": "dash", "dash": [2, 5]}}, {"id": + "color", "value": {"fixedColor": "red", "mode": "fixed"}}]}, {"matcher": {"id": + "byName", "options": "\ud83d\udca7 Humidity"}, "properties": [{"id": "custom.axisPlacement", + "value": "right"}, {"id": "unit", "value": "percent"}, {"id": "custom.fillOpacity", + "value": 10}, {"id": "custom.lineWidth", "value": 1}, {"id": "color", "value": + {"fixedColor": "blue", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": + "table", "placement": "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip": + {"mode": "multi", "sort": "desc"}}}, {"type": "row", "title": "\ud83c\udf21\ufe0f + Current State", "gridPos": {"x": 0, "y": 37, "w": 24, "h": 1}, "collapsed": false}, + {"type": "stat", "title": "Wohnzimmer Temp", "datasource": {"type": "prometheus", + "uid": "prometheus"}, "gridPos": {"x": 2, "y": 38, "w": 4, "h": 4}, "targets": + [{"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_wall_mounted_thermostat_pro_temperature\"}", + "legendFormat": "Temp"}], "fieldConfig": {"defaults": {"unit": "celsius", "decimals": + 1, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps": + [{"color": "blue", "value": null}, {"color": "green", "value": 18}, {"color": + "orange", "value": 22}, {"color": "red", "value": 26}]}}}, "options": {"graphMode": + "area", "colorMode": "background", "reduceOptions": {"values": false, "calcs": + ["lastNotNull"]}}}, {"type": "stat", "title": "Wohnzimmer #2 Temp", "datasource": + {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 6, "y": 38, "w": + 4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_wohnzimmer_2_thermostat_temperature\"}", + "legendFormat": "Temp"}], "fieldConfig": {"defaults": {"unit": "celsius", "decimals": + 1, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps": + [{"color": "blue", "value": null}, {"color": "green", "value": 18}, {"color": + "orange", "value": 22}, {"color": "red", "value": 26}]}}}, "options": {"graphMode": + "area", "colorMode": "background", "reduceOptions": {"values": false, "calcs": + ["lastNotNull"]}}}, {"type": "stat", "title": "Arbeitszimmer Temp", "datasource": + {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 10, "y": 38, "w": + 4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_arbeitszimmer_thermostat_temperature\"}", + "legendFormat": "Temp"}], "fieldConfig": {"defaults": {"unit": "celsius", "decimals": + 1, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps": + [{"color": "blue", "value": null}, {"color": "green", "value": 18}, {"color": + "orange", "value": 22}, {"color": "red", "value": 26}]}}}, "options": {"graphMode": + "area", "colorMode": "background", "reduceOptions": {"values": false, "calcs": + ["lastNotNull"]}}}, {"type": "stat", "title": "K\u00fcche Temp", "datasource": + {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 14, "y": 38, "w": + 4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_kuche_wandthermostat_temperature\"}", + "legendFormat": "Temp"}], "fieldConfig": {"defaults": {"unit": "celsius", "decimals": + 1, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps": + [{"color": "blue", "value": null}, {"color": "green", "value": 18}, {"color": + "orange", "value": 22}, {"color": "red", "value": 26}]}}}, "options": {"graphMode": + "area", "colorMode": "background", "reduceOptions": {"values": false, "calcs": + ["lastNotNull"]}}}, {"type": "stat", "title": "Badezimmer Temp", "datasource": + {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 18, "y": 38, "w": + 4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_wandthermostat_bad_temperature\"}", + "legendFormat": "Temp"}], "fieldConfig": {"defaults": {"unit": "celsius", "decimals": + 1, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps": + [{"color": "blue", "value": null}, {"color": "green", "value": 18}, {"color": + "orange", "value": 22}, {"color": "red", "value": 26}]}}}, "options": {"graphMode": + "area", "colorMode": "background", "reduceOptions": {"values": false, "calcs": + ["lastNotNull"]}}}, {"type": "stat", "title": "Wohnzimmer Hum", "datasource": + {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 2, "y": 42, "w": + 4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_wall_mounted_thermostat_pro_humidity\"}", + "legendFormat": "Humidity"}], "fieldConfig": {"defaults": {"unit": "percent", + "decimals": 0, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", + "steps": [{"color": "red", "value": null}, {"color": "orange", "value": 30}, {"color": + "green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value": + 70}]}}}, "options": {"graphMode": "area", "colorMode": "background", "reduceOptions": + {"values": false, "calcs": ["lastNotNull"]}}}, {"type": "stat", "title": "Wohnzimmer + #2 Hum", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": + {"x": 6, "y": 42, "w": 4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_wohnzimmer_2_thermostat_humidity\"}", + "legendFormat": "Humidity"}], "fieldConfig": {"defaults": {"unit": "percent", + "decimals": 0, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", + "steps": [{"color": "red", "value": null}, {"color": "orange", "value": 30}, {"color": + "green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value": + 70}]}}}, "options": {"graphMode": "area", "colorMode": "background", "reduceOptions": + {"values": false, "calcs": ["lastNotNull"]}}}, {"type": "stat", "title": "Arbeitszimmer + Hum", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": + 10, "y": 42, "w": 4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_arbeitszimmer_thermostat_humidity\"}", + "legendFormat": "Humidity"}], "fieldConfig": {"defaults": {"unit": "percent", + "decimals": 0, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", + "steps": [{"color": "red", "value": null}, {"color": "orange", "value": 30}, {"color": + "green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value": + 70}]}}}, "options": {"graphMode": "area", "colorMode": "background", "reduceOptions": + {"values": false, "calcs": ["lastNotNull"]}}}, {"type": "stat", "title": "K\u00fcche + Hum", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": + 14, "y": 42, "w": 4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_kuche_wandthermostat_humidity\"}", + "legendFormat": "Humidity"}], "fieldConfig": {"defaults": {"unit": "percent", + "decimals": 0, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", + "steps": [{"color": "red", "value": null}, {"color": "orange", "value": 30}, {"color": + "green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value": + 70}]}}}, "options": {"graphMode": "area", "colorMode": "background", "reduceOptions": + {"values": false, "calcs": ["lastNotNull"]}}}, {"type": "stat", "title": "Badezimmer + Hum", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": + 18, "y": 42, "w": 4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_wandthermostat_bad_humidity\"}", + "legendFormat": "Humidity"}], "fieldConfig": {"defaults": {"unit": "percent", + "decimals": 0, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", + "steps": [{"color": "red", "value": null}, {"color": "orange", "value": 30}, {"color": + "green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value": + 70}]}}}, "options": {"graphMode": "area", "colorMode": "background", "reduceOptions": + {"values": false, "calcs": ["lastNotNull"]}}}]}' kind: ConfigMap metadata: - name: grafana-dashboard-home-climate - namespace: monitoring + annotations: + grafana_dashboard_folder: "\U0001F3E0 Home" labels: grafana_dashboard: '1' - annotations: - grafana_dashboard_folder: 🏠 Home -data: - home-climate.json: '{"uid": "home-climate", "title": "🏠 Home Climate", "tags": ["home", "climate", "temperature", "humidity", "auto-generated"], "timezone": "browser", "schemaVersion": 39, "version": - 1, "refresh": "5m", "editable": false, "graphTooltip": 1, "time": {"from": "now-24h", "to": "now"}, "panels": [{"title": "🌡️ Current Temperatures", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, - "y": 0}, "collapsed": false}, {"title": "Wohnzimmer", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 0, "y": 1}, "fieldConfig": {"defaults": - {"unit": "celsius", "decimals": 1, "thresholds": {"mode": "absolute", "steps": [{"color": "blue", "value": null}, {"color": "green", "value": 18}, {"color": "orange", "value": 22}, {"color": "red", - "value": 26}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": - [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: - (r) => r.entity_id == \"home_wall_mounted_thermostat_pro_temperature\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, - {"title": "Wohnzimmer #2", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 4, "y": 1}, "fieldConfig": {"defaults": {"unit": "celsius", - "decimals": 1, "thresholds": {"mode": "absolute", "steps": [{"color": "blue", "value": null}, {"color": "green", "value": 18}, {"color": "orange", "value": 22}, {"color": "red", "value": 26}]}, "color": - {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: - \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == - \"home_wohnzimmer_2_thermostat_temperature\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Arbeitszimmer", - "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 8, "y": 1}, "fieldConfig": {"defaults": {"unit": "celsius", "decimals": 1, "thresholds": - {"mode": "absolute", "steps": [{"color": "blue", "value": null}, {"color": "green", "value": 18}, {"color": "orange", "value": 22}, {"color": "red", "value": 26}]}, "color": {"mode": "thresholds"}}}, - "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> - range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_arbeitszimmer_thermostat_temperature\")\n |> - aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Küche", "type": "stat", "datasource": {"type": "influxdb", - "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 12, "y": 1}, "fieldConfig": {"defaults": {"unit": "celsius", "decimals": 1, "thresholds": {"mode": "absolute", "steps": [{"color": "blue", - "value": null}, {"color": "green", "value": 18}, {"color": "orange", "value": 22}, {"color": "red", "value": 26}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", - "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> - filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_kuche_wandthermostat_temperature\")\n |> aggregateWindow(every: v.windowPeriod, - fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Bad", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": - {"h": 4, "w": 4, "x": 16, "y": 1}, "fieldConfig": {"defaults": {"unit": "celsius", "decimals": 1, "thresholds": {"mode": "absolute", "steps": [{"color": "blue", "value": null}, {"color": "green", "value": - 18}, {"color": "orange", "value": 22}, {"color": "red", "value": 26}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": - {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] - == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wandthermostat_bad_temperature\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> - yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "📈 Temperature Trends", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 5}, "collapsed": false}, {"title": "All Rooms Temperature", - "type": "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 10, "w": 16, "x": 0, "y": 6}, "fieldConfig": {"defaults": {"unit": "celsius", "custom": {"lineWidth": - 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}}, "options": {"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["mean", "lastNotNull", "min", "max"]}, "tooltip": {"mode": - "multi", "sort": "desc"}}, "targets": [{"refId": "Wo", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == - \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wall_mounted_thermostat_pro_temperature\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> - set(key: \"room\", value: \"Wohnzimmer\")\n |> yield(name: \"mean\")", "resultFormat": "time_series"}, {"refId": "Wo2", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: - v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wohnzimmer_2_thermostat_temperature\")\n |> aggregateWindow(every: - v.windowPeriod, fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Wohnzimmer #2\")\n |> yield(name: \"mean\")", "resultFormat": "time_series"}, {"refId": "Ar", "query": "from(bucket: - \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == - \"home_arbeitszimmer_thermostat_temperature\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Arbeitszimmer\")\n |> yield(name: \"mean\")", - "resultFormat": "time_series"}, {"refId": "Kü", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" - and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_kuche_wandthermostat_temperature\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Küche\")\n |> yield(name: - \"mean\")", "resultFormat": "time_series"}, {"refId": "Ba", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> - filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wandthermostat_bad_temperature\")\n |> aggregateWindow(every: v.windowPeriod, - fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Bad\")\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Indoor vs Outdoor", "type": "timeseries", "datasource": - {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 10, "w": 8, "x": 16, "y": 6}, "fieldConfig": {"defaults": {"unit": "celsius", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": - true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options": "Outdoor"}, "properties": [{"id": "color", "value": {"fixedColor": "light-blue", "mode": "fixed"}}, {"id": "custom.lineStyle", - "value": {"fill": "dash", "dash": [10, 5]}}]}, {"matcher": {"id": "byName", "options": "Indoor Avg"}, "properties": [{"id": "color", "value": {"fixedColor": "orange", "mode": "fixed"}}]}]}, "options": - {"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "OUT", "query": "from(bucket: \"default\")\n |> - range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_temperatur\")\n |> - aggregateWindow(every: 1h, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")\n |> set(key: \"location\", value: \"Outdoor\")", "resultFormat": "time_series"}, {"refId": "IN", "query": "from(bucket: - \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id =~ - /^home_/)\n |> aggregateWindow(every: 1h, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")\n |> group()\n |> mean()\n |> set(key: \"location\", value: \"Indoor Avg\")", "resultFormat": - "time_series"}]}, {"title": "💧 Humidity", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 16}, "collapsed": false}, {"title": "Wohnzimmer", "type": "stat", "datasource": {"type": "influxdb", - "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 0, "y": 17}, "fieldConfig": {"defaults": {"unit": "percent", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "red", - "value": null}, {"color": "orange", "value": 30}, {"color": "green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value": 70}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": - "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, - stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wall_mounted_thermostat_pro_humidity\")\n |> - aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Arbeitszimmer", "type": "stat", "datasource": {"type": - "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 4, "y": 17}, "fieldConfig": {"defaults": {"unit": "percent", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": - "red", "value": null}, {"color": "orange", "value": 30}, {"color": "green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value": 70}]}, "color": {"mode": "thresholds"}}}, "options": - {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: - v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_arbeitszimmer_thermostat_humidity\")\n |> - aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Wohnzimmer #2", "type": "stat", "datasource": {"type": - "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 8, "y": 17}, "fieldConfig": {"defaults": {"unit": "percent", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": - "red", "value": null}, {"color": "orange", "value": 30}, {"color": "green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value": 70}]}, "color": {"mode": "thresholds"}}}, "options": - {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: - v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wohnzimmer_2_thermostat_humidity\")\n |> - aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Bad", "type": "stat", "datasource": {"type": "influxdb", - "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 12, "y": 17}, "fieldConfig": {"defaults": {"unit": "percent", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "red", - "value": null}, {"color": "orange", "value": 30}, {"color": "green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value": 70}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": - "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, - stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wandthermostat_bad_humidity\")\n |> aggregateWindow(every: - v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Küche", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, - "gridPos": {"h": 4, "w": 4, "x": 16, "y": 17}, "fieldConfig": {"defaults": {"unit": "percent", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": - "orange", "value": 30}, {"color": "green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value": 70}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": - "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> - filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_kuche_wandthermostat_humidity\")\n |> aggregateWindow(every: v.windowPeriod, - fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Humidity Trends", "type": "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, - "gridPos": {"h": 8, "w": 24, "x": 0, "y": 20}, "fieldConfig": {"defaults": {"unit": "percent", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}}, "options": {"legend": - {"displayMode": "table", "placement": "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "Wo", "query": "from(bucket: \"default\")\n |> - range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wall_mounted_thermostat_pro_humidity\")\n |> - aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Wohnzimmer\")\n |> yield(name: \"mean\")", "resultFormat": "time_series"}, {"refId": "Ar", "query": - "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id - == \"home_arbeitszimmer_thermostat_humidity\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Arbeitszimmer\")\n |> yield(name: \"mean\")", - "resultFormat": "time_series"}, {"refId": "Wo2", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and - r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wohnzimmer_2_thermostat_humidity\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Wohnzimmer #2\")\n |> yield(name: - \"mean\")", "resultFormat": "time_series"}, {"refId": "Ba", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> - filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wandthermostat_bad_humidity\")\n |> aggregateWindow(every: v.windowPeriod, - fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Bad\")\n |> yield(name: \"mean\")", "resultFormat": "time_series"}, {"refId": "Kü", "query": "from(bucket: \"default\")\n |> range(start: - v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_kuche_wandthermostat_humidity\")\n |> - aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Küche\")\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}]}' + name: grafana-dashboard-home-climate + namespace: monitoring diff --git a/k8s/monitoring/dashboards/grafana-dashboard-outdoor-weather.yaml b/k8s/monitoring/dashboards/grafana-dashboard-outdoor-weather.yaml index 1fa264f..ac2b2b2 100644 --- a/k8s/monitoring/dashboards/grafana-dashboard-outdoor-weather.yaml +++ b/k8s/monitoring/dashboards/grafana-dashboard-outdoor-weather.yaml @@ -1,75 +1,125 @@ apiVersion: v1 +data: + outdoor-weather.json: '{"uid": "outdoor-weather", "title": "\ud83c\udf21\ufe0f Outdoor + & Weather", "tags": ["home", "weather", "outdoor", "auto-generated"], "timezone": + "browser", "schemaVersion": 39, "version": 1, "refresh": "5m", "editable": false, + "graphTooltip": 1, "time": {"from": "now-24h", "to": "now"}, "panels": [{"title": + "\ud83c\udf24\ufe0f Current Conditions", "type": "row", "gridPos": {"h": 1, "w": + 24, "x": 0, "y": 0}, "collapsed": false}, {"title": "\ud83c\udf21\ufe0f Temperature", + "type": "stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": + {"h": 4, "w": 4, "x": 0, "y": 1}, "fieldConfig": {"defaults": {"unit": "celsius", + "decimals": 1, "thresholds": {"mode": "absolute", "steps": [{"color": "#5794F2", + "value": null}, {"color": "#73BF69", "value": 0}, {"color": "#FFD700", "value": + 15}, {"color": "#FF7383", "value": 25}, {"color": "#C4162A", "value": 30}]}, "color": + {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", + "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, + "targets": [{"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.regensburg_regensburg_temperatur\"}", + "format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udca7 Humidity", "type": + "stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": + {"h": 4, "w": 4, "x": 4, "y": 1}, "fieldConfig": {"defaults": {"unit": "percent", + "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#FF7383", + "value": null}, {"color": "#FFD700", "value": 30}, {"color": "#73BF69", "value": + 40}, {"color": "#FFD700", "value": 70}, {"color": "#5794F2", "value": 90}]}, "color": + {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", + "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, + "targets": [{"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.regensburg_regensburg_luftfeuchtigkeit\"}", + "format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udd35 Pressure", "type": + "stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": + {"h": 4, "w": 4, "x": 8, "y": 1}, "fieldConfig": {"defaults": {"unit": "pressurehpa", + "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#FF7383", + "value": null}, {"color": "#FFD700", "value": 990}, {"color": "#73BF69", "value": + 1010}, {"color": "#FFD700", "value": 1030}, {"color": "#FF7383", "value": 1040}]}, + "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": + "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": + ["lastNotNull"]}}, "targets": [{"expr": "homeassistant_sensor_pressure_hpa{entity=\"sensor.regensburg_regensburg_druck\"}", + "format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udca8 Wind", "type": + "stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": + {"h": 4, "w": 4, "x": 12, "y": 1}, "fieldConfig": {"defaults": {"unit": "velocitykmh", + "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#73BF69", + "value": null}, {"color": "#FFD700", "value": 20}, {"color": "#FF7383", "value": + 40}, {"color": "#C4162A", "value": 60}]}, "color": {"mode": "thresholds"}}}, "options": + {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": + {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"expr": "homeassistant_sensor_wind_speed_km_per_h{entity=\"sensor.regensburg_regensburg_windgeschwindigkeit\"}", + "format": "time_series", "refId": "A"}]}, {"title": "\ud83c\udf27\ufe0f Rain", + "type": "stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": + {"h": 4, "w": 4, "x": 16, "y": 1}, "fieldConfig": {"defaults": {"unit": "mm/h", + "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#73BF69", + "value": null}, {"color": "#5794F2", "value": 0.1}, {"color": "#1F60C4", "value": + 1}, {"color": "#3274D9", "value": 5}]}, "color": {"mode": "thresholds"}}}, "options": + {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": + {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"expr": "homeassistant_sensor_precipitation_intensity_mm_per_h{entity=\"sensor.regensburg_regensburg_niederschlag\"}", + "format": "time_series", "refId": "A"}]}, {"title": "\u2601\ufe0f Cloud Cover", + "type": "gauge", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": + {"h": 4, "w": 4, "x": 20, "y": 1}, "fieldConfig": {"defaults": {"unit": "percent", + "decimals": 0, "min": 0, "max": 100, "thresholds": {"mode": "absolute", "steps": + [{"color": "#5794F2", "value": null}, {"color": "#73BF69", "value": 20}, {"color": + "#FFD700", "value": 50}, {"color": "#808080", "value": 80}]}, "color": {"mode": + "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}, + "orientation": "auto", "showThresholdLabels": true, "showThresholdMarkers": true}, + "targets": [{"expr": "homeassistant_sensor_unit_percent{entity=\"sensor.regensburg_regensburg_bewolkungsgrad\"}", + "format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udcc8 Temperature + & Humidity Trend", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 5}, + "collapsed": false}, {"title": "Temperature", "type": "timeseries", "datasource": + {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"h": 8, "w": 12, "x": + 0, "y": 6}, "fieldConfig": {"defaults": {"unit": "celsius", "custom": {"lineWidth": + 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": + [{"matcher": {"id": "byName", "options": "Temperature"}, "properties": [{"id": + "color", "value": {"fixedColor": "#FF7383", "mode": "fixed"}}]}]}, "options": + {"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["min", "max", + "mean"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": + "T", "expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.regensburg_regensburg_temperatur\"}", + "format": "time_series"}]}, {"title": "Humidity", "type": "timeseries", "datasource": + {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"h": 8, "w": 12, "x": + 12, "y": 6}, "fieldConfig": {"defaults": {"unit": "percent", "custom": {"lineWidth": + 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": + [{"matcher": {"id": "byName", "options": "Humidity"}, "properties": [{"id": "color", + "value": {"fixedColor": "#5794F2", "mode": "fixed"}}]}]}, "options": {"legend": + {"displayMode": "table", "placement": "bottom", "calcs": ["min", "max", "mean"]}, + "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "H", "expr": + "homeassistant_sensor_humidity_percent{entity=\"sensor.regensburg_regensburg_luftfeuchtigkeit\"}", + "format": "time_series"}]}, {"title": "\ud83d\udcca Pressure & Wind", "type": + "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 14}, "collapsed": false}, {"title": + "Pressure", "type": "timeseries", "datasource": {"type": "prometheus", "uid": + "prometheus"}, "gridPos": {"h": 8, "w": 12, "x": 0, "y": 15}, "fieldConfig": {"defaults": + {"unit": "pressurehpa", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": + true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options": + "Pressure"}, "properties": [{"id": "color", "value": {"fixedColor": "#8F3BB8", + "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": + "bottom", "calcs": ["min", "max", "mean"]}, "tooltip": {"mode": "multi", "sort": + "desc"}}, "targets": [{"refId": "P", "expr": "homeassistant_sensor_pressure_hpa{entity=\"sensor.regensburg_regensburg_druck\"}", + "format": "time_series"}]}, {"title": "Wind Speed", "type": "timeseries", "datasource": + {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"h": 8, "w": 12, "x": + 12, "y": 15}, "fieldConfig": {"defaults": {"unit": "velocitykmh", "custom": {"lineWidth": + 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": + [{"matcher": {"id": "byName", "options": "Wind"}, "properties": [{"id": "color", + "value": {"fixedColor": "#5794F2", "mode": "fixed"}}]}]}, "options": {"legend": + {"displayMode": "table", "placement": "bottom", "calcs": ["max", "mean"]}, "tooltip": + {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "W", "expr": "homeassistant_sensor_wind_speed_km_per_h{entity=\"sensor.regensburg_regensburg_windgeschwindigkeit\"}", + "format": "time_series"}]}, {"title": "\ud83c\udf27\ufe0f Precipitation & Cloud", + "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 23}, "collapsed": false}, + {"title": "Rain", "type": "timeseries", "datasource": {"type": "prometheus", "uid": + "prometheus"}, "gridPos": {"h": 8, "w": 12, "x": 0, "y": 24}, "fieldConfig": {"defaults": + {"unit": "mm/h", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, + "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options": + "Rain"}, "properties": [{"id": "color", "value": {"fixedColor": "#3274D9", "mode": + "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": "bottom", + "calcs": ["mean", "lastNotNull"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, + "targets": [{"refId": "R", "expr": "homeassistant_sensor_precipitation_intensity_mm_per_h{entity=\"sensor.regensburg_regensburg_niederschlag\"}", + "format": "time_series"}]}, {"title": "Cloud Cover", "type": "timeseries", "datasource": + {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"h": 8, "w": 12, "x": + 12, "y": 24}, "fieldConfig": {"defaults": {"unit": "percent", "custom": {"lineWidth": + 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": + [{"matcher": {"id": "byName", "options": "Cloud Cover"}, "properties": [{"id": + "color", "value": {"fixedColor": "#808080", "mode": "fixed"}}]}]}, "options": + {"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["mean"]}, + "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "C", "expr": + "homeassistant_sensor_unit_percent{entity=\"sensor.regensburg_regensburg_bewolkungsgrad\"}", + "format": "time_series"}]}]}' kind: ConfigMap metadata: - name: grafana-dashboard-outdoor-weather - namespace: monitoring + annotations: + grafana_dashboard_folder: "\U0001F3E0 Home" labels: grafana_dashboard: '1' - annotations: - grafana_dashboard_folder: 🏠 Home -data: - outdoor-weather.json: '{"uid": "outdoor-weather", "title": "🌡️ Outdoor & Weather", "tags": ["home", "weather", "outdoor", "auto-generated"], "timezone": "browser", "schemaVersion": 39, "version": 1, "refresh": - "5m", "editable": false, "graphTooltip": 1, "time": {"from": "now-24h", "to": "now"}, "panels": [{"title": "🌤️ Current Conditions", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 0}, "collapsed": - false}, {"title": "🌡️ Temperature", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 0, "y": 1}, "fieldConfig": {"defaults": {"unit": - "celsius", "decimals": 1, "thresholds": {"mode": "absolute", "steps": [{"color": "#5794F2", "value": null}, {"color": "#73BF69", "value": 0}, {"color": "#FFD700", "value": 15}, {"color": "#FF7383", - "value": 25}, {"color": "#C4162A", "value": 30}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, - "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] - == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_temperatur\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": - "time_series"}]}, {"title": "💧 Humidity", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 4, "y": 1}, "fieldConfig": {"defaults": {"unit": - "percent", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#FF7383", "value": null}, {"color": "#FFD700", "value": 30}, {"color": "#73BF69", "value": 40}, {"color": "#FFD700", - "value": 70}, {"color": "#5794F2", "value": 90}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, - "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] - == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_luftfeuchtigkeit\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", - "resultFormat": "time_series"}]}, {"title": "🔵 Pressure", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 8, "y": 1}, "fieldConfig": - {"defaults": {"unit": "pressurehpa", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#FF7383", "value": null}, {"color": "#FFD700", "value": 990}, {"color": "#73BF69", "value": - 1010}, {"color": "#FFD700", "value": 1030}, {"color": "#FF7383", "value": 1040}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", - "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] - == \"hPa\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_druck\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: - \"mean\")", "resultFormat": "time_series"}]}, {"title": "💨 Wind", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 12, "y": 1}, "fieldConfig": - {"defaults": {"unit": "velocitykmh", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#73BF69", "value": null}, {"color": "#FFD700", "value": 20}, {"color": "#FF7383", "value": - 40}, {"color": "#C4162A", "value": 60}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": - ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"km/h\" and r[\"_field\"] - == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_windgeschwindigkeit\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", - "resultFormat": "time_series"}]}, {"title": "🌧️ Rain", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 16, "y": 1}, "fieldConfig": {"defaults": - {"unit": "mm/h", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#73BF69", "value": null}, {"color": "#5794F2", "value": 0.1}, {"color": "#1F60C4", "value": 1}, {"color": "#3274D9", - "value": 5}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": - [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"mm/h\" and r[\"_field\"] == \"value\")\n |> filter(fn: - (r) => r.entity_id == \"regensburg_regensburg_niederschlag\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, - {"title": "☁️ Cloud Cover", "type": "gauge", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 20, "y": 1}, "fieldConfig": {"defaults": {"unit": "percent", - "decimals": 0, "min": 0, "max": 100, "thresholds": {"mode": "absolute", "steps": [{"color": "#5794F2", "value": null}, {"color": "#73BF69", "value": 20}, {"color": "#FFD700", "value": 50}, {"color": - "#808080", "value": 80}]}, "color": {"mode": "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}, "orientation": "auto", "showThresholdLabels": true, "showThresholdMarkers": - true}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: -15m)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id - == \"regensburg_regensburg_bewolkungsgrad\")\n |> last()\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "📈 Temperature & Humidity Trend", "type": "row", "gridPos": {"h": - 1, "w": 24, "x": 0, "y": 5}, "collapsed": false}, {"title": "Temperature", "type": "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 8, "w": 12, "x": 0, - "y": 6}, "fieldConfig": {"defaults": {"unit": "celsius", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options": - "Temperature"}, "properties": [{"id": "color", "value": {"fixedColor": "#FF7383", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["min", "max", - "mean"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "T", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) - => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_temperatur\")\n |> aggregateWindow(every: 30m, fn: mean, createEmpty: - false)\n |> yield(name: \"mean\") |> set(key: \"metric\", value: \"Temperature\")", "resultFormat": "time_series"}]}, {"title": "Humidity", "type": "timeseries", "datasource": {"type": "influxdb", - "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 8, "w": 12, "x": 12, "y": 6}, "fieldConfig": {"defaults": {"unit": "percent", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, "showPoints": - "never"}}, "overrides": [{"matcher": {"id": "byName", "options": "Humidity"}, "properties": [{"id": "color", "value": {"fixedColor": "#5794F2", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": - "table", "placement": "bottom", "calcs": ["min", "max", "mean"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "H", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, - stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_luftfeuchtigkeit\")\n |> aggregateWindow(every: - 30m, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"metric\", value: \"Humidity\")", "resultFormat": "time_series"}]}, {"title": "📊 Pressure & Wind", "type": "row", "gridPos": - {"h": 1, "w": 24, "x": 0, "y": 14}, "collapsed": false}, {"title": "Pressure", "type": "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 8, "w": 12, "x": - 0, "y": 15}, "fieldConfig": {"defaults": {"unit": "pressurehpa", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options": - "Pressure"}, "properties": [{"id": "color", "value": {"fixedColor": "#8F3BB8", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["min", "max", "mean"]}, - "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "P", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] - == \"hPa\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_druck\")\n |> aggregateWindow(every: 30m, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> - set(key: \"metric\", value: \"Pressure\")", "resultFormat": "time_series"}]}, {"title": "Wind Speed", "type": "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": - {"h": 8, "w": 12, "x": 12, "y": 15}, "fieldConfig": {"defaults": {"unit": "velocitykmh", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": [{"matcher": - {"id": "byName", "options": "Wind"}, "properties": [{"id": "color", "value": {"fixedColor": "#5794F2", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": "bottom", "calcs": - ["max", "mean"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "W", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: - (r) => r[\"_measurement\"] == \"km/h\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_windgeschwindigkeit\")\n |> aggregateWindow(every: 30m, fn: mean, - createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"metric\", value: \"Wind\")", "resultFormat": "time_series"}]}, {"title": "🌧️ Precipitation & Cloud", "type": "row", "gridPos": {"h": 1, - "w": 24, "x": 0, "y": 23}, "collapsed": false}, {"title": "Rain", "type": "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 8, "w": 12, "x": 0, "y": 24}, - "fieldConfig": {"defaults": {"unit": "mm/h", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options": "Rain"}, "properties": - [{"id": "color", "value": {"fixedColor": "#3274D9", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip": {"mode": - "multi", "sort": "desc"}}, "targets": [{"refId": "R", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"mm/h\" - and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_niederschlag\")\n |> aggregateWindow(every: 30m, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> - set(key: \"metric\", value: \"Rain\")", "resultFormat": "time_series"}]}, {"title": "Cloud Cover", "type": "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": - 8, "w": 12, "x": 12, "y": 24}, "fieldConfig": {"defaults": {"unit": "percent", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": - "byName", "options": "Cloud Cover"}, "properties": [{"id": "color", "value": {"fixedColor": "#808080", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": "bottom", "calcs": - ["mean"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "C", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: - (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_bewolkungsgrad\")\n |> aggregateWindow(every: 30m, fn: mean, createEmpty: - false)\n |> yield(name: \"mean\") |> set(key: \"metric\", value: \"Cloud Cover\")", "resultFormat": "time_series"}]}]}' + name: grafana-dashboard-outdoor-weather + namespace: monitoring diff --git a/k8s/monitoring/fritzbox-exporter.secret.yaml b/k8s/monitoring/fritzbox-exporter.secret.yaml new file mode 100644 index 0000000..4867bf1 Binary files /dev/null and b/k8s/monitoring/fritzbox-exporter.secret.yaml differ diff --git a/k8s/monitoring/fritzbox-exporter.yaml b/k8s/monitoring/fritzbox-exporter.yaml new file mode 100644 index 0000000..32d760c --- /dev/null +++ b/k8s/monitoring/fritzbox-exporter.yaml @@ -0,0 +1,103 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: fritzbox-exporter + namespace: monitoring + labels: + app: fritzbox-exporter +spec: + replicas: 1 + selector: + matchLabels: + app: fritzbox-exporter + template: + metadata: + labels: + app: fritzbox-exporter + spec: + containers: + - name: fritzbox-exporter + image: ghcr.io/sberk42/fritzbox_exporter/fritzbox_exporter:latest + imagePullPolicy: IfNotPresent + env: + - name: USERNAME + valueFrom: + secretKeyRef: + name: fritzbox-exporter-secret + key: username + - name: PASSWORD + valueFrom: + secretKeyRef: + name: fritzbox-exporter-secret + key: password + - name: GATEWAY_URL + value: "http://192.168.10.1:49000" + - name: LISTEN_ADDRESS + value: "0.0.0.0:9042" + ports: + - name: http-metrics + containerPort: 9042 + resources: + requests: + cpu: 10m + memory: 32Mi + limits: + cpu: 100m + memory: 64Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: fritzbox-exporter + namespace: monitoring + labels: + app: fritzbox-exporter +spec: + ports: + - name: http-metrics + port: 9042 + targetPort: 9042 + protocol: TCP + selector: + app: fritzbox-exporter +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: fritzbox-exporter + namespace: monitoring + labels: + app: fritzbox-exporter + release: prometheus-operator +spec: + selector: + matchLabels: + app: fritzbox-exporter + namespaceSelector: + matchNames: + - monitoring + endpoints: + - port: http-metrics + path: /metrics + interval: 60s + scrapeTimeout: 15s +--- +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: fritzbox-exporter-alerts + namespace: monitoring + labels: + release: prometheus-operator +spec: + groups: + - name: fritzbox-exporter.rules + rules: + - alert: FritzBoxExporterOffline + expr: up{job="fritzbox-exporter"} == 0 + for: 5m + labels: + severity: warning + annotations: + summary: "FritzBox exporter is offline" + description: "The FritzBox exporter pod in the cluster cannot reach the router at 192.168.10.1 or the exporter itself is down."