1
0
Fork 0

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>
This commit is contained in:
Julien Riou 2021-03-28 16:26:32 +02:00
commit e8ba07a1b7
No known key found for this signature in database
GPG key ID: FF42D23B580C89F7
3 changed files with 50 additions and 50 deletions

View file

@ -1062,7 +1062,7 @@
"allValue": null,
"current": {},
"datasource": "${DS_INFLUXDB}",
"definition": "SHOW TAG VALUES WITH KEY = \"miner\"",
"definition": "SHOW TAG VALUES FROM flexpool_miner_stats WITH KEY = \"miner\"",
"error": null,
"hide": 0,
"includeAll": false,
@ -1070,7 +1070,7 @@
"multi": false,
"name": "miner",
"options": [],
"query": "SHOW TAG VALUES WITH KEY = \"miner\"",
"query": "SHOW TAG VALUES FROM flexpool_miner_stats WITH KEY = \"miner\"",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
@ -1085,7 +1085,7 @@
"allValue": null,
"current": {},
"datasource": "${DS_INFLUXDB}",
"definition": "SHOW TAG VALUES WITH KEY = \"name\" WHERE miner =~ /^$miner$/",
"definition": "SHOW TAG VALUES FROM flexpool_miner_stats WITH KEY = \"name\" WHERE miner =~ /^$miner$/",
"error": null,
"hide": 0,
"includeAll": false,
@ -1093,7 +1093,7 @@
"multi": false,
"name": "worker",
"options": [],
"query": "SHOW TAG VALUES WITH KEY = \"name\" WHERE miner =~ /^$miner$/",
"query": "SHOW TAG VALUES FROM flexpool_miner_stats WITH KEY = \"name\" WHERE miner =~ /^$miner$/",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
@ -1127,4 +1127,4 @@
"title": "Flexpool workers",
"uid": "slcUBSzgz",
"version": 2
}
}