From de5e38ae94128ffc83e17f79d7632251071fc5fc Mon Sep 17 00:00:00 2001 From: Julien Riou Date: Tue, 30 Mar 2021 08:08:10 +0200 Subject: [PATCH] [grafana] Group daily, weekly and monthly revenues Grafana displays single statistics by grouping 3 values together. If we group currency and fiat currency (2 values) together, the output is broken. This commit groups all crypto currency (daily, weekly and monthly) on a single row, then fiat currencies on a second row. Signed-off-by: Julien Riou --- grafana/flexpool-miners.json | 200 +++++++++++++++++------------------ 1 file changed, 100 insertions(+), 100 deletions(-) diff --git a/grafana/flexpool-miners.json b/grafana/flexpool-miners.json index 1f2df9f..328f109 100644 --- a/grafana/flexpool-miners.json +++ b/grafana/flexpool-miners.json @@ -59,7 +59,7 @@ "gnetId": null, "graphTooltip": 0, "id": null, - "iteration": 1617027305657, + "iteration": 1617084393646, "links": [], "panels": [ { @@ -1375,6 +1375,104 @@ } ] }, + { + "alias": "weekly", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "flexpool_miner_daily_revenue_estimation", + "orderByTime": "ASC", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "result" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + "/1000000000000000000*7" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "miner", + "operator": "=~", + "value": "/^$miner$/" + } + ] + }, + { + "alias": "monthly", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "flexpool_miner_daily_revenue_estimation", + "orderByTime": "ASC", + "policy": "default", + "refId": "E", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "result" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + "/1000000000000000000*30" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "miner", + "operator": "=~", + "value": "/^$miner$/" + } + ] + }, { "alias": "daily (fiat)", "groupBy": [ @@ -1426,55 +1524,6 @@ } ] }, - { - "alias": "weekly", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "measurement": "flexpool_miner_daily_revenue_estimation", - "orderByTime": "ASC", - "policy": "default", - "refId": "C", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "result" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - }, - { - "params": [ - "/1000000000000000000*7" - ], - "type": "math" - } - ] - ], - "tags": [ - { - "key": "miner", - "operator": "=~", - "value": "/^$miner$/" - } - ] - }, { "alias": "weekly (fiat)", "groupBy": [ @@ -1524,55 +1573,6 @@ } ] }, - { - "alias": "monthly", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "measurement": "flexpool_miner_daily_revenue_estimation", - "orderByTime": "ASC", - "policy": "default", - "refId": "E", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "result" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - }, - { - "params": [ - "/1000000000000000000*30" - ], - "type": "math" - } - ] - ], - "tags": [ - { - "key": "miner", - "operator": "=~", - "value": "/^$miner$/" - } - ] - }, { "alias": "monthly (fiat)", "groupBy": [ @@ -3269,5 +3269,5 @@ "timezone": "utc", "title": "Flexpool miners", "uid": "Q3JPASkgz", - "version": 2 + "version": 3 } \ No newline at end of file