diff --git a/docker-compose/grafana/dashboards/archiver_timescale.json b/docker-compose/grafana/dashboards/archiver_timescale.json index fbeeb125b5c4767ba584dd5ec7bdda3901e3ae7b..b363704aa5225bf8419a50c3c9b8aa9a7b4fda8b 100644 --- a/docker-compose/grafana/dashboards/archiver_timescale.json +++ b/docker-compose/grafana/dashboards/archiver_timescale.json @@ -63,7 +63,7 @@ "options": { "showHeader": true }, - "pluginVersion": "8.2.3", + "pluginVersion": "8.2.4", "targets": [ { "format": "table", @@ -135,7 +135,7 @@ "options": { "showHeader": true }, - "pluginVersion": "8.2.3", + "pluginVersion": "8.2.4", "targets": [ { "format": "table", @@ -238,6 +238,7 @@ "mode": "single" } }, + "pluginVersion": "8.2.4", "targets": [ { "format": "time_series", @@ -271,17 +272,99 @@ ], "title": "SDP - FPGA Temperature", "type": "timeseries" + }, + { + "datasource": "TimescaleDB", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "custom": { + "fillOpacity": 70, + "lineWidth": 1 + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 9, + "options": { + "colWidth": 0.5, + "legend": { + "displayMode": "list", + "placement": "bottom" + }, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.2.4", + "targets": [ + { + "format": "time_series", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n temp_time AS \"time\",\n temperature[1] as \"temp[1]\",\n temperature[2] as \"temp[2]\",\n temperature[3] as \"temp[3]\",\n temperature[4] as \"temp[4]\",\n temperature[5] as \"temp[5]\",\n temperature[6] as \"temp[6]\",\n temperature[7] as \"temp[7]\",\n temperature[8] as \"temp[8]\",\n temperature[9] as \"temp[9]\",\n temperature[10] as \"temp[10]\",\n temperature[11] as \"temp[11]\",\n temperature[12] as \"temp[12]\",\n temperature[13] as \"temp[13]\",\n temperature[14] as \"temp[14]\",\n temperature[15] as \"temp[15]\",\n temperature[16] as \"temp[16]\"\nFROM sdp_masked_temp_values\nWHERE\n $__timeFilter(temp_time)\nORDER BY temp_time", + "refId": "B", + "select": [ + [ + { + "params": [ + "temperature[1]" + ], + "type": "column" + } + ] + ], + "table": "sdp_masked_temp_values", + "timeColumn": "temp_time", + "timeColumnType": "timestamptz", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "SDP - FPGA Temperature", + "type": "status-history" } ], "refresh": "", - "schemaVersion": 31, + "schemaVersion": 32, "style": "dark", "tags": [], "templating": { "list": [] }, "time": { - "from": "now-6h", + "from": "now-1h", "to": "now" }, "timepicker": {}, diff --git a/docker-compose/timescaledb/resources/05_lofar_views.sql b/docker-compose/timescaledb/resources/05_lofar_views.sql index f28f0efc7d0deb80aa345a04b5c7854b9b0732fb..0cbb7af85ecb6d5186ee807b634761ef3afb0922 100644 --- a/docker-compose/timescaledb/resources/05_lofar_views.sql +++ b/docker-compose/timescaledb/resources/05_lofar_views.sql @@ -36,4 +36,5 @@ inner join sdp_tr_fpga_mask as m on time_bucket('1 second',t.time) = time_bucket('1 second',m.time) inner join generate_series(1,16) gs on m.value_r[gs]=true +group by t."time", m."time",t.value_r,m.value_r order by t."time";