From 6cf832eb34c8e97afe2d0e0b97509a87b5fcdf75 Mon Sep 17 00:00:00 2001 From: Pieter Hollander Date: Mon, 18 Mar 2024 11:22:23 +0100 Subject: [PATCH] Add opendtu_events.json --- grafana/opendtu_events.json | 158 ++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 grafana/opendtu_events.json diff --git a/grafana/opendtu_events.json b/grafana/opendtu_events.json new file mode 100644 index 0000000..d33a8f4 --- /dev/null +++ b/grafana/opendtu_events.json @@ -0,0 +1,158 @@ +{ + "__inputs": [ + { + "name": "DS_ENERGY", + "label": "energy", + "description": "", + "type": "datasource", + "pluginId": "grafana-postgresql-datasource", + "pluginName": "PostgreSQL" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.3.3" + }, + { + "type": "datasource", + "id": "grafana-postgresql-datasource", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "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": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "${DS_ENERGY}" + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.3.3", + "targets": [ + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "${DS_ENERGY}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT\n timestamp AS time,\n inverter_serial,\n message_id,\n message,\n start_time,\n end_time\nFROM\n opendtu_events\nORDER BY\n timestamp DESC", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Panel Title", + "type": "table" + } + ], + "refresh": "5s", + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now/d", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "opendtu_events", + "uid": "be2896ae-7908-4fe6-a47f-f999afd71a29", + "version": 3, + "weekStart": "" +} \ No newline at end of file