diff --git a/energy-usage-dashboard.png b/energy-usage-dashboard.png new file mode 100644 index 0000000..4fa3feb Binary files /dev/null and b/energy-usage-dashboard.png differ diff --git a/grafana.energy-usage.json b/grafana.energy-usage.json new file mode 100644 index 0000000..47d03eb --- /dev/null +++ b/grafana.energy-usage.json @@ -0,0 +1,1597 @@ +{ + "__inputs": [ + { + "name": "DS_VICTORIAMETRICS", + "label": "Datasource", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + }, + { + "name": "VAR_GAS_STANDING", + "type": "constant", + "label": "gas_standing", + "value": "0.1785", + "description": "" + }, + { + "name": "VAR_GAS_UNIT", + "type": "constant", + "label": "gas_unit", + "value": "0.0277", + "description": "" + }, + { + "name": "VAR_ELECTRICITY_STANDING", + "type": "constant", + "label": "electricity_standing", + "value": "0.1932", + "description": "" + }, + { + "name": "VAR_ELECTRICITY_UNIT", + "type": "constant", + "label": "electricity_unit", + "value": "0.1579", + "description": "" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "7.1.5" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": null, + "iteration": 1599997887969, + "links": [], + "panels": [ + { + "collapsed": false, + "datasource": "${DS_VICTORIAMETRICS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 21, + "panels": [], + "title": "Meter Readings", + "type": "row" + }, + { + "datasource": "${DS_VICTORIAMETRICS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "grey", + "value": null + } + ] + }, + "unit": "kwatth" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 17, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.1.5", + "targets": [ + { + "expr": "electricity_meter_reading", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Electricity", + "type": "stat" + }, + { + "datasource": "${DS_VICTORIAMETRICS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "grey", + "value": null + } + ] + }, + "unit": "m3" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 1 + }, + "id": 24, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.1.5", + "targets": [ + { + "expr": "gas_meter_reading", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Gas", + "type": "stat" + }, + { + "datasource": "${DS_VICTORIAMETRICS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "grey", + "value": null + } + ] + }, + "unit": "kwatth" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 1 + }, + "id": 27, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.1.5", + "targets": [ + { + "expr": "(gas_meter_reading) * 10.96497333", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Gas", + "type": "stat" + }, + { + "collapsed": false, + "datasource": "${DS_VICTORIAMETRICS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 4 + }, + "id": 19, + "panels": [], + "title": "Electricity", + "type": "row" + }, + { + "cacheTimeout": null, + "datasource": "${DS_VICTORIAMETRICS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "kwatt" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 6, + "x": 0, + "y": 5 + }, + "id": 6, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.1.5", + "targets": [ + { + "expr": "electricity_draw", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "instant": true, + "interval": "", + "legendFormat": "Now", + "measurement": "electricity", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumption\") FROM \"electricity\" WHERE $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumption" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "title": "Current Draw", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "${DS_VICTORIAMETRICS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 2, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "kwatth" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 5 + }, + "id": 10, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.1.5", + "targets": [ + { + "expr": "electricity_consumption_daily", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "instant": true, + "interval": "", + "legendFormat": "Today", + "measurement": "electricity", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"cost\")/100 FROM \"electricity\" WHERE $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cost" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + }, + { + "expr": "electricity_consumption_weekly", + "instant": true, + "interval": "", + "legendFormat": "This week", + "refId": "B" + }, + { + "expr": "electricity_consumption_monthly", + "instant": true, + "interval": "", + "legendFormat": "This month", + "refId": "C" + } + ], + "title": "Usage (Energy)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "${DS_VICTORIAMETRICS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 2, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "currencyGBP" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 5 + }, + "id": 12, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.1.5", + "targets": [ + { + "expr": "electricity_consumption_daily * $electricity_unit", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "instant": true, + "interval": "", + "legendFormat": "Today", + "measurement": "electricity", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"total_cost\")/100 FROM \"electricity\" WHERE $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cost" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + }, + { + "expr": "electricity_consumption_weekly * $electricity_unit", + "instant": true, + "interval": "", + "legendFormat": "This week", + "refId": "B" + }, + { + "expr": "electricity_consumption_monthly * $electricity_unit", + "instant": true, + "interval": "", + "legendFormat": "This month", + "refId": "C" + } + ], + "title": "Usage (Cost)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "${DS_VICTORIAMETRICS}", + "description": "", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 2, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "currencyGBP" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 5 + }, + "id": 32, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.1.5", + "targets": [ + { + "expr": "electricity_consumption_daily * $electricity_unit + $electricity_standing", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "instant": true, + "interval": "", + "legendFormat": "Today", + "measurement": "electricity", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"total_cost\")/100 FROM \"electricity\" WHERE $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cost" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + }, + { + "expr": "electricity_consumption_weekly * $electricity_unit + (7*$electricity_standing)", + "instant": true, + "interval": "", + "legendFormat": "This week", + "refId": "B" + }, + { + "expr": "electricity_consumption_monthly * $electricity_unit + (30*$electricity_standing)", + "instant": true, + "interval": "", + "legendFormat": "This month", + "refId": "C" + } + ], + "title": "Total Cost", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_VICTORIAMETRICS}", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 9 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Cost", + "yaxis": 2, + "zindex": -1 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Usage", + "expr": "electricity_draw", + "groupBy": [ + { + "params": [ + "30m" + ], + "type": "time" + }, + { + "params": [ + "linear" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Usage", + "measurement": "electricity", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"consumption\") FROM \"electricity\" WHERE $timeFilter GROUP BY time(30m) fill(linear)", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumption" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Go cost", + "expr": "electricity_draw * $electricity_unit", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "linear" + ], + "type": "fill" + } + ], + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Cost", + "measurement": "electricity", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"cost\")/100 FROM \"electricity\" WHERE $timeFilter GROUP BY time(30m) fill(linear)", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cost" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Electricity", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "kwatt", + "label": "Usage", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "decimals": 2, + "format": "currencyGBP", + "label": "Cost", + "logBase": 1, + "max": null, + "min": "0", + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": 0.1579 + } + }, + { + "collapsed": false, + "datasource": "${DS_VICTORIAMETRICS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 23, + "panels": [], + "title": "Gas", + "type": "row" + }, + { + "cacheTimeout": null, + "datasource": "${DS_VICTORIAMETRICS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "0", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "kwatth" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 19 + }, + "id": 7, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.1.5", + "targets": [ + { + "expr": "gas_consumption_daily", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "instant": true, + "interval": "30m", + "legendFormat": "Today", + "measurement": "gas", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumption\") FROM \"gas\" WHERE $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumption" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + }, + { + "expr": "gas_consumption_weekly", + "instant": true, + "interval": "", + "legendFormat": "This Week", + "refId": "B" + }, + { + "expr": "gas_consumption_monthly", + "instant": true, + "interval": "", + "legendFormat": "This Month", + "refId": "C" + } + ], + "title": "Used (Energy)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "${DS_VICTORIAMETRICS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 2, + "mappings": [], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "currencyGBP" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 19 + }, + "id": 28, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.1.5", + "targets": [ + { + "expr": "(gas_consumption_daily) * $gas_unit", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "instant": true, + "interval": "", + "legendFormat": "Today", + "measurement": "gas", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumption\") FROM \"gas\" WHERE $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumption" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + }, + { + "expr": "(gas_consumption_weekly) * $gas_unit", + "instant": true, + "interval": "", + "legendFormat": "This week", + "refId": "B" + }, + { + "expr": "(gas_consumption_monthly) * 0.0277", + "instant": true, + "interval": "", + "legendFormat": "This month", + "refId": "C" + } + ], + "title": "Used (Cost)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "${DS_VICTORIAMETRICS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 2, + "mappings": [], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "currencyGBP" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 19 + }, + "id": 31, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.1.5", + "targets": [ + { + "expr": "(gas_consumption_daily) * $gas_unit + $gas_standing", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "instant": true, + "interval": "", + "legendFormat": "Today", + "measurement": "gas", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumption\") FROM \"gas\" WHERE $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumption" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + }, + { + "expr": "(gas_consumption_weekly) * $gas_unit + (7*$gas_standing)", + "instant": true, + "interval": "", + "legendFormat": "This week", + "refId": "B" + }, + { + "expr": "(gas_consumption_monthly) * $gas_unit + (30*$gas_standing)", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "This month", + "refId": "C" + } + ], + "title": "Cost today", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_VICTORIAMETRICS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 23 + }, + "hiddenSeries": false, + "id": 8, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Cost", + "yaxis": 2, + "zindex": -1 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": true, + "targets": [ + { + "alias": "Usage", + "expr": "delta(sum(gas_consumption_daily))", + "groupBy": [ + { + "params": [ + "30m" + ], + "type": "time" + }, + { + "params": [ + "linear" + ], + "type": "fill" + } + ], + "instant": false, + "interval": "30m", + "legendFormat": "Used", + "measurement": "gas", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"consumption\") FROM \"electricity\" WHERE $timeFilter GROUP BY time(30m) fill(linear)", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumption" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Cost", + "expr": "delta(sum(gas_consumption_daily)) * 0.0277", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "linear" + ], + "type": "fill" + } + ], + "hide": false, + "instant": false, + "interval": "30m", + "legendFormat": "Cost", + "measurement": "electricity", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"cost\")/100 FROM \"gas\" WHERE $timeFilter GROUP BY time(30m) fill(linear)", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cost" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Gas", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "kwatth", + "label": "Usage", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "decimals": 2, + "format": "currencyGBP", + "label": "Cost", + "logBase": 1, + "max": null, + "min": "0", + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": false, + "schemaVersion": 26, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "value": "${VAR_GAS_STANDING}", + "text": "${VAR_GAS_STANDING}", + "selected": false + }, + "hide": 2, + "label": null, + "name": "gas_standing", + "options": [ + { + "value": "${VAR_GAS_STANDING}", + "text": "${VAR_GAS_STANDING}", + "selected": false + } + ], + "query": "${VAR_GAS_STANDING}", + "skipUrlSync": false, + "type": "constant" + }, + { + "current": { + "value": "${VAR_GAS_UNIT}", + "text": "${VAR_GAS_UNIT}", + "selected": false + }, + "hide": 2, + "label": null, + "name": "gas_unit", + "options": [ + { + "value": "${VAR_GAS_UNIT}", + "text": "${VAR_GAS_UNIT}", + "selected": false + } + ], + "query": "${VAR_GAS_UNIT}", + "skipUrlSync": false, + "type": "constant" + }, + { + "current": { + "value": "${VAR_ELECTRICITY_STANDING}", + "text": "${VAR_ELECTRICITY_STANDING}", + "selected": false + }, + "hide": 2, + "label": null, + "name": "electricity_standing", + "options": [ + { + "value": "${VAR_ELECTRICITY_STANDING}", + "text": "${VAR_ELECTRICITY_STANDING}", + "selected": false + } + ], + "query": "${VAR_ELECTRICITY_STANDING}", + "skipUrlSync": false, + "type": "constant" + }, + { + "current": { + "value": "${VAR_ELECTRICITY_UNIT}", + "text": "${VAR_ELECTRICITY_UNIT}", + "selected": false + }, + "hide": 2, + "label": null, + "name": "electricity_unit", + "options": [ + { + "value": "${VAR_ELECTRICITY_UNIT}", + "text": "${VAR_ELECTRICITY_UNIT}", + "selected": false + } + ], + "query": "${VAR_ELECTRICITY_UNIT}", + "skipUrlSync": false, + "type": "constant" + }, + { + "current": { + "selected": false, + "text": "victoriametrics", + "value": "victoriametrics" + }, + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + } + ] + }, + "time": { + "from": "now-2d", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Energy usage", + "uid": "7Nqpoj-ik", + "version": 13 +}