1
0
Fork 0

[grafana] Group all estimated revenues

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2021-03-29 16:21:41 +02:00
parent b6f4045197
commit b3cb773ac2
No known key found for this signature in database
GPG key ID: FF42D23B580C89F7

View file

@ -59,7 +59,7 @@
"gnetId": null,
"graphTooltip": 0,
"id": null,
"iteration": 1617025138189,
"iteration": 1617027305657,
"links": [],
"panels": [
{
@ -1279,15 +1279,19 @@
}
]
},
"unit": "short"
"unit": "ETH"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "revenue (fiat)"
"id": "byRegexp",
"options": ".*fiat.*"
},
"properties": [
{
"id": "unit",
"value": "short"
},
{
"id": "decimals",
"value": 2
@ -1321,7 +1325,7 @@
"pluginVersion": "7.3.7",
"targets": [
{
"alias": "revenue",
"alias": "daily",
"groupBy": [
{
"params": [
@ -1372,7 +1376,7 @@
]
},
{
"alias": "revenue (fiat)",
"alias": "daily (fiat)",
"groupBy": [
{
"params": [
@ -1421,70 +1425,9 @@
"value": "/^$miner$/"
}
]
}
],
"timeFrom": "5m",
"timeShift": null,
"title": "Estimated daily revenue",
"type": "stat"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_INFLUXDB}",
"description": "",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 33
},
"hiddenSeries": false,
"id": 69,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.3.7",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"$$hashKey": "object:751",
"alias": "revenue (fiat)",
"lines": false,
"yaxis": 2
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "revenue",
"alias": "weekly",
"groupBy": [
{
"params": [
@ -1502,9 +1445,105 @@
"measurement": "flexpool_miner_daily_revenue_estimation",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"result\") /1000000000000000000 FROM \"flexpool_miner_daily_revenue_estimation\" WHERE (\"miner\" =~ /^$miner$/) AND $timeFilter GROUP BY time($__interval) fill(null)",
"rawQuery": false,
"refId": "A",
"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": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "flexpool_miner_daily_revenue_estimation",
"orderByTime": "ASC",
"policy": "default",
"refId": "D",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"result"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"/1000000000000000000*7*$exchange_rate"
],
"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": [
[
@ -1535,7 +1574,7 @@
]
},
{
"alias": "revenue (fiat)",
"alias": "monthly (fiat)",
"groupBy": [
{
"params": [
@ -1553,7 +1592,7 @@
"measurement": "flexpool_miner_daily_revenue_estimation",
"orderByTime": "ASC",
"policy": "default",
"refId": "B",
"refId": "F",
"resultFormat": "time_series",
"select": [
[
@ -1569,216 +1608,7 @@
},
{
"params": [
"/1000000000000000000*$exchange_rate*30"
],
"type": "math"
}
]
],
"tags": [
{
"key": "miner",
"operator": "=~",
"value": "/^$miner$/"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Estimated monthly revenue",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:177",
"decimals": 5,
"format": "ETH",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"$$hashKey": "object:178",
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"datasource": "${DS_INFLUXDB}",
"description": "",
"fieldConfig": {
"defaults": {
"custom": {},
"decimals": 5,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 0.00001
}
]
},
"unit": "short"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "revenue (fiat)"
},
"properties": [
{
"id": "decimals",
"value": 2
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 33
},
"hideTimeOverride": true,
"id": 71,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "center",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "7.3.7",
"targets": [
{
"alias": "revenue",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "flexpool_miner_daily_revenue_estimation",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"result\")/1000000000000000000 FROM \"flexpool_miner_daily_revenue_estimation\" WHERE (\"miner\" =~ /^$miner$/) AND $timeFilter GROUP BY time($__interval) fill(null)",
"rawQuery": false,
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"result"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"/1000000000000000000*30"
],
"type": "math"
}
]
],
"tags": [
{
"key": "miner",
"operator": "=~",
"value": "/^$miner$/"
}
]
},
{
"alias": "revenue (fiat)",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "flexpool_miner_daily_revenue_estimation",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"value\") FROM \"measurement\" WHERE $timeFilter GROUP BY time($__interval) fill(null)",
"rawQuery": false,
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"result"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"/1000000000000000000 * $exchange_rate*30"
"/1000000000000000000*30*$exchange_rate"
],
"type": "math"
}
@ -1795,7 +1625,7 @@
],
"timeFrom": "5m",
"timeShift": null,
"title": "Estimated monthly revenue",
"title": "Estimated revenue",
"type": "stat"
},
{
@ -1817,7 +1647,7 @@
"h": 8,
"w": 6,
"x": 0,
"y": 41
"y": 33
},
"hiddenSeries": false,
"id": 40,
@ -2021,7 +1851,7 @@
"h": 8,
"w": 6,
"x": 6,
"y": 41
"y": 33
},
"hideTimeOverride": true,
"id": 42,
@ -2200,7 +2030,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 41
"y": 33
},
"id": 64,
"options": {
@ -2249,7 +2079,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 49
"y": 41
},
"id": 26,
"panels": [],
@ -2290,7 +2120,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 50
"y": 42
},
"hiddenSeries": false,
"id": 44,
@ -2520,7 +2350,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 50
"y": 42
},
"hideTimeOverride": true,
"id": 18,
@ -2682,7 +2512,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 58
"y": 50
},
"id": 14,
"panels": [],
@ -2709,7 +2539,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 59
"y": 51
},
"hiddenSeries": false,
"id": 6,
@ -2943,7 +2773,7 @@
"h": 8,
"w": 4,
"x": 12,
"y": 59
"y": 51
},
"hideTimeOverride": true,
"id": 8,
@ -3041,7 +2871,7 @@
"h": 8,
"w": 4,
"x": 16,
"y": 59
"y": 51
},
"hideTimeOverride": true,
"id": 10,
@ -3140,7 +2970,7 @@
"h": 8,
"w": 4,
"x": 20,
"y": 59
"y": 51
},
"hideTimeOverride": true,
"id": 12,
@ -3439,5 +3269,5 @@
"timezone": "utc",
"title": "Flexpool miners",
"uid": "Q3JPASkgz",
"version": 4
}
"version": 2
}