Update grafana dashboards and configuration

This commit is contained in:
xbgmsharp
2023-05-03 17:04:08 +02:00
parent 42b070baa8
commit 11489ce4aa
7 changed files with 189 additions and 40 deletions

View File

@@ -54,7 +54,9 @@
}, },
"custom": { "custom": {
"align": "auto", "align": "auto",
"displayMode": "auto", "cellOptions": {
"type": "auto"
},
"filterable": false, "filterable": false,
"inspect": false "inspect": false
}, },
@@ -109,6 +111,7 @@
"id": 2, "id": 2,
"options": { "options": {
"footer": { "footer": {
"countRows": false,
"fields": "", "fields": "",
"reducer": [ "reducer": [
"sum" "sum"
@@ -118,7 +121,7 @@
"showHeader": true, "showHeader": true,
"sortBy": [] "sortBy": []
}, },
"pluginVersion": "9.3.1", "pluginVersion": "9.4.3",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -130,7 +133,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "with config as ( select set_config('vessel.id', '${boat}', false) )\nSELECT * from api.logs_view", "rawSql": "SET vessel.client_id = '${__user.login}';\nSELECT * from api.logs_view",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -165,7 +168,7 @@
"where": [] "where": []
} }
], ],
"title": "Logbook", "title": "Logbook ${__user.email} / ${__user.login}",
"type": "table" "type": "table"
}, },
{ {
@@ -180,7 +183,9 @@
}, },
"custom": { "custom": {
"align": "auto", "align": "auto",
"displayMode": "auto", "cellOptions": {
"type": "auto"
},
"filterable": false, "filterable": false,
"inspect": false "inspect": false
}, },
@@ -235,6 +240,7 @@
"id": 5, "id": 5,
"options": { "options": {
"footer": { "footer": {
"countRows": false,
"fields": "", "fields": "",
"reducer": [ "reducer": [
"sum" "sum"
@@ -244,7 +250,7 @@
"showHeader": true, "showHeader": true,
"sortBy": [] "sortBy": []
}, },
"pluginVersion": "9.3.1", "pluginVersion": "9.4.3",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -256,7 +262,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "with config as ( select set_config('vessel.id', '${boat}', false) )\nSELECT * from api.stays_view", "rawSql": "SET vessel.client_id = '${__user.login}';\nSELECT * from api.stays_view",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -306,7 +312,9 @@
}, },
"custom": { "custom": {
"align": "auto", "align": "auto",
"displayMode": "auto", "cellOptions": {
"type": "auto"
},
"filterable": false, "filterable": false,
"inspect": false "inspect": false
}, },
@@ -361,6 +369,7 @@
"id": 6, "id": 6,
"options": { "options": {
"footer": { "footer": {
"countRows": false,
"fields": "", "fields": "",
"reducer": [ "reducer": [
"sum" "sum"
@@ -370,7 +379,7 @@
"showHeader": true, "showHeader": true,
"sortBy": [] "sortBy": []
}, },
"pluginVersion": "9.3.1", "pluginVersion": "9.4.3",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -382,7 +391,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "with config as ( select set_config('vessel.id', '${boat}', false) )\nselect * from api.moorages_view", "rawSql": "SET vessel.client_id = '${__user.login}';\nselect * from api.moorages_view",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -421,7 +430,9 @@
"type": "table" "type": "table"
} }
], ],
"schemaVersion": 37, "refresh": "",
"revision": 1,
"schemaVersion": 38,
"style": "dark", "style": "dark",
"tags": [], "tags": [],
"templating": { "templating": {
@@ -431,7 +442,7 @@
"type": "postgres", "type": "postgres",
"uid": "PCC52D03280B7034C" "uid": "PCC52D03280B7034C"
}, },
"definition": "SELECT\n v.name AS __text,\n m.client_id AS __value\n FROM auth.vessels v\n JOIN api.metadata m ON v.owner_email = '${__user.email}' and m.vessel_id = v.vessel_id;", "definition": "SET \"user.email\" = '${__user.email}';\nSET vessel.client_id = '${__user.login}';\nSELECT\n v.name AS __text,\n m.client_id AS __value\n FROM auth.vessels v\n JOIN api.metadata m ON v.owner_email = '${__user.email}' and m.vessel_id = v.vessel_id;",
"description": "Vessel Name", "description": "Vessel Name",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
@@ -439,7 +450,7 @@
"multi": false, "multi": false,
"name": "boat", "name": "boat",
"options": [], "options": [],
"query": "SELECT\n v.name AS __text,\n m.client_id AS __value\n FROM auth.vessels v\n JOIN api.metadata m ON v.owner_email = '${__user.email}' and m.vessel_id = v.vessel_id;", "query": "SET \"user.email\" = '${__user.email}';\nSET vessel.client_id = '${__user.login}';\nSELECT\n v.name AS __text,\n m.client_id AS __value\n FROM auth.vessels v\n JOIN api.metadata m ON v.owner_email = '${__user.email}' and m.vessel_id = v.vessel_id;",
"refresh": 1, "refresh": 1,
"regex": "", "regex": "",
"skipUrlSync": false, "skipUrlSync": false,

View File

@@ -92,7 +92,7 @@
"text": {}, "text": {},
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.3.1", "pluginVersion": "9.4.3",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -104,7 +104,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n time AS \"time\",\n cast(metrics-> 'electrical.batteries.AUX2.voltage' AS numeric) AS AUX2Voltage\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1", "rawSql": "SET vessel.client_id = '${__user.login}';\nSELECT\n time AS \"time\",\n cast(metrics-> 'electrical.batteries.AUX2.voltage' AS numeric) AS AUX2Voltage\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -198,7 +198,7 @@
"text": {}, "text": {},
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.3.1", "pluginVersion": "9.4.3",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -210,7 +210,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n time AS \"time\",\n cast(metrics-> 'environment.outside.temperature' AS numeric) - 273.15 AS OutsideTemperature\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1", "rawSql": "SET vessel.client_id = '${__user.login}';\nSELECT\n time AS \"time\",\n cast(metrics-> 'environment.outside.temperature' AS numeric) - 273.15 AS OutsideTemperature\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -370,7 +370,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n time AS \"time\",\n cast(metrics-> 'electrical.batteries.AUX2.voltage' AS numeric) AS AUX2,\n\tcast(metrics-> 'electrical.batteries.House.voltage' AS numeric) AS House,\n\tcast(metrics-> 'environment.rpi.pijuice.gpioVoltage' AS numeric) AS gpioVoltage,\n\tcast(metrics-> 'electrical.batteries.Seatalk.voltage' AS numeric) AS SeatalkVoltage,\n\tcast(metrics-> 'electrical.batteries.Starter.voltage' AS numeric) AS StarterVoltage,\n\tcast(metrics-> 'environment.rpi.pijuice.batteryVoltage' AS numeric) AS RPIBatteryVoltage,\n\tcast(metrics-> 'electrical.batteries.victronDevice.voltage' AS numeric) AS victronDeviceVoltage\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n\tAND client_id = '${boat}'\nORDER BY 1", "rawSql": "SET vessel.client_id = '${__user.login}';\nSELECT\n time AS \"time\",\n cast(metrics-> 'electrical.batteries.AUX2.voltage' AS numeric) AS AUX2,\n\tcast(metrics-> 'electrical.batteries.House.voltage' AS numeric) AS House,\n\tcast(metrics-> 'environment.rpi.pijuice.gpioVoltage' AS numeric) AS gpioVoltage,\n\tcast(metrics-> 'electrical.batteries.Seatalk.voltage' AS numeric) AS SeatalkVoltage,\n\tcast(metrics-> 'electrical.batteries.Starter.voltage' AS numeric) AS StarterVoltage,\n\tcast(metrics-> 'environment.rpi.pijuice.batteryVoltage' AS numeric) AS RPIBatteryVoltage,\n\tcast(metrics-> 'electrical.batteries.victronDevice.voltage' AS numeric) AS victronDeviceVoltage\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n\tAND client_id = '${boat}'\nORDER BY 1",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -505,7 +505,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n time AS \"time\",\n cast(metrics-> 'environment.water.temperature' AS numeric) - 273.15 AS waterTemperature,\n\tcast(metrics-> 'environment.inside.temperature' AS numeric) - 273.15 AS insideTemperature,\n\tcast(metrics-> 'environment.outside.temperature' AS numeric) - 273.15 AS outsideTemperature\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1", "rawSql": "SET vessel.client_id = '${__user.login}';\nSELECT\n time AS \"time\",\n cast(metrics-> 'environment.water.temperature' AS numeric) - 273.15 AS waterTemperature,\n\tcast(metrics-> 'environment.inside.temperature' AS numeric) - 273.15 AS insideTemperature,\n\tcast(metrics-> 'environment.outside.temperature' AS numeric) - 273.15 AS outsideTemperature\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -638,7 +638,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "with config as (select set_config('vessel.id', '${boat}', false) ) select * from api.monitoring_view", "rawSql": "SET vessel.client_id = '${__user.login}';\nwith config as (select set_config('vessel.id', '${boat}', false) ) select * from api.monitoring_view",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -683,8 +683,9 @@
"type": "timeseries" "type": "timeseries"
} }
], ],
"refresh": false, "refresh": "",
"schemaVersion": 37, "revision": 1,
"schemaVersion": 38,
"style": "dark", "style": "dark",
"tags": [], "tags": [],
"templating": { "templating": {
@@ -694,7 +695,7 @@
"type": "postgres", "type": "postgres",
"uid": "PCC52D03280B7034C" "uid": "PCC52D03280B7034C"
}, },
"definition": " SELECT\n v.name AS __text,\n m.client_id AS __value\n FROM auth.vessels v\n JOIN api.metadata m ON v.owner_email = '${__user.email}' and m.vessel_id = v.vessel_id;", "definition": "SET \"user.email\" = '${__user.email}';\nSET vessel.client_id = '${__user.login}';\nSELECT\n v.name AS __text,\n m.client_id AS __value\n FROM auth.vessels v\n JOIN api.metadata m ON v.owner_email = '${__user.email}' and m.vessel_id = v.vessel_id;",
"description": "Vessel name", "description": "Vessel name",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
@@ -702,7 +703,7 @@
"multi": false, "multi": false,
"name": "boat", "name": "boat",
"options": [], "options": [],
"query": " SELECT\n v.name AS __text,\n m.client_id AS __value\n FROM auth.vessels v\n JOIN api.metadata m ON v.owner_email = '${__user.email}' and m.vessel_id = v.vessel_id;", "query": "SET \"user.email\" = '${__user.email}';\nSET vessel.client_id = '${__user.login}';\nSELECT\n v.name AS __text,\n m.client_id AS __value\n FROM auth.vessels v\n JOIN api.metadata m ON v.owner_email = '${__user.email}' and m.vessel_id = v.vessel_id;",
"refresh": 1, "refresh": 1,
"regex": "", "regex": "",
"skipUrlSync": false, "skipUrlSync": false,
@@ -712,7 +713,7 @@
] ]
}, },
"time": { "time": {
"from": "now-12h", "from": "now-30d",
"to": "now" "to": "now"
}, },
"timepicker": { "timepicker": {

View File

@@ -603,7 +603,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n time AS \"time\",\n cast(metrics-> 'environment.outside.pressure' AS numeric) * 0.00029530 AS outsidePressure\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1\n", "rawSql": "SET vessel.client_id = '${__user.login}';\nSELECT\n time AS \"time\",\n cast(metrics-> 'environment.outside.pressure' AS numeric) * 0.00029530 AS outsidePressure\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1\n",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -726,7 +726,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n time AS \"time\",\n cast(metrics-> 'environment.inside.temperature' AS numeric) - 273.15 AS insideTemperature\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1", "rawSql": "SET vessel.client_id = '${__user.login}';\nSELECT\n time AS \"time\",\n cast(metrics-> 'environment.inside.temperature' AS numeric) - 273.15 AS insideTemperature\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -852,7 +852,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n time AS \"time\",\n cast(metrics-> 'environment.outside.humidity' AS numeric) * 100 AS insideHumidity\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1", "rawSql": "SET vessel.client_id = '${__user.login}';\nSELECT\n time AS \"time\",\n cast(metrics-> 'environment.outside.humidity' AS numeric) * 100 AS insideHumidity\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -976,7 +976,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n time AS \"time\",\n cast(metrics-> 'environment.engine.temperature' AS numeric) - 273.15 AS insideTemperature\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1", "rawSql": "SET vessel.client_id = '${__user.login}';\nSELECT\n time AS \"time\",\n cast(metrics-> 'environment.engine.temperature' AS numeric) - 273.15 AS insideTemperature\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -1134,7 +1134,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT time AS \"time\", cast(windspeedapparent AS numeric) * 1.9438444924406 AS windSpeed\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1", "rawSql": "SET vessel.client_id = '${__user.login}';\nSELECT time AS \"time\", cast(windspeedapparent AS numeric) * 1.9438444924406 AS windSpeed\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -1331,7 +1331,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n time AS \"time\",\n cast(metrics-> 'environment.water.temperature' AS numeric) - 273.15 AS waterTemperature,\n cast(metrics-> 'environment.outside.temperature' AS numeric) - 273.15 AS outsideTemperature,\n cast(metrics-> 'environment.inside.temperature' AS numeric) - 273.15 AS insideTemperature,\n cast(metrics-> 'environment.inside.fridge.temperature' AS numeric) - 273.15 AS fridgeTemperature\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1", "rawSql": "SET vessel.client_id = '${__user.login}';\nSELECT\n time AS \"time\",\n cast(metrics-> 'environment.water.temperature' AS numeric) - 273.15 AS waterTemperature,\n cast(metrics-> 'environment.outside.temperature' AS numeric) - 273.15 AS outsideTemperature,\n cast(metrics-> 'environment.inside.temperature' AS numeric) - 273.15 AS insideTemperature,\n cast(metrics-> 'environment.inside.fridge.temperature' AS numeric) - 273.15 AS fridgeTemperature\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -1439,7 +1439,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n time AS \"time\",\n cast(metrics-> 'environment.outside.temperature' AS numeric) - 273.15 AS outsideTemperature\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1", "rawSql": "SET vessel.client_id = '${__user.login}';\nSELECT\n time AS \"time\",\n cast(metrics-> 'environment.outside.temperature' AS numeric) - 273.15 AS outsideTemperature\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -1576,7 +1576,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n time AS \"time\",\n cast(metrics-> 'environment.outside.pressure' AS numeric) * 0.00029530 AS outsideTemperature,\n cast(metrics-> 'environment.inside.pressure' AS numeric) * 0.00029530 AS insideTemperature,\n cast(metrics-> 'environment.inside.fridge.pressure' AS numeric) * 0.00029530 AS fridgeTemperature\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1", "rawSql": "SET vessel.client_id = '${__user.login}';\nSELECT\n time AS \"time\",\n cast(metrics-> 'environment.outside.pressure' AS numeric) * 0.00029530 AS outsideTemperature,\n cast(metrics-> 'environment.inside.pressure' AS numeric) * 0.00029530 AS insideTemperature,\n cast(metrics-> 'environment.inside.fridge.pressure' AS numeric) * 0.00029530 AS fridgeTemperature\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -1742,7 +1742,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n time AS \"time\",\n anglespeedapparent\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1", "rawSql": "SET vessel.client_id = '${__user.login}';\nSELECT\n time AS \"time\",\n anglespeedapparent\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -1878,7 +1878,7 @@
"group": [], "group": [],
"metricColumn": "none", "metricColumn": "none",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT\n time AS \"time\",\n windSpeedApparent\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1", "rawSql": "SET vessel.client_id = '${__user.login}';\nSELECT\n time AS \"time\",\n windSpeedApparent\nFROM api.metrics\nWHERE\n $__timeFilter(time)\n AND client_id = '${boat}'\nORDER BY 1",
"refId": "A", "refId": "A",
"select": [ "select": [
[ [
@@ -1947,7 +1947,7 @@
"type": "postgres", "type": "postgres",
"uid": "PCC52D03280B7034C" "uid": "PCC52D03280B7034C"
}, },
"definition": "SELECT\n v.name AS __text,\n m.client_id AS __value\n FROM auth.vessels v\n JOIN api.metadata m ON v.owner_email = '${__user.email}' and m.vessel_id = v.vessel_id;", "definition": "SET \"user.email\" = '${__user.email}';\nSET vessel.client_id = '${__user.login}';\nSELECT\n v.name AS __text,\n m.client_id AS __value\n FROM auth.vessels v\n JOIN api.metadata m ON v.owner_email = '${__user.email}' and m.vessel_id = v.vessel_id;",
"description": "Vessel Name", "description": "Vessel Name",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
@@ -1955,7 +1955,7 @@
"multi": false, "multi": false,
"name": "boat", "name": "boat",
"options": [], "options": [],
"query": "SELECT\n v.name AS __text,\n m.client_id AS __value\n FROM auth.vessels v\n JOIN api.metadata m ON v.owner_email = '${__user.email}' and m.vessel_id = v.vessel_id;", "query": "SET \"user.email\" = '${__user.email}';\nSET vessel.client_id = '${__user.login}';\nSELECT\n v.name AS __text,\n m.client_id AS __value\n FROM auth.vessels v\n JOIN api.metadata m ON v.owner_email = '${__user.email}' and m.vessel_id = v.vessel_id;",
"refresh": 1, "refresh": 1,
"regex": "", "regex": "",
"skipUrlSync": false, "skipUrlSync": false,

View File

@@ -0,0 +1,134 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "postgres",
"uid": "OIttR1sVk"
},
"gridPos": {
"h": 3,
"w": 24,
"x": 0,
"y": 0
},
"id": 1,
"targets": [
{
"datasource": {
"type": "postgres",
"uid": "OIttR1sVk"
},
"refId": "A"
}
],
"type": "welcome"
},
{
"datasource": {
"type": "postgres",
"uid": "OIttR1sVk"
},
"gridPos": {
"h": 12,
"w": 24,
"x": 0,
"y": 3
},
"id": 3,
"links": [],
"options": {
"folderId": 0,
"maxItems": 30,
"query": "",
"showHeadings": true,
"showRecentlyViewed": true,
"showSearch": false,
"showStarred": true,
"tags": []
},
"pluginVersion": "9.4.3",
"tags": [],
"targets": [
{
"datasource": {
"type": "postgres",
"uid": "OIttR1sVk"
},
"refId": "A"
}
],
"title": "Dashboards",
"type": "dashlist"
}
],
"refresh": "",
"revision": 1,
"schemaVersion": 38,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"hidden": true,
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
],
"type": "timepicker"
},
"timezone": "browser",
"title": "Home",
"version": 0,
"weekStart": ""
}

View File

@@ -11,3 +11,6 @@ auto_sign_up = true
enable_login_token = true enable_login_token = true
login_maximum_inactive_lifetime_duration = 12h login_maximum_inactive_lifetime_duration = 12h
login_maximum_lifetime_duration = 1d login_maximum_lifetime_duration = 1d
[dashboards]
default_home_dashboard_path = /etc/grafana/dashboards/home.json

View File

@@ -7,7 +7,7 @@ providers:
# <int> Org id. Default to 1 # <int> Org id. Default to 1
orgId: 1 orgId: 1
# <string> name of the dashboard folder. # <string> name of the dashboard folder.
folder: 'PostgSail' #folder: 'PostgSail'
# <string> folder UID. will be automatically generated if not specified # <string> folder UID. will be automatically generated if not specified
#folderUid: '' #folderUid: ''
# <string> provider type. Default to 'file' # <string> provider type. Default to 'file'
@@ -15,7 +15,7 @@ providers:
# <bool> disable dashboard deletion # <bool> disable dashboard deletion
disableDeletion: false disableDeletion: false
# <int> how often Grafana will scan for changed dashboards # <int> how often Grafana will scan for changed dashboards
updateIntervalSeconds: 10 updateIntervalSeconds: 60
# <bool> allow updating provisioned dashboards from the UI # <bool> allow updating provisioned dashboards from the UI
allowUiUpdates: true allowUiUpdates: true
options: options:

View File

@@ -14,5 +14,5 @@ datasources:
maxOpenConns: 10 # Grafana v5.4+ maxOpenConns: 10 # Grafana v5.4+
maxIdleConns: 2 # Grafana v5.4+ maxIdleConns: 2 # Grafana v5.4+
connMaxLifetime: 14400 # Grafana v5.4+ connMaxLifetime: 14400 # Grafana v5.4+
postgresVersion: 1400 # 903=9.3, 904=9.4, 905=9.5, 906=9.6, 1000=10 postgresVersion: 1500 # 903=9.3, 904=9.4, 905=9.5, 906=9.6, 1000=10
timescaledb: true timescaledb: true