1
0
Fork 0

[telegraf] Add etherscan input

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2021-03-29 17:23:09 +02:00
parent b8866232d0
commit 3db323ce25
No known key found for this signature in database
GPG key ID: FF42D23B580C89F7
2 changed files with 12 additions and 0 deletions

View file

@ -1,5 +1,6 @@
MINER_ADDRESS=
HIVEOS_TOKEN=
ETHERSCAN_TOKEN=
GF_SECURITY_ADMIN_USER=admin
GF_SECURITY_ADMIN_PASSWORD=
GF_USERS_DEFAULT_THEME=light

11
telegraf/etherscan.conf Normal file
View 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"]