Files
energy-usage/grafana.energy-usage.json
2020-10-04 17:45:30 +01:00

1655 lines
38 KiB
JSON

{
"__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.0290",
"description": ""
},
{
"name": "VAR_ELECTRICITY_STANDING",
"type": "constant",
"label": "electricity_standing",
"value": "0.2163",
"description": ""
},
{
"name": "VAR_ELECTRICITY_UNIT",
"type": "constant",
"label": "electricity_unit",
"value": "0.1593",
"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": 1601071965643,
"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": {},
"decimals": 2,
"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": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "7.1.5",
"targets": [
{
"expr": "electricity_meter_reading",
"instant": false,
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Electricity",
"type": "stat"
},
{
"datasource": "${DS_VICTORIAMETRICS}",
"fieldConfig": {
"defaults": {
"custom": {},
"decimals": 2,
"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": [
"lastNotNull"
],
"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": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "7.1.5",
"targets": [
{
"expr": "(gas_meter_reading) * 10.96497333",
"instant": false,
"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": 6,
"w": 6,
"x": 0,
"y": 5
},
"id": 6,
"interval": null,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "7.1.5",
"targets": [
{
"expr": "electricity_draw",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"none"
],
"type": "fill"
}
],
"instant": false,
"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": []
},
{
"expr": "range_avg(electricity_draw)",
"interval": "",
"legendFormat": "Average",
"refId": "D"
},
{
"expr": "range_min(electricity_draw)",
"interval": "",
"legendFormat": "Min",
"refId": "B"
},
{
"expr": "range_max(electricity_draw)",
"interval": "",
"legendFormat": "Max",
"refId": "C"
}
],
"title": "Load (Selected Period)",
"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": 6,
"w": 6,
"x": 6,
"y": 5
},
"id": 10,
"interval": null,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "7.1.5",
"targets": [
{
"expr": "range_avg(electricity_draw) * $__range_s / 3600",
"instant": false,
"interval": "",
"legendFormat": "Selected",
"refId": "D"
},
{
"expr": "electricity_consumption_daily",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"none"
],
"type": "fill"
}
],
"instant": false,
"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": false,
"interval": "",
"legendFormat": "This week",
"refId": "B"
},
{
"expr": "electricity_consumption_monthly",
"instant": false,
"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": 6,
"w": 6,
"x": 12,
"y": 5
},
"id": 12,
"interval": null,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "value_and_name"
},
"pluginVersion": "7.1.5",
"targets": [
{
"expr": "(range_avg(electricity_draw) * $__range_s / 3600) * $electricity_unit",
"interval": "",
"legendFormat": "Selected",
"refId": "D"
},
{
"expr": "electricity_consumption_daily * $electricity_unit",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"none"
],
"type": "fill"
}
],
"instant": false,
"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": false,
"interval": "",
"legendFormat": "This week",
"refId": "B"
},
{
"expr": "electricity_consumption_monthly * $electricity_unit",
"instant": false,
"interval": "",
"legendFormat": "This month",
"refId": "C"
}
],
"title": "Usage (Cost)",
"type": "stat"
},
{
"cacheTimeout": null,
"datasource": "${DS_VICTORIAMETRICS}",
"description": "Including standing charges",
"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": 6,
"w": 6,
"x": 18,
"y": 5
},
"id": 32,
"interval": null,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "7.1.5",
"targets": [
{
"expr": "(range_avg(electricity_draw) * $__range_s / 3600) * $electricity_unit + ($electricity_standing * $__range_s / 86400)",
"interval": "",
"legendFormat": "Selected",
"refId": "D"
},
{
"expr": "electricity_consumption_daily * $electricity_unit + $electricity_standing",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"none"
],
"type": "fill"
}
],
"instant": false,
"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": false,
"interval": "",
"legendFormat": "This week",
"refId": "B"
},
{
"expr": "electricity_consumption_monthly * $electricity_unit + (30*$electricity_standing)",
"instant": false,
"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": 11
},
"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 per Hour",
"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": 20
},
"id": 23,
"panels": [],
"title": "Gas",
"type": "row"
},
{
"cacheTimeout": null,
"datasource": "${DS_VICTORIAMETRICS}",
"fieldConfig": {
"defaults": {
"custom": {},
"decimals": 2,
"mappings": [
{
"id": 0,
"op": "=",
"text": "0",
"type": 1,
"value": "null"
}
],
"nullValueMode": "connected",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "kwatth"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 6,
"x": 6,
"y": 21
},
"id": 7,
"interval": null,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "7.1.5",
"targets": [
{
"expr": "(range_max(gas_meter_reading) - range_min(gas_meter_reading)) * 10.96497333",
"instant": false,
"interval": "",
"legendFormat": "Selected",
"refId": "D"
},
{
"expr": "gas_consumption_daily",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"none"
],
"type": "fill"
}
],
"instant": false,
"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": false,
"interval": "",
"legendFormat": "This Week",
"refId": "B"
},
{
"expr": "gas_consumption_monthly",
"instant": false,
"interval": "",
"legendFormat": "This Month",
"refId": "C"
}
],
"title": "Usage (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": 7,
"w": 6,
"x": 12,
"y": 21
},
"id": 28,
"interval": null,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "7.1.5",
"targets": [
{
"expr": "(range_max(gas_meter_reading) - range_min(gas_meter_reading)) * 10.96497333 * $gas_unit",
"interval": "",
"legendFormat": "Selected",
"refId": "D"
},
{
"expr": "(gas_consumption_daily) * $gas_unit",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"none"
],
"type": "fill"
}
],
"instant": false,
"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": false,
"interval": "",
"legendFormat": "This week",
"refId": "B"
},
{
"expr": "(gas_consumption_monthly) * $gas_unit",
"instant": false,
"interval": "",
"legendFormat": "This month",
"refId": "C"
}
],
"title": "Used (Cost)",
"type": "stat"
},
{
"cacheTimeout": null,
"datasource": "${DS_VICTORIAMETRICS}",
"description": "Including standing charges",
"fieldConfig": {
"defaults": {
"custom": {},
"decimals": 2,
"mappings": [],
"nullValueMode": "connected",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "currencyGBP"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 6,
"x": 18,
"y": 21
},
"id": 31,
"interval": null,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "7.1.5",
"targets": [
{
"expr": "(range_max(gas_meter_reading) - range_min(gas_meter_reading)) * 10.96497333 * $gas_unit + ($gas_standing * $__range_s / 86400)",
"interval": "",
"legendFormat": "Selected",
"refId": "D"
},
{
"expr": "(gas_consumption_daily) * $gas_unit + $gas_standing",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"none"
],
"type": "fill"
}
],
"instant": false,
"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": false,
"interval": "",
"legendFormat": "This week",
"refId": "B"
},
{
"expr": "(gas_consumption_monthly) * $gas_unit + (30*$gas_standing)",
"hide": false,
"instant": false,
"interval": "",
"legendFormat": "This month",
"refId": "C"
}
],
"title": "Total Cost",
"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": 28
},
"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": "increase(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": "increase(gas_consumption_daily) * $gas_unit",
"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 per Hour",
"logBase": 1,
"max": null,
"min": "0",
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"refresh": "5m",
"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": 20
}