https://github.com/ethersphere/ethexporter
https://github.com/ethersphere/ethexporter
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ethersphere/ethexporter
- Owner: ethersphere
- Created: 2021-02-12T11:28:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-03T08:24:36.000Z (over 1 year ago)
- Last Synced: 2025-01-12T06:27:19.138Z (over 1 year ago)
- Language: Go
- Size: 36.1 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ETHexporter [](https://hub.docker.com/r/hunterlong/ethexporter/)
A lightweight Prometheus exporter and [Grafana Dashboard](https://grafana.com/dashboards/6970) that will output Ethereum wallet balances from a list of addresses you specify. ETHexporter attaches to a geth server to fetch ethereum wallet balances for your Grafana dashboards. Many of you probably want to chart your ERC20 token balances, feel free to use [TOKENexporter](https://github.com/hunterlong/tokenexporter). If you also want a Bitcoin prometheus exporter, you can use [BTCexporter](https://github.com/hunterlong/btcexporter) which uses blockchain.info API.
## Watch Addresses
The `addresses.txt` file holds all the addresses to fetch balances for. Use the format `name:address:host` on each new line.
```
etherdelta:0x8d12A197cB00D4747a1fe03395095ce2A5CC6819:host1
bittrex:0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98:host2
```
## Running the Exporter
You can easily run this Ethereum balance prometheus exporter with the docker command:
```
docker run -it -d -p 9015:9015 \
-e "GETH=https://mainnet.infura.io/****KEYHERE" \
-v /myfolder/addresses.txt:/app/addresses.txt \
hunterlong/ethexporter
```
## Grafana Dashboard
ETHexporter includes a [Grafana Dashboard](https://grafana.com/dashboards/6970) so you visualize Ethereum wallet balances with ease. Import Grafana Dashboard ID: `6970` once you've started your
Docker container.

## Build Docker Image
Clone this repo and then follow the simple steps below!
##### Build Docker Image
`docker build -t hunterlong/ethexporter:latest .`
##### Run ethexporter
You'll need access to an ethereum Geth server to fetch balances. You can use [Infura.io](https://infura.io/setup) to quickly get an API key for a geth server.
`docker run -d -p 9015:9015 -e "GETH=https://mainnet.infura.io/****KEYHERE" hunterlong/ethexporter:latest`
## Pull from Dockerhub
Create a `addresses.txt` file with the correct format mentioned above.
```
docker run -d -v ~/ethexporter:/app \
-p 9015:9015 \
-e GETH=https://mainnet.infura.io/****KEYHERE \
hunterlong/ethexporter:latest
```
The Docker image should be running with the default addresses.
## Prometheus Response
```
eth_balance{name="etherdelta",address="0x8d12A197cB00D4747a1fe03395095ce2A5CC6819"} 24919.37437
eth_balance{name="bittrex",address="0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98"} 687509.5097
eth_balance{name="poloniex",address="0x32Be343B94f860124dC4fEe278FDCBD38C102D88"} 72284.47401
eth_balance{name="kraken",address="0x267be1c1d684f78cb4f6a176c4911b741e4ffdc0"} 159592.0022
eth_balance_total 944305.360280000022612512
eth_load_seconds 1.15
eth_loaded_addresses 4
eth_total_addresses 4
```