fix: properly escape rawSql newlines in sportmetrics dashboard

This commit is contained in:
2026-03-25 00:09:16 +01:00
parent e802ca044a
commit d83536a29b
@@ -78,17 +78,27 @@ data:
"panels": [ "panels": [
{ {
"collapsed": false, "collapsed": false,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 10, "id": 10,
"panels": [], "panels": [],
"title": "Cluster", "title": "Cluster",
"type": "row" "type": "row"
}, },
{ {
"datasource": { "type": "prometheus", "uid": "${datasource}" }, "datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "mode": "palette-classic" }, "color": {
"mode": "palette-classic"
},
"custom": { "custom": {
"axisBorderShow": false, "axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
@@ -100,17 +110,28 @@ data:
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 10, "fillOpacity": 10,
"gradientMode": "none", "gradientMode": "none",
"hideFrom": { "legend": false, "tooltip": false, "viz": false }, "hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false, "insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
"scaleDistribution": { "type": "linear" }, "scaleDistribution": {
"type": "linear"
},
"showPoints": "never", "showPoints": "never",
"showValues": false, "showValues": false,
"spanNulls": false, "spanNulls": false,
"stacking": { "group": "A", "mode": "normal" }, "stacking": {
"thresholdsStyle": { "mode": "off" } "group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
}, },
"mappings": [], "mappings": [],
"max": 1, "max": 1,
@@ -118,30 +139,48 @@ data:
"thresholds": { "thresholds": {
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ "color": "green", "value": 0 }, {
{ "color": "red", "value": 80 } "color": "green",
"value": 0
},
{
"color": "red",
"value": 80
}
] ]
}, },
"unit": "percentunit" "unit": "percentunit"
}, },
"overrides": [] "overrides": []
}, },
"gridPos": { "h": 7, "w": 12, "x": 0, "y": 1 }, "gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 1
},
"id": 11, "id": 11,
"options": { "options": {
"legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "legend": {
"tooltip": { "hideZeros": false, "mode": "multi", "sort": "none" } "calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "multi",
"sort": "none"
}
}, },
"pluginVersion": "12.4.1", "pluginVersion": "12.4.1",
"targets": [ "targets": [
{ {
"datasource": { "type": "prometheus", "uid": "$datasource" }, "datasource": {
"expr": "( "type": "prometheus",
(1 - sum without (mode) (rate(node_cpu_seconds_total{job=\"node-exporter\", mode=~\"idle|iowait|steal\", instance=\"$instance\", cluster=~\"$cluster\"}[$__rate_interval]))) "uid": "$datasource"
/ ignoring(cpu) group_left },
count without (cpu, mode) (node_cpu_seconds_total{job=\"node-exporter\", mode=\"idle\", instance=\"$instance\", cluster=~\"$cluster\"}) "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, "intervalFactor": 5,
"legendFormat": "{{cpu}}", "legendFormat": "{{cpu}}",
"refId": "A" "refId": "A"
@@ -151,10 +190,15 @@ data:
"type": "timeseries" "type": "timeseries"
}, },
{ {
"datasource": { "type": "prometheus", "uid": "${datasource}" }, "datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "mode": "palette-classic" }, "color": {
"mode": "palette-classic"
},
"custom": { "custom": {
"axisBorderShow": false, "axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
@@ -166,68 +210,102 @@ data:
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 10, "fillOpacity": 10,
"gradientMode": "none", "gradientMode": "none",
"hideFrom": { "legend": false, "tooltip": false, "viz": false }, "hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false, "insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
"scaleDistribution": { "type": "linear" }, "scaleDistribution": {
"type": "linear"
},
"showPoints": "never", "showPoints": "never",
"showValues": false, "showValues": false,
"spanNulls": false, "spanNulls": false,
"stacking": { "group": "A", "mode": "normal" }, "stacking": {
"thresholdsStyle": { "mode": "off" } "group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
}, },
"mappings": [], "mappings": [],
"min": 0, "min": 0,
"thresholds": { "thresholds": {
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ "color": "green", "value": 0 }, {
{ "color": "red", "value": 80 } "color": "green",
"value": 0
},
{
"color": "red",
"value": 80
}
] ]
}, },
"unit": "bytes" "unit": "bytes"
}, },
"overrides": [] "overrides": []
}, },
"gridPos": { "h": 7, "w": 12, "x": 12, "y": 1 }, "gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 1
},
"id": 12, "id": 12,
"options": { "options": {
"legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "legend": {
"tooltip": { "hideZeros": false, "mode": "multi", "sort": "none" } "calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "multi",
"sort": "none"
}
}, },
"pluginVersion": "12.4.1", "pluginVersion": "12.4.1",
"targets": [ "targets": [
{ {
"datasource": { "type": "prometheus", "uid": "$datasource" }, "datasource": {
"expr": "( "type": "prometheus",
node_memory_MemTotal_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"} "uid": "$datasource"
- },
node_memory_MemFree_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"} "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",
-
node_memory_Buffers_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}
-
node_memory_Cached_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}
)
",
"legendFormat": "memory used", "legendFormat": "memory used",
"refId": "A" "refId": "A"
}, },
{ {
"datasource": { "type": "prometheus", "uid": "$datasource" }, "datasource": {
"type": "prometheus",
"uid": "$datasource"
},
"expr": "node_memory_Buffers_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}", "expr": "node_memory_Buffers_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}",
"legendFormat": "memory buffers", "legendFormat": "memory buffers",
"refId": "B" "refId": "B"
}, },
{ {
"datasource": { "type": "prometheus", "uid": "$datasource" }, "datasource": {
"type": "prometheus",
"uid": "$datasource"
},
"expr": "node_memory_Cached_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}", "expr": "node_memory_Cached_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}",
"legendFormat": "memory cached", "legendFormat": "memory cached",
"refId": "C" "refId": "C"
}, },
{ {
"datasource": { "type": "prometheus", "uid": "$datasource" }, "datasource": {
"type": "prometheus",
"uid": "$datasource"
},
"expr": "node_memory_MemFree_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}", "expr": "node_memory_MemFree_bytes{job=\"node-exporter\", instance=\"$instance\", cluster=~\"$cluster\"}",
"legendFormat": "memory free", "legendFormat": "memory free",
"refId": "D" "refId": "D"
@@ -238,192 +316,478 @@ data:
}, },
{ {
"collapsed": false, "collapsed": false,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 8 }, "gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 8
},
"id": 5, "id": 5,
"panels": [], "panels": [],
"title": "Fitness", "title": "Fitness",
"type": "row" "type": "row"
}, },
{ {
"datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, "datasource": {
"type": "grafana-postgresql-datasource",
"uid": "bfgdydx75ju2of"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "mode": "palette-classic" }, "color": {
"mode": "palette-classic"
},
"custom": { "custom": {
"axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisBorderShow": false,
"axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "barWidthFactor": 0.6, "axisCenteredZero": false,
"drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", "axisColorMode": "text",
"hideFrom": { "legend": false, "tooltip": false, "viz": false }, "axisLabel": "",
"insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "axisPlacement": "auto",
"scaleDistribution": { "type": "linear" }, "showPoints": "auto", "showValues": false, "barAlignment": 0,
"spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "barWidthFactor": 0.6,
"thresholdsStyle": { "mode": "off" } "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": [], "mappings": [],
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": 0 }, { "color": "red", "value": 80 }] } "thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": 0
},
{
"color": "red",
"value": 80
}
]
}
}, },
"overrides": [] "overrides": []
}, },
"gridPos": { "h": 7, "w": 12, "x": 0, "y": 9 }, "gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 9
},
"id": 2, "id": 2,
"options": { "options": {
"legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "legend": {
"tooltip": { "hideZeros": false, "mode": "single", "sort": "none" } "calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
}, },
"pluginVersion": "12.4.1", "pluginVersion": "12.4.1",
"targets": [ "targets": [
{ {
"dataset": "garmin", "dataset": "garmin",
"datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, "datasource": {
"editorMode": "code", "format": "table", "rawQuery": true, "type": "grafana-postgresql-datasource",
"rawSql": "SELECT "uid": "bfgdydx75ju2of"
start_time AS time, },
(duration_seconds / 60) / (distance_meters / 1000) AS \"Pace (min/km)\" "editorMode": "code",
FROM activities "format": "table",
WHERE type = 'running' "rawQuery": true,
AND distance_meters > 0 "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",
ORDER BY start_time",
"refId": "A", "refId": "A",
"sql": { "columns": [{ "parameters": [], "type": "function" }], "groupBy": [{ "property": { "type": "string" }, "type": "groupBy" }], "limit": 50 } "sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
} }
], ],
"title": "pace", "title": "pace",
"type": "timeseries" "type": "timeseries"
}, },
{ {
"datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, "datasource": {
"type": "grafana-postgresql-datasource",
"uid": "bfgdydx75ju2of"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "mode": "palette-classic" }, "color": {
"mode": "palette-classic"
},
"custom": { "custom": {
"axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisBorderShow": false,
"axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "barWidthFactor": 0.6, "axisCenteredZero": false,
"drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "axisColorMode": "text",
"hideFrom": { "legend": false, "tooltip": false, "viz": false }, "axisLabel": "",
"insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "axisPlacement": "auto",
"scaleDistribution": { "type": "linear" }, "showPoints": "auto", "showValues": false, "barAlignment": 0,
"spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "barWidthFactor": 0.6,
"thresholdsStyle": { "mode": "off" } "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": [], "mappings": [],
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": 0 }, { "color": "red", "value": 80 }] } "thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": 0
},
{
"color": "red",
"value": 80
}
]
}
}, },
"overrides": [] "overrides": []
}, },
"gridPos": { "h": 7, "w": 12, "x": 12, "y": 9 }, "gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 9
},
"id": 4, "id": 4,
"options": { "options": {
"legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "legend": {
"tooltip": { "hideZeros": false, "mode": "single", "sort": "none" } "calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
}, },
"pluginVersion": "12.4.1", "pluginVersion": "12.4.1",
"targets": [ "targets": [
{ {
"dataset": "garmin", "dataset": "garmin",
"datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, "datasource": {
"editorMode": "code", "format": "table", "rawQuery": true, "type": "grafana-postgresql-datasource",
"rawSql": "SELECT "uid": "bfgdydx75ju2of"
start_time AS time, },
max_hr AS \"Max HR\" "editorMode": "code",
FROM activities "format": "table",
WHERE type = 'running' "rawQuery": true,
AND max_hr IS NOT NULL "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",
ORDER BY start_time",
"refId": "A", "refId": "A",
"sql": { "columns": [{ "parameters": [], "type": "function" }], "groupBy": [{ "property": { "type": "string" }, "type": "groupBy" }], "limit": 50 } "sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
} }
], ],
"title": "max hr", "title": "max hr",
"type": "timeseries" "type": "timeseries"
}, },
{ {
"datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, "datasource": {
"type": "grafana-postgresql-datasource",
"uid": "bfgdydx75ju2of"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "mode": "palette-classic" }, "color": {
"mode": "palette-classic"
},
"custom": { "custom": {
"axisBorderShow": true, "axisCenteredZero": false, "axisColorMode": "text", "axisBorderShow": true,
"axisGridShow": false, "axisLabel": "", "axisPlacement": "auto", "axisCenteredZero": false,
"barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "bars", "axisColorMode": "text",
"fillOpacity": 100, "gradientMode": "hue", "axisGridShow": false,
"hideFrom": { "legend": false, "tooltip": false, "viz": false }, "axisLabel": "",
"insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "axisPlacement": "auto",
"scaleDistribution": { "type": "linear" }, "showPoints": "auto", "showValues": false, "barAlignment": 0,
"spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "barWidthFactor": 0.6,
"thresholdsStyle": { "mode": "off" } "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": [], "mappings": [],
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": 0 }, { "color": "red", "value": 80 }] } "thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": 0
},
{
"color": "red",
"value": 80
}
]
}
}, },
"overrides": [] "overrides": []
}, },
"gridPos": { "h": 7, "w": 12, "x": 0, "y": 16 }, "gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 16
},
"id": 1, "id": 1,
"options": { "options": {
"legend": { "calcs": [], "displayMode": "list", "placement": "right", "showLegend": true }, "legend": {
"tooltip": { "hideZeros": false, "mode": "single", "sort": "none" } "calcs": [],
"displayMode": "list",
"placement": "right",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
}, },
"pluginVersion": "12.4.1", "pluginVersion": "12.4.1",
"targets": [ "targets": [
{ {
"dataset": "garmin", "dataset": "garmin",
"datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, "datasource": {
"editorMode": "code", "format": "table", "rawQuery": true, "type": "grafana-postgresql-datasource",
"rawSql": "SELECT "uid": "bfgdydx75ju2of"
start_time AS time, },
distance_meters / 1000 AS \"Distanz (km)\" "editorMode": "code",
FROM activities "format": "table",
WHERE type = 'running' "rawQuery": true,
ORDER BY start_time", "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", "refId": "A",
"sql": { "columns": [{ "parameters": [], "type": "function" }], "groupBy": [{ "property": { "type": "string" }, "type": "groupBy" }], "limit": 50 } "sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
} }
], ],
"title": "distance", "title": "distance",
"type": "timeseries" "type": "timeseries"
}, },
{ {
"datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, "datasource": {
"type": "grafana-postgresql-datasource",
"uid": "bfgdydx75ju2of"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "mode": "palette-classic" }, "color": {
"mode": "palette-classic"
},
"custom": { "custom": {
"axisBorderShow": true, "axisCenteredZero": false, "axisColorMode": "text", "axisBorderShow": true,
"axisGridShow": false, "axisLabel": "", "axisPlacement": "auto", "axisCenteredZero": false,
"barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "bars", "axisColorMode": "text",
"fillOpacity": 100, "gradientMode": "hue", "axisGridShow": false,
"hideFrom": { "legend": false, "tooltip": false, "viz": false }, "axisLabel": "",
"insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "axisPlacement": "auto",
"scaleDistribution": { "type": "linear" }, "showPoints": "auto", "showValues": false, "barAlignment": 0,
"spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "barWidthFactor": 0.6,
"thresholdsStyle": { "mode": "off" } "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": [], "mappings": [],
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": 0 }, { "color": "red", "value": 80 }] } "thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": 0
},
{
"color": "red",
"value": 80
}
]
}
}, },
"overrides": [] "overrides": []
}, },
"gridPos": { "h": 7, "w": 12, "x": 12, "y": 16 }, "gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 16
},
"id": 3, "id": 3,
"options": { "options": {
"legend": { "calcs": [], "displayMode": "list", "placement": "right", "showLegend": true }, "legend": {
"tooltip": { "hideZeros": false, "mode": "single", "sort": "none" } "calcs": [],
"displayMode": "list",
"placement": "right",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
}, },
"pluginVersion": "12.4.1", "pluginVersion": "12.4.1",
"targets": [ "targets": [
{ {
"dataset": "garmin", "dataset": "garmin",
"datasource": { "type": "grafana-postgresql-datasource", "uid": "bfgdydx75ju2of" }, "datasource": {
"editorMode": "code", "format": "table", "rawQuery": true, "type": "grafana-postgresql-datasource",
"rawSql": "SELECT "uid": "bfgdydx75ju2of"
start_time AS time, },
vo2max "editorMode": "code",
FROM activities "format": "table",
WHERE type = 'running' "rawQuery": true,
AND vo2max IS NOT NULL "rawSql": "SELECT\n start_time AS time,\n vo2max\nFROM activities\nWHERE type = 'running'\n AND vo2max IS NOT NULL\nORDER BY start_time",
ORDER BY start_time",
"refId": "A", "refId": "A",
"sql": { "columns": [{ "parameters": [], "type": "function" }], "groupBy": [{ "property": { "type": "string" }, "type": "groupBy" }], "limit": 50 } "sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
} }
], ],
"title": "vo2max", "title": "vo2max",
@@ -434,7 +798,10 @@ data:
"refresh": "30s", "refresh": "30s",
"schemaVersion": 42, "schemaVersion": 42,
"tags": [], "tags": [],
"time": { "from": "now-6h", "to": "now" }, "time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {}, "timepicker": {},
"timezone": "browser", "timezone": "browser",
"title": "sportmetrics", "title": "sportmetrics",