Ethereum Prometheus Exporter
This service exports various metrics from Ethereum clients for consumption by Prometheus. It uses JSON-RPC interface to collect the metrics. Any JSON-RPC 2.0 enabled client should be supported. Although, it was only tested with Parity.
You can deploy this exporter using the 31z4/ethereum-prometheus-exporter Docker image.
docker run -d -p 9368:9368 --name ethereum-exporter 31z4/ethereum-prometheus-exporter -url http://ethereum:8545
Keep in mind that your container needs to be able to communicate with the Ethereum client using the specified
url (default is
By default the exporter serves on
/metrics. The listen address can be changed by specifying the
Here is an example
scrape_config for Prometheus.
- job_name: ethereum static_configs: - targets: - ethereum-exporter:9368
|net_peers||The number of peers currently connected to the client.|
|eth_block_number||The number of most recent block.|
|eth_gas_price||The current price per gas in wei. Might be inaccurate.|
|eth_earliest_block_transactions||The number of transactions in an earliest block.|
|eth_latest_block_transactions||The number of transactions in a latest block.|
|eth_pending_block_transactions||The number of transactions in a pending block.|
|eth_hashrate||The number of hashes per second that the node is mining with.|
|eth_sync_starting||The block at which the import started.|
|eth_sync_current||The number of most recent block.|
|eth_sync_highest||The estimated highest block.|
|parity_net_active_peers||The number of active peers. Available only for Parity.|
|parity_net_connected_peers||The number of peers currently connected to the client. Available only for Parity.|
Go modules is used for dependency management. Hence Go 1.11 is a minimum required version.
CircleCI Local CLI can be used to ensure that everything builds locally.
circleci build --job lint circleci build --job test circleci build --job build
Contributions are greatly appreciated. The project follows the typical GitHub pull request model. Before starting any work, please either comment on an existing issue or file a new one.
Support and Donate
You can show your appreciation for the project and support future development by donating.
This project is licensed under the MIT License - see the LICENSE file for details.