diff --git a/docker/environment.example b/docker/environment.example index af4bc55..11494f6 100644 --- a/docker/environment.example +++ b/docker/environment.example @@ -1,5 +1,6 @@ MINER_ADDRESS= HIVEOS_TOKEN= +ETHERSCAN_TOKEN= GF_SECURITY_ADMIN_USER=admin GF_SECURITY_ADMIN_PASSWORD= GF_USERS_DEFAULT_THEME=light diff --git a/telegraf/etherscan.conf b/telegraf/etherscan.conf new file mode 100644 index 0000000..1b53519 --- /dev/null +++ b/telegraf/etherscan.conf @@ -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"]