[telegraf] Add pool statistics for Flexpool
Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
745cf49a99
commit
a5b09436f0
2 changed files with 61 additions and 7 deletions
|
@ -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"]
|
61
telegraf/flexpool-pool.conf
Normal file
61
telegraf/flexpool-pool.conf
Normal 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"]
|
Reference in a new issue