[telegraf] Add etherscan input
Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
b8866232d0
commit
3db323ce25
2 changed files with 12 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
MINER_ADDRESS=
|
MINER_ADDRESS=
|
||||||
HIVEOS_TOKEN=
|
HIVEOS_TOKEN=
|
||||||
|
ETHERSCAN_TOKEN=
|
||||||
GF_SECURITY_ADMIN_USER=admin
|
GF_SECURITY_ADMIN_USER=admin
|
||||||
GF_SECURITY_ADMIN_PASSWORD=
|
GF_SECURITY_ADMIN_PASSWORD=
|
||||||
GF_USERS_DEFAULT_THEME=light
|
GF_USERS_DEFAULT_THEME=light
|
||||||
|
|
11
telegraf/etherscan.conf
Normal file
11
telegraf/etherscan.conf
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[[inputs.http]]
|
||||||
|
name_override = "etherscan_gastracker_gasoracle"
|
||||||
|
urls = ["https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${ETHERSCAN_TOKEN}"]
|
||||||
|
data_format = "json"
|
||||||
|
tagexclude = ["url"]
|
||||||
|
json_query = "result"
|
||||||
|
json_string_fields = ["SafeGasPrice", "ProposeGasPrice", "FastGasPrice"]
|
||||||
|
|
||||||
|
[[processors.converter]]
|
||||||
|
[processors.converter.fields]
|
||||||
|
integer = ["SafeGasPrice", "ProposeGasPrice", "FastGasPrice"]
|
Reference in a new issue