From dda5a6ff6b0e28f55d072c8d4a71464306b34c86 Mon Sep 17 00:00:00 2001 From: Dastine Date: Sat, 7 Feb 2026 12:07:54 -0700 Subject: [PATCH 1/5] Adjust lap time unit --- ...ase Dashboard (History)-1769897898291.json | 1561 +++++++++++++++++ 1 file changed, 1561 insertions(+) create mode 100644 grafana/dashboards/Das Telemetry Base Dashboard (History)-1769897898291.json diff --git a/grafana/dashboards/Das Telemetry Base Dashboard (History)-1769897898291.json b/grafana/dashboards/Das Telemetry Base Dashboard (History)-1769897898291.json new file mode 100644 index 0000000..699a803 --- /dev/null +++ b/grafana/dashboards/Das Telemetry Base Dashboard (History)-1769897898291.json @@ -0,0 +1,1561 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 0, + "links": [], + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "panels": [], + "title": "Range and Efficiency", + "type": "row" + }, + { + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 3, + "libraryPanel": { + "name": "Pack State Of Charge", + "uid": "efagvhn0selfkc" + }, + "title": "Pack State Of Charge", + "type": "library-panel-ref" + }, + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "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": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 6, + "y": 1 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.4.0-21490573584", + "targets": [ + { + "dataset": "tsdb", + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT \"Timestamp\", \"PackCurrent\", \"PackVoltage\", \"PackStateOfCharge\", \"PackAmphours\", \"RegenBraking\" \nFROM telemetry_packet\nWHERE\n $__timeFilter(\"Timestamp\")\nORDER BY \"Timestamp\" ASC", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "\"Timestamp\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"PackCurrent\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"PackVoltage\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"PackStateOfCharge\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"PackAmphours\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"RegenBraking\"", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "telemetry_packet" + } + ], + "title": "Packet (History)", + "type": "timeseries" + }, + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "kwatth" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 9 + }, + "id": 11, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.0-21490573584", + "targets": [ + { + "dataset": "tsdb", + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT \"Timestamp\", \"EnergyConsumed\" \nFROM lap\nWHERE\n $__timeFilter(\"Timestamp\")\nORDER BY \"Timestamp\" ASC", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "\"Timestamp\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"EnergyConsumed\"", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "lap" + } + ], + "title": "Energy Consumed", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "energyConsumed" + } + ], + "source": "PackVoltage" + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "kwatth" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 9 + }, + "id": 13, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.0-21490573584", + "targets": [ + { + "dataset": "tsdb", + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT\n \"Timestamp\" AS time,\n \"TotalPowerIn\"\nFROM lap\nWHERE\n $__timeFilter(\"Timestamp\")\nORDER BY \"Timestamp\" ASC", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "\"TotalPowerIn\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"Timestamp\"", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "lap" + } + ], + "title": "Total Power In", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "totalPowerIn" + } + ], + "source": "data" + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "amph" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 7, + "x": 12, + "y": 9 + }, + "id": 10, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.0-21490573584", + "targets": [ + { + "dataset": "tsdb", + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT \"Timestamp\", \"AveragePackCurrent\"\nFROM lap \nWHERE\n $__timeFilter(\"Timestamp\")\nORDER BY \"Timestamp\" ASC", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "\"Timestamp\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"AveragePackCurrent\"", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "lap" + } + ], + "title": "Average Pack Current", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "averagePackCurrent" + } + ], + "replace": true, + "source": "data" + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "kwatt" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 13 + }, + "id": 14, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.0-21490573584", + "targets": [ + { + "dataset": "tsdb", + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT \"TotalPowerOut\" \nFROM lap\nWHERE\n $__timeFilter(\"Timestamp\")\nORDER BY \"Timestamp\" ASC", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "\"TotalPowerOut\"", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "lap" + } + ], + "title": "Total Power Consumption", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "totalPowerOut" + } + ], + "source": "data" + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 17 + }, + "id": 12, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.0-21490573584", + "targets": [ + { + "dataset": "tsdb", + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT \"Timestamp\", \"BatterySecondsRemaining\" \nFROM lap \nWHERE\n $__timeFilter(\"Timestamp\")\nORDER BY \"Timestamp\" ASC", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "\"Timestamp\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"BatterySecondsRemaining\"", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "lap" + } + ], + "title": "Battery Seconds Remaining", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "batterySecondsRemaining" + } + ], + "replace": true, + "source": "data" + } + } + ], + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 24 + }, + "id": 16, + "panels": [], + "title": "Speed & Performance", + "type": "row" + }, + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "velocitykmh" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 25 + }, + "id": 17, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.0-21490573584", + "targets": [ + { + "dataset": "tsdb", + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT \"Timestamp\", \"AverageSpeed\" \nFROM lap\nWHERE\n $__timeFilter(\"Timestamp\")\nORDER BY \"Timestamp\" ASC", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "\"Timestamp\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"AverageSpeed\"", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "lap" + } + ], + "title": "Average Speed", + "type": "stat" + }, + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "dthms" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 25 + }, + "id": 18, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.0-21490573584", + "targets": [ + { + "dataset": "tsdb", + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT \"Timestamp\", \"LapTime\" \nFROM lap \nWHERE\n $__timeFilter(\"Timestamp\")\nORDER BY \"Timestamp\" ASC", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "\"Timestamp\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"LapTime\"", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "lap" + } + ], + "title": "Lap Time", + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 32 + }, + "id": 8, + "panels": [], + "title": "Driving Behavior and Safety", + "type": "row" + }, + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "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": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 33 + }, + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.4.0-21490573584", + "targets": [ + { + "dataset": "tsdb", + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT \"Timestamp\", \"Acceleration\", \"BrakeSwitchDigital\", \"LeftSignalStatus\", \"RightSignalStatus\" \nFROM telemetry_packet \nWHERE\n $__timeFilter(\"Timestamp\")\nORDER BY \"Timestamp\" ASC", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "\"Timestamp\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"Acceleration\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"BrakeSwitchDigital\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"LeftSignalStatus\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"RightSignalStatus\"", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "telemetry_packet" + } + ], + "title": "Driving Behavior", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "Acceleration" + }, + { + "path": "BrakeSwitchDigital" + }, + { + "path": "LeftSignalStatus" + }, + { + "path": "RightSignalStatus" + } + ], + "keepTime": false, + "replace": false, + "source": "B3" + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "description": "Critical system errors or safety trips within the battery management system.", + "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": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 33 + }, + "id": 9, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.4.0-21490573584", + "targets": [ + { + "dataset": "tsdb", + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT \"ProximitySensor1\", \"Timestamp\", \"ProtectionTrip\", \"MalfunctionIndicatorActive\", \"ArrayContactorError\"\nFROM telemetry_packet \nWHERE\n $__timeFilter(\"Timestamp\")\nORDER BY \"Timestamp\" ASC", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "\"ProximitySensor1\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"Timestamp\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"ProtectionTrip\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"MalfunctionIndicatorActive\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"ArrayContactorError\"", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "telemetry_packet" + } + ], + "title": "Safety", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "ProximitySensor1" + } + ], + "source": "ProximitySensors" + } + }, + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "ProtectionTrip" + } + ], + "source": "MBMS" + } + }, + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "MalfunctionIndicatorActive" + } + ], + "source": "Battery" + } + }, + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "Error" + } + ], + "source": "Contactor" + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "lengthkm" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 41 + }, + "id": 15, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.0-21490573584", + "targets": [ + { + "dataset": "tsdb", + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "af4xjlz3vm29sd" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT \"Timestamp\", \"Distance\" \nFROM lap \nWHERE\n $__timeFilter(\"Timestamp\")\nORDER BY \"Timestamp\" ASC", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "\"Timestamp\"", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "\"Distance\"", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "lap" + } + ], + "title": "Total Distance", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "distance" + } + ], + "replace": true, + "source": "data" + } + } + ], + "type": "stat" + } + ], + "preload": false, + "refresh": "1m", + "schemaVersion": 42, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Das Telemetry Base Dashboard (History)", + "uid": "shkw5wr", + "version": 11, + "weekStart": "" +} \ No newline at end of file From 23575b1a37366d635e3e83ae42770bb55bb1c33a Mon Sep 17 00:00:00 2001 From: Dastine Date: Sat, 7 Feb 2026 14:49:18 -0700 Subject: [PATCH 2/5] Add PostgreSQL datasource configuration for TimescaleDB and update MQTT datasource credentials --- grafana/.env.example | 4 +- ...ase Dashboard (History)-1769897898291.json | 518 ++---------------- .../provisioning/datasources/datasources.yaml | 17 + 3 files changed, 77 insertions(+), 462 deletions(-) diff --git a/grafana/.env.example b/grafana/.env.example index e35b4d7..206e71d 100644 --- a/grafana/.env.example +++ b/grafana/.env.example @@ -1,2 +1,4 @@ MQTT_PASSWORD=yourpassword -MQTT_USERNAME=yourusername \ No newline at end of file +MQTT_USERNAME=yourusername +POSTGRES_USERNAME=yourusername +POSTGRES_PASSWORD=yourpassword \ No newline at end of file diff --git a/grafana/dashboards/Das Telemetry Base Dashboard (History)-1769897898291.json b/grafana/dashboards/Das Telemetry Base Dashboard (History)-1769897898291.json index 699a803..c0b8ca0 100644 --- a/grafana/dashboards/Das Telemetry Base Dashboard (History)-1769897898291.json +++ b/grafana/dashboards/Das Telemetry Base Dashboard (History)-1769897898291.json @@ -18,7 +18,7 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 0, + "id": 8, "links": [], "panels": [ { @@ -52,7 +52,7 @@ { "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "fieldConfig": { "defaults": { @@ -130,13 +130,13 @@ "sort": "none" } }, - "pluginVersion": "12.4.0-21490573584", + "pluginVersion": "12.3.1", "targets": [ { "dataset": "tsdb", "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "editorMode": "code", "format": "table", @@ -146,57 +146,7 @@ "sql": { "columns": [ { - "parameters": [ - { - "name": "\"Timestamp\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"PackCurrent\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"PackVoltage\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"PackStateOfCharge\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"PackAmphours\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"RegenBraking\"", - "type": "functionParameter" - } - ], + "parameters": [], "type": "function" } ], @@ -209,8 +159,7 @@ } ], "limit": 50 - }, - "table": "telemetry_packet" + } } ], "title": "Packet (History)", @@ -219,7 +168,7 @@ { "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "fieldConfig": { "defaults": { @@ -268,13 +217,13 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "12.4.0-21490573584", + "pluginVersion": "12.3.1", "targets": [ { "dataset": "tsdb", "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "editorMode": "code", "format": "table", @@ -284,21 +233,7 @@ "sql": { "columns": [ { - "parameters": [ - { - "name": "\"Timestamp\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"EnergyConsumed\"", - "type": "functionParameter" - } - ], + "parameters": [], "type": "function" } ], @@ -311,32 +246,16 @@ } ], "limit": 50 - }, - "table": "lap" - } - ], - "title": "Energy Consumed", - "transformations": [ - { - "id": "extractFields", - "options": { - "delimiter": ",", - "format": "json", - "jsonPaths": [ - { - "path": "energyConsumed" - } - ], - "source": "PackVoltage" } } ], + "title": "Energy Consumed", "type": "stat" }, { "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "fieldConfig": { "defaults": { @@ -385,13 +304,13 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "12.4.0-21490573584", + "pluginVersion": "12.3.1", "targets": [ { "dataset": "tsdb", "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "editorMode": "code", "format": "table", @@ -401,21 +320,7 @@ "sql": { "columns": [ { - "parameters": [ - { - "name": "\"TotalPowerIn\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"Timestamp\"", - "type": "functionParameter" - } - ], + "parameters": [], "type": "function" } ], @@ -428,32 +333,16 @@ } ], "limit": 50 - }, - "table": "lap" - } - ], - "title": "Total Power In", - "transformations": [ - { - "id": "extractFields", - "options": { - "delimiter": ",", - "format": "json", - "jsonPaths": [ - { - "path": "totalPowerIn" - } - ], - "source": "data" } } ], + "title": "Total Power In", "type": "stat" }, { "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "fieldConfig": { "defaults": { @@ -502,13 +391,13 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "12.4.0-21490573584", + "pluginVersion": "12.3.1", "targets": [ { "dataset": "tsdb", "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "editorMode": "code", "format": "table", @@ -518,21 +407,7 @@ "sql": { "columns": [ { - "parameters": [ - { - "name": "\"Timestamp\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"AveragePackCurrent\"", - "type": "functionParameter" - } - ], + "parameters": [], "type": "function" } ], @@ -545,33 +420,16 @@ } ], "limit": 50 - }, - "table": "lap" - } - ], - "title": "Average Pack Current", - "transformations": [ - { - "id": "extractFields", - "options": { - "delimiter": ",", - "format": "json", - "jsonPaths": [ - { - "path": "averagePackCurrent" - } - ], - "replace": true, - "source": "data" } } ], + "title": "Average Pack Current", "type": "stat" }, { "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "fieldConfig": { "defaults": { @@ -620,13 +478,13 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "12.4.0-21490573584", + "pluginVersion": "12.3.1", "targets": [ { "dataset": "tsdb", "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "editorMode": "code", "format": "table", @@ -636,12 +494,7 @@ "sql": { "columns": [ { - "parameters": [ - { - "name": "\"TotalPowerOut\"", - "type": "functionParameter" - } - ], + "parameters": [], "type": "function" } ], @@ -654,32 +507,16 @@ } ], "limit": 50 - }, - "table": "lap" - } - ], - "title": "Total Power Consumption", - "transformations": [ - { - "id": "extractFields", - "options": { - "delimiter": ",", - "format": "json", - "jsonPaths": [ - { - "path": "totalPowerOut" - } - ], - "source": "data" } } ], + "title": "Total Power Consumption", "type": "stat" }, { "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "fieldConfig": { "defaults": { @@ -728,13 +565,13 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "12.4.0-21490573584", + "pluginVersion": "12.3.1", "targets": [ { "dataset": "tsdb", "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "editorMode": "code", "format": "table", @@ -744,21 +581,7 @@ "sql": { "columns": [ { - "parameters": [ - { - "name": "\"Timestamp\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"BatterySecondsRemaining\"", - "type": "functionParameter" - } - ], + "parameters": [], "type": "function" } ], @@ -771,8 +594,7 @@ } ], "limit": 50 - }, - "table": "lap" + } } ], "title": "Battery Seconds Remaining", @@ -810,7 +632,7 @@ { "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "fieldConfig": { "defaults": { @@ -859,13 +681,13 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "12.4.0-21490573584", + "pluginVersion": "12.3.1", "targets": [ { "dataset": "tsdb", "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "editorMode": "code", "format": "table", @@ -875,21 +697,7 @@ "sql": { "columns": [ { - "parameters": [ - { - "name": "\"Timestamp\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"AverageSpeed\"", - "type": "functionParameter" - } - ], + "parameters": [], "type": "function" } ], @@ -902,8 +710,7 @@ } ], "limit": 50 - }, - "table": "lap" + } } ], "title": "Average Speed", @@ -912,7 +719,7 @@ { "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "fieldConfig": { "defaults": { @@ -962,13 +769,13 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "12.4.0-21490573584", + "pluginVersion": "12.3.1", "targets": [ { "dataset": "tsdb", "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "editorMode": "code", "format": "table", @@ -978,21 +785,7 @@ "sql": { "columns": [ { - "parameters": [ - { - "name": "\"Timestamp\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"LapTime\"", - "type": "functionParameter" - } - ], + "parameters": [], "type": "function" } ], @@ -1005,8 +798,7 @@ } ], "limit": 50 - }, - "table": "lap" + } } ], "title": "Lap Time", @@ -1028,7 +820,7 @@ { "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "fieldConfig": { "defaults": { @@ -1106,13 +898,13 @@ "sort": "none" } }, - "pluginVersion": "12.4.0-21490573584", + "pluginVersion": "12.3.1", "targets": [ { "dataset": "tsdb", "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "editorMode": "code", "format": "table", @@ -1122,48 +914,7 @@ "sql": { "columns": [ { - "parameters": [ - { - "name": "\"Timestamp\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"Acceleration\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"BrakeSwitchDigital\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"LeftSignalStatus\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"RightSignalStatus\"", - "type": "functionParameter" - } - ], + "parameters": [], "type": "function" } ], @@ -1176,43 +927,16 @@ } ], "limit": 50 - }, - "table": "telemetry_packet" - } - ], - "title": "Driving Behavior", - "transformations": [ - { - "id": "extractFields", - "options": { - "delimiter": ",", - "format": "json", - "jsonPaths": [ - { - "path": "Acceleration" - }, - { - "path": "BrakeSwitchDigital" - }, - { - "path": "LeftSignalStatus" - }, - { - "path": "RightSignalStatus" - } - ], - "keepTime": false, - "replace": false, - "source": "B3" } } ], + "title": "Driving Behavior", "type": "timeseries" }, { "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "description": "Critical system errors or safety trips within the battery management system.", "fieldConfig": { @@ -1291,13 +1015,13 @@ "sort": "none" } }, - "pluginVersion": "12.4.0-21490573584", + "pluginVersion": "12.3.1", "targets": [ { "dataset": "tsdb", "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "editorMode": "code", "format": "table", @@ -1307,48 +1031,7 @@ "sql": { "columns": [ { - "parameters": [ - { - "name": "\"ProximitySensor1\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"Timestamp\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"ProtectionTrip\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"MalfunctionIndicatorActive\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"ArrayContactorError\"", - "type": "functionParameter" - } - ], + "parameters": [], "type": "function" } ], @@ -1361,71 +1044,16 @@ } ], "limit": 50 - }, - "table": "telemetry_packet" - } - ], - "title": "Safety", - "transformations": [ - { - "id": "extractFields", - "options": { - "delimiter": ",", - "format": "json", - "jsonPaths": [ - { - "path": "ProximitySensor1" - } - ], - "source": "ProximitySensors" - } - }, - { - "id": "extractFields", - "options": { - "delimiter": ",", - "format": "json", - "jsonPaths": [ - { - "path": "ProtectionTrip" - } - ], - "source": "MBMS" - } - }, - { - "id": "extractFields", - "options": { - "delimiter": ",", - "format": "json", - "jsonPaths": [ - { - "path": "MalfunctionIndicatorActive" - } - ], - "source": "Battery" - } - }, - { - "id": "extractFields", - "options": { - "delimiter": ",", - "format": "json", - "jsonPaths": [ - { - "path": "Error" - } - ], - "source": "Contactor" } } ], + "title": "Safety", "type": "timeseries" }, { "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "fieldConfig": { "defaults": { @@ -1474,13 +1102,13 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "12.4.0-21490573584", + "pluginVersion": "12.3.1", "targets": [ { "dataset": "tsdb", "datasource": { "type": "grafana-postgresql-datasource", - "uid": "af4xjlz3vm29sd" + "uid": "ffbv3rpe7yy2oc" }, "editorMode": "code", "format": "table", @@ -1490,21 +1118,7 @@ "sql": { "columns": [ { - "parameters": [ - { - "name": "\"Timestamp\"", - "type": "functionParameter" - } - ], - "type": "function" - }, - { - "parameters": [ - { - "name": "\"Distance\"", - "type": "functionParameter" - } - ], + "parameters": [], "type": "function" } ], @@ -1517,27 +1131,10 @@ } ], "limit": 50 - }, - "table": "lap" - } - ], - "title": "Total Distance", - "transformations": [ - { - "id": "extractFields", - "options": { - "delimiter": ",", - "format": "json", - "jsonPaths": [ - { - "path": "distance" - } - ], - "replace": true, - "source": "data" } } ], + "title": "Total Distance", "type": "stat" } ], @@ -1556,6 +1153,5 @@ "timezone": "browser", "title": "Das Telemetry Base Dashboard (History)", "uid": "shkw5wr", - "version": 11, - "weekStart": "" + "version": 2 } \ No newline at end of file diff --git a/grafana/provisioning/datasources/datasources.yaml b/grafana/provisioning/datasources/datasources.yaml index b0b45ac..8ac49cf 100644 --- a/grafana/provisioning/datasources/datasources.yaml +++ b/grafana/provisioning/datasources/datasources.yaml @@ -11,6 +11,23 @@ datasources: jsonData: username: ${MQTT_USERNAME} uri: host.docker.internal:1883 + + - name: grafana-postgresql-datasource + type: postgres + url: l6yyro58r7.wy9edrssy5.tsdb.cloud.timescale.com:38572 + database: tsdb + user: ${POSTGRES_USERNAME} + secureJsonData: + password: ${POSTGRES_PASSWORD} + jsonData: + sslmode: "require" + postgresVersion: 9.3 + timescaledb: true + minInterval: 1m + maxOpenConns: 100 + maxIdleConns: 100 + maxLifetime: 14400 + editable: true # - name: Postgres # type: postgres # url: postgres:5432 From 50e2069024866ee21391ee960b74c87a156a5822 Mon Sep 17 00:00:00 2001 From: Dastine Date: Sat, 7 Feb 2026 14:59:39 -0700 Subject: [PATCH 3/5] Update environment configuration to use environment variables for PostgreSQL host url --- grafana/.env.example | 3 ++- grafana/provisioning/datasources/datasources.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/grafana/.env.example b/grafana/.env.example index 206e71d..9f11bcf 100644 --- a/grafana/.env.example +++ b/grafana/.env.example @@ -1,4 +1,5 @@ MQTT_PASSWORD=yourpassword MQTT_USERNAME=yourusername POSTGRES_USERNAME=yourusername -POSTGRES_PASSWORD=yourpassword \ No newline at end of file +POSTGRES_PASSWORD=yourpassword +POSTGRES_HOST=yourhost \ No newline at end of file diff --git a/grafana/provisioning/datasources/datasources.yaml b/grafana/provisioning/datasources/datasources.yaml index 8ac49cf..270d717 100644 --- a/grafana/provisioning/datasources/datasources.yaml +++ b/grafana/provisioning/datasources/datasources.yaml @@ -14,7 +14,7 @@ datasources: - name: grafana-postgresql-datasource type: postgres - url: l6yyro58r7.wy9edrssy5.tsdb.cloud.timescale.com:38572 + url: ${POSTGRES_HOST} database: tsdb user: ${POSTGRES_USERNAME} secureJsonData: From c9dd614f4c0d38cb6f10c7b2bffc95ab67cdb55f Mon Sep 17 00:00:00 2001 From: Dastine Date: Sat, 7 Feb 2026 15:14:35 -0700 Subject: [PATCH 4/5] Add environment variable configuration for PostgreSQL in Grafana setup --- grafana/docker-compose.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/grafana/docker-compose.yml b/grafana/docker-compose.yml index ba04e92..eaf3372 100644 --- a/grafana/docker-compose.yml +++ b/grafana/docker-compose.yml @@ -13,7 +13,11 @@ services: - GF_SECURITY_ADMIN_USER=admin - GF_SECURITY_ADMIN_PASSWORD=admin - GF_INSTALL_PLUGINS=grafana-mqtt-datasource + - MQTT_USERNAME=${MQTT_USERNAME} - MQTT_PASSWORD=${MQTT_PASSWORD} + - POSTGRES_USERNAME=${POSTGRES_USERNAME} + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - POSTGRES_HOST=${POSTGRES_HOST} volumes: grafana-storage: From e4582a8fc5e6cffa9e69502801df722e39cd8945 Mon Sep 17 00:00:00 2001 From: Dastine Date: Sat, 7 Feb 2026 16:37:12 -0700 Subject: [PATCH 5/5] Remove POSTGRES_HOST environment variable from Grafana configuration --- grafana/docker-compose.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/grafana/docker-compose.yml b/grafana/docker-compose.yml index eaf3372..bede113 100644 --- a/grafana/docker-compose.yml +++ b/grafana/docker-compose.yml @@ -17,7 +17,5 @@ services: - MQTT_PASSWORD=${MQTT_PASSWORD} - POSTGRES_USERNAME=${POSTGRES_USERNAME} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - - POSTGRES_HOST=${POSTGRES_HOST} - volumes: grafana-storage: