From b6f40451972d53b8573fd77376acad620b4b39bd Mon Sep 17 00:00:00 2001 From: Julien Riou Date: Mon, 29 Mar 2021 16:11:43 +0200 Subject: [PATCH] [grafana] Assert month = 30 days Signed-off-by: Julien Riou --- grafana/flexpool-miners.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/grafana/flexpool-miners.json b/grafana/flexpool-miners.json index 4fcdf76..5f9800f 100644 --- a/grafana/flexpool-miners.json +++ b/grafana/flexpool-miners.json @@ -461,7 +461,7 @@ "groupBy": [ { "params": [ - "31d" + "30d" ], "type": "time" } @@ -469,7 +469,7 @@ "measurement": "flexpool_miner_balance", "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(balance_increase)/1000000000000000000 FROM (select non_negative_difference(\"result\") AS balance_increase FROM \"flexpool_miner_balance\" WHERE \"miner\" =~ /^$miner$/ AND $timeFilter) GROUP BY time(31d) TZ('$timezone');", + "query": "SELECT sum(balance_increase)/1000000000000000000 FROM (select non_negative_difference(\"result\") AS balance_increase FROM \"flexpool_miner_balance\" WHERE \"miner\" =~ /^$miner$/ AND $timeFilter) GROUP BY time(30d) TZ('$timezone');", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -487,7 +487,7 @@ }, { "params": [ - "31d" + "30d" ], "type": "non_negative_derivative" }, @@ -525,7 +525,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(balance_increase)/1000000000000000000*$exchange_rate FROM (select non_negative_difference(\"result\") AS balance_increase FROM \"flexpool_miner_balance\" WHERE \"miner\" =~ /^$miner$/ AND $timeFilter) GROUP BY time(31d) TZ('$timezone');", + "query": "SELECT sum(balance_increase)/1000000000000000000*$exchange_rate FROM (select non_negative_difference(\"result\") AS balance_increase FROM \"flexpool_miner_balance\" WHERE \"miner\" =~ /^$miner$/ AND $timeFilter) GROUP BY time(30d) TZ('$timezone');", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -658,7 +658,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(blocks_increase) FROM (select non_negative_difference(\"confirmed\") AS blocks_increase FROM \"flexpool_pool_block_count\" WHERE $timeFilter) GROUP BY time(31d) TZ('$timezone');", + "query": "SELECT sum(blocks_increase) FROM (select non_negative_difference(\"confirmed\") AS blocks_increase FROM \"flexpool_pool_block_count\" WHERE $timeFilter) GROUP BY time(30d) TZ('$timezone');", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -1520,7 +1520,7 @@ }, { "params": [ - "/1000000000000000000*31" + "/1000000000000000000*30" ], "type": "math" } @@ -1569,7 +1569,7 @@ }, { "params": [ - "/1000000000000000000*$exchange_rate*31" + "/1000000000000000000*$exchange_rate*30" ], "type": "math" } @@ -3440,4 +3440,4 @@ "title": "Flexpool miners", "uid": "Q3JPASkgz", "version": 4 -} \ No newline at end of file +}