1
0
Fork 0
This repository has been archived on 2024-12-18. You can view files and clone it, but cannot push or open issues or pull requests.
mining-dashboards/telegraf/flexpool-miner.conf
Julien Riou e8ba07a1b7
Rename Flexpool miner measurements
Procedure to migrate:

Stop telegraf container:

```
docker-compose -f docker-compose.yml stop telegraf
```

Rename all measurements:
```
docker exec -it influxdb influx -unsafeSsl -ssl -database '$INFLUXDB_DB'
select * into flexpool_miner_balance from flexpool_balance group by *;
drop measurement flexpool_balance;
select * into flexpool_miner_stats from flexpool_stats group by *;
drop measurement flexpool_stats;
select * into flexpool_miner_workers from flexpool_workers group by *;
drop measurement flexpool_workers;
select * into flexpool_miner_paid from flexpool_paid group by *;
drop measurement flexpool_paid;
select * into flexpool_miner_daily_revenue_estimation from flexpool_daily_revenue_estimation group by *;
drop measurement flexpool_daily_revenue_estimation;
select * into flexpool_miner_payments from flexpool_payments group by *;
drop measurement flexpool_payments;
```

Update telegraf configuration.

Start telegraf:

```
docker-compose -f docker-compose.yml start telegraf
```

Re-import the `grafana/flexpool-overview.json` graph.

Signed-off-by: Julien Riou <julien@riou.xyz>
2021-03-28 18:15:55 +02:00

55 lines
1.6 KiB
Text

[[inputs.http]]
name_override = "flexpool_miner_balance"
urls = ["https://flexpool.io/api/v1/miner/${MINER_ADDRESS}/balance"]
data_format = "json"
tagexclude = ["url"]
[inputs.http.tags]
miner = "${MINER_ADDRESS}"
[[inputs.http]]
name_override = "flexpool_miner_stats"
urls = ["https://flexpool.io/api/v1/miner/${MINER_ADDRESS}/stats"]
data_format = "json"
fieldpass = ["*hashrate", "*shares"]
tagexclude = ["url"]
json_query = "result"
[inputs.http.tags]
miner = "${MINER_ADDRESS}"
[[inputs.http]]
name_override = "flexpool_miner_workers"
urls = ["https://flexpool.io/api/v1/miner/${MINER_ADDRESS}/workers"]
data_format = "json"
tagexclude = ["url"]
fieldpass = ["*hashrate", "*shares"]
tag_keys = ["name"]
json_query = "result"
[inputs.http.tags]
miner = "${MINER_ADDRESS}"
[[inputs.http]]
name_override = "flexpool_miner_paid"
urls = ["https://flexpool.io/api/v1/miner/${MINER_ADDRESS}/totalPaid"]
data_format = "json"
tagexclude = ["url"]
[inputs.http.tags]
miner = "${MINER_ADDRESS}"
[[inputs.http]]
name_override = "flexpool_miner_daily_revenue_estimation"
urls = ["https://flexpool.io/api/v1/miner/${MINER_ADDRESS}/estimatedDailyRevenue"]
data_format = "json"
tagexclude = ["url"]
[inputs.http.tags]
miner = "${MINER_ADDRESS}"
[[inputs.http]]
name_override = "flexpool_miner_payments"
urls = ["https://flexpool.io/api/v1/miner/${MINER_ADDRESS}/payments/?page=0"]
data_format = "json"
tagexclude = ["url"]
json_query = "result.data"
json_time_format = "unix"
json_time_key = "timestamp"
[inputs.http.tags]
miner = "${MINER_ADDRESS}"