From 04ab32006c7229c80bedd111f271fa9ab8a59a3b Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 13 May 2026 01:07:11 +0200 Subject: [PATCH] feat: add hans metrics grafana dashboard --- .../apps/monitoring/configmap-dashboards.yaml | 1021 +++++------------ 1 file changed, 278 insertions(+), 743 deletions(-) diff --git a/clusters/homelab/apps/monitoring/configmap-dashboards.yaml b/clusters/homelab/apps/monitoring/configmap-dashboards.yaml index f79034a..0708ed3 100644 --- a/clusters/homelab/apps/monitoring/configmap-dashboards.yaml +++ b/clusters/homelab/apps/monitoring/configmap-dashboards.yaml @@ -1,21 +1,18 @@ apiVersion: v1 kind: ConfigMap metadata: - name: grafana-dashboard-sportmetrics + name: grafana-dashboard-garmin namespace: monitoring labels: grafana_dashboard: "1" data: - sportmetrics.json: | + garmin.json: | { "annotations": { "list": [ { "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -28,784 +25,322 @@ data: "fiscalYearStartMonth": 0, "graphTooltip": 1, "links": [], - "templating": { - "list": [ - { - "current": { - "text": "Prometheus", - "value": "prometheus" - }, - "name": "datasource", - "options": [], - "query": "prometheus", - "refresh": 1, - "type": "datasource" - }, - { - "allValue": ".*", - "current": { - "text": "All", - "value": "$__all" - }, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "hide": 2, - "includeAll": true, - "label": "Cluster", - "name": "cluster", - "options": [], - "query": "label_values(node_uname_info{job=\"node-exporter\", sysname!=\"Darwin\"}, cluster)", - "refresh": 2, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "label": "Instance", - "name": "instance", - "options": [], - "query": "label_values(node_uname_info{job=\"node-exporter\", cluster=~\"$cluster\", sysname!=\"Darwin\"}, instance)", - "refresh": 2, - "type": "query" - } - ] - }, "panels": [ + + { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 100, "title": "LAUFEN", "type": "row" }, + { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 10, - "panels": [], - "title": "Cluster", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] + "color": { "mode": "fixed", "fixedColor": "#5794F2" }, + "custom": { "drawStyle": "bars", "fillOpacity": 80, "gradientMode": "none", "lineWidth": 0, "pointSize": 5, "showPoints": "never", "spanNulls": false, "stacking": { "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, + "unit": "km", + "mappings": [], "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": 0 }] } + }, "overrides": [] }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 1 - }, - "id": 11, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "expr": "(\n (1 - sum without (mode) (rate(node_cpu_seconds_total{job=\"node-exporter\", mode=~\"idle|iowait|steal\", instance=\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])))\n/ ignoring(cpu) group_left\n count without (cpu, mode) (node_cpu_seconds_total{job=\"node-exporter\", mode=\"idle\", instance=\"$instance\", cluster=~\"$cluster\"})\n)\n", - "intervalFactor": 5, - "legendFormat": "{{cpu}}", - "refId": "A" - } - ], - "title": "CPU Usage", + "gridPos": { "h": 8, "w": 6, "x": 0, "y": 1 }, + "id": 1, "title": "Distanz", + "options": { "legend": { "displayMode": "hidden" }, "tooltip": { "mode": "single" } }, + "targets": [{ + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "editorMode": "code", "format": "table", "rawQuery": true, + "rawSql": "SELECT start_time AS time, distance_meters / 1000.0 AS \"km\"\nFROM activities WHERE type = 'running' AND distance_meters > 0\nORDER BY start_time", + "refId": "A" + }], "type": "timeseries" }, + { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] + "color": { "mode": "fixed", "fixedColor": "#FF9830" }, + "custom": { "drawStyle": "line", "fillOpacity": 20, "lineWidth": 2, "pointSize": 5, "showPoints": "auto", "spanNulls": false, "thresholdsStyle": { "mode": "off" } }, + "unit": "none", + "decimals": 2, + "mappings": [], "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": 0 }] } + }, "overrides": [] }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 1 - }, - "id": 12, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "expr": "(\n node_memory_MemTotal_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}\n-\n node_memory_MemFree_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}\n-\n node_memory_Buffers_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}\n-\n node_memory_Cached_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}\n)\n", - "legendFormat": "memory used", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "expr": "node_memory_Buffers_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}", - "legendFormat": "memory buffers", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "expr": "node_memory_Cached_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}", - "legendFormat": "memory cached", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "expr": "node_memory_MemFree_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}", - "legendFormat": "memory free", - "refId": "D" - } - ], - "title": "Memory Usage", + "gridPos": { "h": 8, "w": 6, "x": 6, "y": 1 }, + "id": 2, "title": "Pace (min/km)", + "options": { "legend": { "displayMode": "hidden" }, "tooltip": { "mode": "single" } }, + "targets": [{ + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "editorMode": "code", "format": "table", "rawQuery": true, + "rawSql": "SELECT start_time AS time,\n ROUND(((duration_seconds / 60.0) / (distance_meters / 1000.0))::numeric, 2) AS \"min/km\"\nFROM activities\nWHERE type = 'running' AND distance_meters > 0 AND duration_seconds > 0\nORDER BY start_time", + "refId": "A" + }], "type": "timeseries" }, + { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 8 - }, - "id": 5, - "panels": [], - "title": "Fitness", - "type": "row" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "bfgdydx75ju2of" - }, + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] + "color": { "mode": "fixed", "fixedColor": "#F2495C" }, + "custom": { "drawStyle": "line", "fillOpacity": 20, "lineWidth": 2, "pointSize": 5, "showPoints": "auto", "spanNulls": false, "thresholdsStyle": { "mode": "off" } }, + "unit": "bpm", + "mappings": [], "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": 0 }] } + }, "overrides": [] }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 9 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "12.4.1", - "targets": [ - { - "dataset": "garmin", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "bfgdydx75ju2of" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT\n start_time AS time,\n (duration_seconds / 60) / (distance_meters / 1000) AS \"Pace (min/km)\"\nFROM activities\nWHERE type = 'running'\n AND distance_meters > 0\nORDER BY start_time", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "pace", + "gridPos": { "h": 8, "w": 6, "x": 12, "y": 1 }, + "id": 3, "title": "Max Herzrate", + "options": { "legend": { "displayMode": "hidden" }, "tooltip": { "mode": "single" } }, + "targets": [{ + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "editorMode": "code", "format": "table", "rawQuery": true, + "rawSql": "SELECT start_time AS time, max_hr AS \"Max HR\"\nFROM activities\nWHERE type = 'running' AND max_hr IS NOT NULL\nORDER BY start_time", + "refId": "A" + }], "type": "timeseries" }, + { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "bfgdydx75ju2of" - }, + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] + "color": { "mode": "fixed", "fixedColor": "#73BF69" }, + "custom": { "drawStyle": "line", "fillOpacity": 20, "lineWidth": 2, "pointSize": 5, "showPoints": "auto", "spanNulls": false, "thresholdsStyle": { "mode": "off" } }, + "unit": "none", "decimals": 1, + "mappings": [], "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": 0 }] } + }, "overrides": [] }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 9 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "12.4.1", - "targets": [ - { - "dataset": "garmin", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "bfgdydx75ju2of" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT\n start_time AS time,\n max_hr AS \"Max HR\"\nFROM activities\nWHERE type = 'running'\n AND max_hr IS NOT NULL\nORDER BY start_time", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "max hr", + "gridPos": { "h": 8, "w": 6, "x": 18, "y": 1 }, + "id": 4, "title": "VO2max", + "options": { "legend": { "displayMode": "hidden" }, "tooltip": { "mode": "single" } }, + "targets": [{ + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "editorMode": "code", "format": "table", "rawQuery": true, + "rawSql": "SELECT start_time AS time, vo2max\nFROM activities\nWHERE type = 'running' AND vo2max IS NOT NULL\nORDER BY start_time", + "refId": "A" + }], "type": "timeseries" }, + + { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 9 }, "id": 101, "title": "KÖRPER & GESUNDHEIT", "type": "row" }, + { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "bfgdydx75ju2of" - }, + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": true, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisGridShow": false, - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "bars", - "fillOpacity": 100, - "gradientMode": "hue", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] + "color": { "mode": "fixed", "fixedColor": "#F2495C" }, + "custom": { "drawStyle": "line", "fillOpacity": 15, "lineWidth": 2, "pointSize": 4, "showPoints": "auto", "spanNulls": true, "thresholdsStyle": { "mode": "off" } }, + "unit": "bpm", + "mappings": [], "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": 0 }] } + }, "overrides": [] }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 16 - }, - "id": 1, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "12.4.1", - "targets": [ - { - "dataset": "garmin", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "bfgdydx75ju2of" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT\n start_time AS time,\n distance_meters / 1000 AS \"Distanz (km)\"\nFROM activities\nWHERE type = 'running'\nORDER BY start_time", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "distance", + "gridPos": { "h": 8, "w": 6, "x": 0, "y": 10 }, + "id": 5, "title": "Ruhepuls", + "options": { "legend": { "displayMode": "hidden" }, "tooltip": { "mode": "single" } }, + "targets": [{ + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "editorMode": "code", "format": "table", "rawQuery": true, + "rawSql": "SELECT date AS time, resting_hr\nFROM daily_health\nWHERE resting_hr IS NOT NULL\nORDER BY date", + "refId": "A" + }], "type": "timeseries" }, + { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "bfgdydx75ju2of" - }, + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": true, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisGridShow": false, - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "bars", - "fillOpacity": 100, - "gradientMode": "hue", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] + "color": { "mode": "fixed", "fixedColor": "#FADE2A" }, + "custom": { "drawStyle": "bars", "fillOpacity": 80, "lineWidth": 0, "pointSize": 5, "showPoints": "never", "spanNulls": false, "thresholdsStyle": { "mode": "off" } }, + "unit": "short", + "mappings": [], "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": 0 }] } + }, "overrides": [] }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 16 - }, - "id": 3, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "12.4.1", - "targets": [ - { - "dataset": "garmin", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "bfgdydx75ju2of" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT\n start_time AS time,\n vo2max\nFROM activities\nWHERE type = 'running'\n AND vo2max IS NOT NULL\nORDER BY start_time", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "vo2max", + "gridPos": { "h": 8, "w": 6, "x": 6, "y": 10 }, + "id": 6, "title": "Schritte", + "options": { "legend": { "displayMode": "hidden" }, "tooltip": { "mode": "single" } }, + "targets": [{ + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "editorMode": "code", "format": "table", "rawQuery": true, + "rawSql": "SELECT date AS time, total_steps AS \"Schritte\"\nFROM daily_health\nWHERE total_steps IS NOT NULL AND total_steps > 0\nORDER BY date", + "refId": "A" + }], "type": "timeseries" + }, + + { + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "fieldConfig": { + "defaults": { + "color": { "mode": "fixed", "fixedColor": "#5794F2" }, + "custom": { "drawStyle": "line", "fillOpacity": 15, "lineWidth": 2, "pointSize": 4, "showPoints": "auto", "spanNulls": true, "thresholdsStyle": { "mode": "off" } }, + "unit": "short", + "min": 0, "max": 100, + "mappings": [], "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": 0 }] } + }, "overrides": [ + { "matcher": { "id": "byName", "options": "Hoch" }, "properties": [{ "id": "color", "value": { "fixedColor": "#73BF69", "mode": "fixed" } }] }, + { "matcher": { "id": "byName", "options": "Niedrig" }, "properties": [{ "id": "color", "value": { "fixedColor": "#F2495C", "mode": "fixed" } }] } + ] + }, + "gridPos": { "h": 8, "w": 6, "x": 12, "y": 10 }, + "id": 7, "title": "Body Battery", + "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, + "targets": [{ + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "editorMode": "code", "format": "table", "rawQuery": true, + "rawSql": "SELECT date AS time,\n body_battery_highest AS \"Hoch\",\n body_battery_lowest AS \"Niedrig\"\nFROM daily_health\nWHERE body_battery_highest IS NOT NULL\nORDER BY date", + "refId": "A" + }], + "type": "timeseries" + }, + + { + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "fieldConfig": { + "defaults": { + "color": { "mode": "fixed", "fixedColor": "#B877D9" }, + "custom": { "drawStyle": "line", "fillOpacity": 15, "lineWidth": 2, "pointSize": 4, "showPoints": "auto", "spanNulls": true, "thresholdsStyle": { "mode": "off" } }, + "unit": "short", + "mappings": [], "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": 0 }] } + }, "overrides": [ + { "matcher": { "id": "byName", "options": "Stress" }, "properties": [{ "id": "color", "value": { "fixedColor": "#FF9830", "mode": "fixed" } }] } + ] + }, + "gridPos": { "h": 8, "w": 6, "x": 18, "y": 10 }, + "id": 8, "title": "Stress", + "options": { "legend": { "displayMode": "hidden" }, "tooltip": { "mode": "single" } }, + "targets": [{ + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "editorMode": "code", "format": "table", "rawQuery": true, + "rawSql": "SELECT date AS time, average_stress AS \"Stress\"\nFROM daily_health\nWHERE average_stress IS NOT NULL AND average_stress > 0\nORDER BY date", + "refId": "A" + }], + "type": "timeseries" + }, + + { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 18 }, "id": 102, "title": "SCHLAF", "type": "row" }, + + { + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "fieldConfig": { + "defaults": { + "color": { "mode": "fixed", "fixedColor": "#5794F2" }, + "custom": { "drawStyle": "bars", "fillOpacity": 80, "lineWidth": 0, "pointSize": 5, "showPoints": "never", "spanNulls": false, "thresholdsStyle": { "mode": "off" } }, + "unit": "h", "decimals": 1, + "mappings": [], "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": 0 }] } + }, "overrides": [] + }, + "gridPos": { "h": 8, "w": 6, "x": 0, "y": 19 }, + "id": 9, "title": "Schlafdauer", + "options": { "legend": { "displayMode": "hidden" }, "tooltip": { "mode": "single" } }, + "targets": [{ + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "editorMode": "code", "format": "table", "rawQuery": true, + "rawSql": "SELECT date AS time,\n ROUND((sleeping_seconds / 3600.0)::numeric, 1) AS \"Stunden\"\nFROM daily_health\nWHERE sleep_duration_seconds IS NOT NULL AND sleep_duration_seconds > 0\nORDER BY date", + "refId": "A" + }], + "type": "timeseries" + }, + + { + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "fieldConfig": { + "defaults": { + "color": { "mode": "fixed", "fixedColor": "#73BF69" }, + "custom": { "drawStyle": "bars", "fillOpacity": 80, "lineWidth": 0, "pointSize": 5, "showPoints": "never", "spanNulls": false, "thresholdsStyle": { "mode": "off" } }, + "unit": "kcal", + "mappings": [], "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": 0 }] } + }, "overrides": [ + { "matcher": { "id": "byName", "options": "Aktiv" }, "properties": [{ "id": "color", "value": { "fixedColor": "#73BF69", "mode": "fixed" } }] }, + { "matcher": { "id": "byName", "options": "Gesamt" }, "properties": [{ "id": "color", "value": { "fixedColor": "#5794F2", "mode": "fixed" } }] } + ] + }, + "gridPos": { "h": 8, "w": 6, "x": 6, "y": 19 }, + "id": 13, "title": "Schlafphasen", + "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, + "targets": [{ + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "editorMode": "code", "format": "table", "rawQuery": true, + "rawSql": "SELECT date AS time,\n ROUND((sleep_deep_seconds / 3600.0)::numeric, 1) AS \"Tief\",\n ROUND((sleep_rem_seconds / 3600.0)::numeric, 1) AS \"REM\",\n ROUND((sleep_light_seconds / 3600.0)::numeric, 1) AS \"Leicht\"\nFROM daily_health\nWHERE sleep_duration_seconds IS NOT NULL AND sleep_duration_seconds > 0\nORDER BY date", + "refId": "A" + }], + "type": "timeseries" + }, + + { + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "fieldConfig": { + "defaults": { + "color": { "mode": "fixed", "fixedColor": "#FF9830" }, + "custom": { "drawStyle": "line", "fillOpacity": 15, "lineWidth": 2, "pointSize": 4, "showPoints": "auto", "spanNulls": true, "thresholdsStyle": { "mode": "off" } }, + "unit": "short", + "mappings": [], "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": 0 }] } + }, "overrides": [] + }, + "gridPos": { "h": 8, "w": 6, "x": 12, "y": 19 }, + "id": 14, "title": "Aktive Minuten", + "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, + "targets": [{ + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "editorMode": "code", "format": "table", "rawQuery": true, + "rawSql": "SELECT date AS time,\n ROUND((active_seconds / 60.0)::numeric, 0) AS \"Aktiv\",\n ROUND((highly_active_seconds / 60.0)::numeric, 0) AS \"Hochaktiv\"\nFROM daily_health\nWHERE active_seconds IS NOT NULL AND active_seconds > 0\nORDER BY date", + "refId": "A" + }], + "type": "timeseries" + }, + + { + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "fieldConfig": { + "defaults": { + "color": { "mode": "fixed", "fixedColor": "#B877D9" }, + "custom": { "drawStyle": "line", "fillOpacity": 15, "lineWidth": 2, "pointSize": 4, "showPoints": "auto", "spanNulls": true, "thresholdsStyle": { "mode": "off" } }, + "unit": "short", "decimals": 1, + "mappings": [], "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": 0 }] } + }, "overrides": [] + }, + "gridPos": { "h": 8, "w": 6, "x": 18, "y": 19 }, + "id": 15, "title": "Atemfrequenz", + "options": { "legend": { "displayMode": "hidden" }, "tooltip": { "mode": "single" } }, + "targets": [{ + "datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, + "editorMode": "code", "format": "table", "rawQuery": true, + "rawSql": "SELECT date AS time, respiration_avg_waking AS \"Atemzüge/min\"\nFROM daily_health\nWHERE respiration_avg_waking IS NOT NULL\nORDER BY date", + "refId": "A" + }], + "type": "timeseries" + }, + + { "collapsed": true, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 27 }, "id": 103, "title": "CLUSTER", "type": "row", + "panels": [ + { + "datasource": { "type": "prometheus", "uid": "${datasource}" }, + "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never", "stacking": { "mode": "normal" } }, "max": 1, "min": 0, "unit": "percentunit" }, "overrides": [] }, + "gridPos": { "h": 7, "w": 12, "x": 0, "y": 28 }, + "id": 11, "title": "CPU Usage", + "targets": [{ "datasource": { "type": "prometheus", "uid": "$datasource" }, "expr": "(\n (1 - sum without (mode) (rate(node_cpu_seconds_total{job=\"node-exporter\", mode=~\"idle|iowait|steal\", instance=\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])))\n/ ignoring(cpu) group_left\n count without (cpu, mode) (node_cpu_seconds_total{job=\"node-exporter\", mode=\"idle\", instance=\"$instance\", cluster=~\"$cluster\"})\n)\n", "legendFormat": "{{cpu}}", "refId": "A" }], + "type": "timeseries" + }, + { + "datasource": { "type": "prometheus", "uid": "${datasource}" }, + "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 1, "showPoints": "never", "stacking": { "mode": "normal" } }, "min": 0, "unit": "bytes" }, "overrides": [] }, + "gridPos": { "h": 7, "w": 12, "x": 12, "y": 28 }, + "id": 12, "title": "Memory Usage", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "$datasource" }, "expr": "(\n node_memory_MemTotal_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}\n-\n node_memory_MemFree_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}\n-\n node_memory_Buffers_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}\n-\n node_memory_Cached_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}\n)\n", "legendFormat": "used", "refId": "A" }, + { "datasource": { "type": "prometheus", "uid": "$datasource" }, "expr": "node_memory_MemFree_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}", "legendFormat": "free", "refId": "B" } + ], + "type": "timeseries" + } + ] } + ], "preload": false, "refresh": "30s", "schemaVersion": 42, - "tags": [], - "time": { - "from": "now-6h", - "to": "now" - }, + "tags": ["garmin", "health", "fitness"], + "time": { "from": "now-90d", "to": "now" }, "timepicker": {}, "timezone": "browser", - "title": "sportmetrics", - "uid": "adgxbg7", - "version": 19, + "title": "Metrics", + "uid": "garmin-health-v1", + "version": 1, "weekStart": "" - } + } \ No newline at end of file