1
0
Fork 0

[telegraf] Add pool statistics for Flexpool

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2021-03-26 08:12:08 +01:00
parent 745cf49a99
commit a5b09436f0
No known key found for this signature in database
GPG key ID: FF42D23B580C89F7
2 changed files with 61 additions and 7 deletions

View file

@ -1,10 +1,3 @@
[[inputs.http]]
name_override = "flexpool_pool_block_count"
urls = ["https://flexpool.io/api/v1/pool/blockCount"]
data_format = "json"
tagexclude = ["url"]
json_query = "result"
[[inputs.http]]
name_override = "flexpool_balance"
urls = ["https://flexpool.io/api/v1/miner/${MINER_ADDRESS}/balance"]

View file

@ -0,0 +1,61 @@
[[inputs.http]]
name_override = "flexpool_pool_block_count"
urls = ["https://flexpool.io/api/v1/pool/blockCount"]
data_format = "json"
tagexclude = ["url"]
json_query = "result"
[[inputs.http]]
name_override = "flexpool_pool_block_count"
urls = ["https://flexpool.io/api/v1/pool/blockCount"]
data_format = "json"
tagexclude = ["url"]
json_query = "result"
[[inputs.http]]
name_override = "flexpool_pool_blocks"
urls = [
"https://flexpool.io/api/v1/pool/blocks/?page=0",
"https://flexpool.io/api/v1/pool/blocks/?page=1",
"https://flexpool.io/api/v1/pool/blocks/?page=2",
"https://flexpool.io/api/v1/pool/blocks/?page=3",
"https://flexpool.io/api/v1/pool/blocks/?page=4"
]
data_format = "json"
tagexclude = ["url"]
json_query = "result.data"
json_time_format = "unix"
json_time_key = "timestamp"
tag_keys = ["miner"]
[[inputs.http]]
name_override = "flexpool_pool_hashrate"
urls = ["https://flexpool.io/api/v1/pool/hashrate"]
data_format = "json"
tagexclude = ["url"]
json_query = "result"
[[inputs.http]]
name_override = "flexpool_pool_miners_online"
urls = ["https://flexpool.io/api/v1/pool/minersOnline"]
data_format = "json"
tagexclude = ["url"]
[[inputs.http]]
name_override = "flexpool_pool_workers_online"
urls = ["https://flexpool.io/api/v1/pool/workersOnline"]
data_format = "json"
tagexclude = ["url"]
[[inputs.http]]
name_override = "flexpool_pool_average_luck_round_time"
urls = ["https://flexpool.io/api/v1/pool/avgLuckRoundtime"]
data_format = "json"
tagexclude = ["url"]
json_query = "result"
[[inputs.http]]
name_override = "flexpool_pool_current_luck"
urls = ["https://flexpool.io/api/v1/pool/currentLuck"]
data_format = "json"
tagexclude = ["url"]