update grafana

This commit is contained in:
xbgmsharp
2023-10-05 23:32:24 +02:00
parent 57d38ba893
commit 01c20651a4
6 changed files with 1310 additions and 2352 deletions

View File

@@ -20,8 +20,21 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 6,
"links": [],
"id": 1,
"links": [
{
"asDropdown": false,
"icon": "external link",
"includeVars": true,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "New link",
"tooltip": "",
"type": "dashboards",
"url": ""
}
],
"liveNow": false,
"panels": [
{
@@ -83,7 +96,7 @@
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "9.5.1",
"pluginVersion": "10.1.0",
"targets": [
{
"datasource": {
@@ -220,7 +233,7 @@
},
"textMode": "auto"
},
"pluginVersion": "9.5.1",
"pluginVersion": "10.1.0",
"targets": [
{
"datasource": {
@@ -346,7 +359,7 @@
},
"textMode": "auto"
},
"pluginVersion": "9.5.1",
"pluginVersion": "10.1.0",
"targets": [
{
"datasource": {
@@ -481,7 +494,7 @@
},
"textMode": "auto"
},
"pluginVersion": "9.5.1",
"pluginVersion": "10.1.0",
"targets": [
{
"datasource": {
@@ -591,7 +604,7 @@
},
"textMode": "auto"
},
"pluginVersion": "9.5.1",
"pluginVersion": "10.1.0",
"targets": [
{
"datasource": {
@@ -719,7 +732,7 @@
},
"textMode": "auto"
},
"pluginVersion": "9.5.1",
"pluginVersion": "10.1.0",
"targets": [
{
"datasource": {
@@ -766,50 +779,108 @@
"type": "stat"
},
{
"aliasColors": {
"electrical.batteries.256.current.mean": "blue"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "postgres",
"uid": "PCC52D03280B7034C"
},
"fill": 1,
"fillGradient": 0,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"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",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "line+area"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "transparent",
"value": null
},
{
"color": "red",
"value": -1
},
{
"color": "red",
"value": 1
}
]
},
"unit": "amp"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "electrical.batteries.256.current.mean"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "blue",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 5
},
"hiddenSeries": false,
"id": 47,
"legend": {
"avg": true,
"current": false,
"max": true,
"min": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
"legend": {
"calcs": [
"mean",
"max",
"min"
],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"percentage": false,
"pluginVersion": "9.5.1",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"pluginVersion": "10.1.0",
"targets": [
{
"datasource": {
@@ -835,7 +906,8 @@
"measurement": "electrical.batteries.256.current",
"orderByTime": "ASC",
"policy": "default",
"rawSql": "",
"rawQuery": true,
"rawSql": "SET vessel.id = '${__user.login}';\nSELECT m.time, cast(m.metrics->'electrical.batteries.House.current' as NUMERIC) as current FROM api.metrics m WHERE $__timeFilter(time) AND m.vessel_id = '${boat}';\n",
"refId": "A",
"resultFormat": "time_series",
"select": [
@@ -872,56 +944,379 @@
"tags": []
}
],
"thresholds": [
{
"$$hashKey": "object:8288",
"colorMode": "critical",
"fill": true,
"line": true,
"op": "gt",
"value": -1,
"yaxis": "left"
},
{
"$$hashKey": "object:8294",
"colorMode": "ok",
"fill": true,
"line": true,
"op": "gt",
"value": 1,
"yaxis": "left"
}
],
"timeRegions": [],
"title": "House Amps",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
"type": "timeseries"
},
{
"datasource": {
"type": "postgres",
"uid": "PCC52D03280B7034C"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:8148",
"format": "amp",
"logBase": 1,
"show": true
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"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",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 10,
"x": 12,
"y": 5
},
"id": 48,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"$$hashKey": "object:8149",
"format": "short",
"logBase": 1,
"show": true
"datasource": {
"type": "postgres",
"uid": "PCC52D03280B7034C"
},
"editorMode": "code",
"format": "table",
"rawQuery": true,
"rawSql": "SET vessel.id = '${__user.login}';\nSELECT m.time, cast(m.metrics->'electrical.batteries.House.capacity.stateOfCharge' as NUMERIC) * 100 as stateOfCharge FROM api.metrics m WHERE $__timeFilter(time) AND m.vessel_id = '${boat}';\n",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
}
],
"yaxis": {
"align": false
}
"title": "System - Battery SOC (State of Charge)",
"type": "timeseries"
},
{
"datasource": {
"type": "postgres",
"uid": "PCC52D03280B7034C"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "Volts",
"axisPlacement": "auto",
"barAlignment": 0,
"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",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "volt"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "current"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "blue",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "voltage"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "yellow",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "current"
},
"properties": [
{
"id": "unit",
"value": "amp"
},
{
"id": "custom.axisLabel",
"value": "Amps"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 13
},
"id": 37,
"options": {
"legend": {
"calcs": [
"mean",
"max",
"min"
],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "10.1.0",
"targets": [
{
"datasource": {
"type": "postgres",
"uid": "PCC52D03280B7034C"
},
"editorMode": "code",
"format": "table",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "electrical.batteries.256.voltage",
"orderByTime": "ASC",
"policy": "default",
"rawQuery": true,
"rawSql": "SET vessel.id = '${__user.login}';\nSELECT m.time, cast(m.metrics->'electrical.batteries.House.voltage' as NUMERIC) as voltage FROM api.metrics m WHERE $__timeFilter(time) AND m.vessel_id = '${boat}';\n",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"tags": []
},
{
"datasource": {
"type": "postgres",
"uid": "PCC52D03280B7034C"
},
"editorMode": "code",
"format": "table",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"hide": false,
"measurement": "electrical.batteries.256.current",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"value\") FROM \"electrical.batteries.256.current\" WHERE $timeFilter GROUP BY time($__interval) fill(null)",
"rawQuery": true,
"rawSql": "SET vessel.id = '${__user.login}';\nSELECT m.time, cast(m.metrics->'electrical.batteries.House.current' as NUMERIC) as current FROM api.metrics m WHERE $__timeFilter(time) AND m.vessel_id = '${boat}';\n",
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"tags": []
}
],
"title": "Battery Voltage and Current",
"type": "timeseries"
},
{
"aliasColors": {
@@ -938,9 +1333,9 @@
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"w": 10,
"x": 12,
"y": 5
"y": 13
},
"hiddenSeries": false,
"id": 45,
@@ -960,7 +1355,7 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.5.1",
"pluginVersion": "10.1.0",
"pointradius": 2,
"points": false,
"renderer": "flot",
@@ -1042,180 +1437,6 @@
"align": false
}
},
{
"aliasColors": {
"electrical.batteries.256.current.mean": "blue",
"electrical.batteries.256.voltage.mean": "yellow"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "postgres",
"uid": "PCC52D03280B7034C"
},
"description": "",
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 13
},
"hiddenSeries": false,
"id": 37,
"legend": {
"alignAsTable": false,
"avg": true,
"current": false,
"max": true,
"min": true,
"rightSide": false,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.5.1",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"$$hashKey": "object:5017",
"alias": "electrical.batteries.256.current.mean",
"yaxis": 2
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "postgres",
"uid": "PCC52D03280B7034C"
},
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "electrical.batteries.256.voltage",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": []
},
{
"datasource": {
"type": "postgres",
"uid": "PCC52D03280B7034C"
},
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"hide": false,
"measurement": "electrical.batteries.256.current",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"value\") FROM \"electrical.batteries.256.current\" WHERE $timeFilter GROUP BY time($__interval) fill(null)",
"rawQuery": true,
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": []
}
],
"thresholds": [],
"timeRegions": [],
"title": "House Bank Voltage vs Current",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:4372",
"format": "volt",
"label": "Volts",
"logBase": 1,
"show": true
},
{
"$$hashKey": "object:4373",
"format": "amp",
"label": "Amps",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {
"From grid": "#1f78c1",
@@ -1232,9 +1453,9 @@
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"w": 10,
"x": 12,
"y": 13
"y": 21
},
"hiddenSeries": false,
"id": 10,
@@ -1258,7 +1479,7 @@
},
"paceLength": 10,
"percentage": false,
"pluginVersion": "9.5.1",
"pluginVersion": "10.1.0",
"pointradius": 2,
"points": false,
"renderer": "flot",
@@ -1416,6 +1637,25 @@
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"datasource": {
"type": "postgres",
"uid": "PCC52D03280B7034C"
},
"definition": "SET vessel.id = '${__user.login}';\nSELECT rtrim(key, 'voltage') AS __text ,key AS __value FROM api.monitoring_view2 where key ILIKE 'electrical.batteries%voltage';",
"hide": 0,
"includeAll": false,
"label": "Batteries",
"multi": false,
"name": "batteries",
"options": [],
"query": "SET vessel.id = '${__user.login}';\nSELECT rtrim(key, 'voltage') AS __text ,key AS __value FROM api.monitoring_view2 where key ILIKE 'electrical.batteries%voltage';",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
@@ -1447,9 +1687,9 @@
"30d"
]
},
"timezone": "",
"timezone": "utc",
"title": "Electrical System",
"uid": "rk0FTiIMk",
"version": 1,
"version": 11,
"weekStart": ""
}