diff --git a/telegraf/flexpool.conf b/telegraf/flexpool-miner.conf similarity index 89% rename from telegraf/flexpool.conf rename to telegraf/flexpool-miner.conf index 6e1958f..8393a8f 100644 --- a/telegraf/flexpool.conf +++ b/telegraf/flexpool-miner.conf @@ -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"] diff --git a/telegraf/flexpool-pool.conf b/telegraf/flexpool-pool.conf new file mode 100644 index 0000000..75f31ba --- /dev/null +++ b/telegraf/flexpool-pool.conf @@ -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"]