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, "gnetId": null,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": null,
"iteration": 1617025138189, "iteration": 1617027305657,
"links": [], "links": [],
"panels": [ "panels": [
{ {
@ -1279,15 +1279,19 @@
} }
] ]
}, },
"unit": "short" "unit": "ETH"
}, },
"overrides": [ "overrides": [
{ {
"matcher": { "matcher": {
"id": "byName", "id": "byRegexp",
"options": "revenue (fiat)" "options": ".*fiat.*"
}, },
"properties": [ "properties": [
{
"id": "unit",
"value": "short"
},
{ {
"id": "decimals", "id": "decimals",
"value": 2 "value": 2
@ -1321,7 +1325,7 @@
"pluginVersion": "7.3.7", "pluginVersion": "7.3.7",
"targets": [ "targets": [
{ {
"alias": "revenue", "alias": "daily",
"groupBy": [ "groupBy": [
{ {
"params": [ "params": [
@ -1372,7 +1376,7 @@
] ]
}, },
{ {
"alias": "revenue (fiat)", "alias": "daily (fiat)",
"groupBy": [ "groupBy": [
{ {
"params": [ "params": [
@ -1421,70 +1425,9 @@
"value": "/^$miner$/" "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": "weekly",
"alias": "revenue (fiat)",
"lines": false,
"yaxis": 2
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "revenue",
"groupBy": [ "groupBy": [
{ {
"params": [ "params": [
@ -1502,9 +1445,105 @@
"measurement": "flexpool_miner_daily_revenue_estimation", "measurement": "flexpool_miner_daily_revenue_estimation",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "SELECT mean(\"result\") /1000000000000000000 FROM \"flexpool_miner_daily_revenue_estimation\" WHERE (\"miner\" =~ /^$miner$/) AND $timeFilter GROUP BY time($__interval) fill(null)", "refId": "C",
"rawQuery": false, "resultFormat": "time_series",
"refId": "A", "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", "resultFormat": "time_series",
"select": [ "select": [
[ [
@ -1535,7 +1574,7 @@
] ]
}, },
{ {
"alias": "revenue (fiat)", "alias": "monthly (fiat)",
"groupBy": [ "groupBy": [
{ {
"params": [ "params": [
@ -1553,7 +1592,7 @@
"measurement": "flexpool_miner_daily_revenue_estimation", "measurement": "flexpool_miner_daily_revenue_estimation",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"refId": "B", "refId": "F",
"resultFormat": "time_series", "resultFormat": "time_series",
"select": [ "select": [
[ [
@ -1569,216 +1608,7 @@
}, },
{ {
"params": [ "params": [
"/1000000000000000000*$exchange_rate*30" "/1000000000000000000*30*$exchange_rate"
],
"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"
], ],
"type": "math" "type": "math"
} }
@ -1795,7 +1625,7 @@
], ],
"timeFrom": "5m", "timeFrom": "5m",
"timeShift": null, "timeShift": null,
"title": "Estimated monthly revenue", "title": "Estimated revenue",
"type": "stat" "type": "stat"
}, },
{ {
@ -1817,7 +1647,7 @@
"h": 8, "h": 8,
"w": 6, "w": 6,
"x": 0, "x": 0,
"y": 41 "y": 33
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 40, "id": 40,
@ -2021,7 +1851,7 @@
"h": 8, "h": 8,
"w": 6, "w": 6,
"x": 6, "x": 6,
"y": 41 "y": 33
}, },
"hideTimeOverride": true, "hideTimeOverride": true,
"id": 42, "id": 42,
@ -2200,7 +2030,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 41 "y": 33
}, },
"id": 64, "id": 64,
"options": { "options": {
@ -2249,7 +2079,7 @@
"h": 1, "h": 1,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 49 "y": 41
}, },
"id": 26, "id": 26,
"panels": [], "panels": [],
@ -2290,7 +2120,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 50 "y": 42
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 44, "id": 44,
@ -2520,7 +2350,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 50 "y": 42
}, },
"hideTimeOverride": true, "hideTimeOverride": true,
"id": 18, "id": 18,
@ -2682,7 +2512,7 @@
"h": 1, "h": 1,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 58 "y": 50
}, },
"id": 14, "id": 14,
"panels": [], "panels": [],
@ -2709,7 +2539,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 59 "y": 51
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 6, "id": 6,
@ -2943,7 +2773,7 @@
"h": 8, "h": 8,
"w": 4, "w": 4,
"x": 12, "x": 12,
"y": 59 "y": 51
}, },
"hideTimeOverride": true, "hideTimeOverride": true,
"id": 8, "id": 8,
@ -3041,7 +2871,7 @@
"h": 8, "h": 8,
"w": 4, "w": 4,
"x": 16, "x": 16,
"y": 59 "y": 51
}, },
"hideTimeOverride": true, "hideTimeOverride": true,
"id": 10, "id": 10,
@ -3140,7 +2970,7 @@
"h": 8, "h": 8,
"w": 4, "w": 4,
"x": 20, "x": 20,
"y": 59 "y": 51
}, },
"hideTimeOverride": true, "hideTimeOverride": true,
"id": 12, "id": 12,
@ -3439,5 +3269,5 @@
"timezone": "utc", "timezone": "utc",
"title": "Flexpool miners", "title": "Flexpool miners",
"uid": "Q3JPASkgz", "uid": "Q3JPASkgz",
"version": 4 "version": 2
} }