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.
Name | Description |
---|---|
net_peers | Number of peers currently connected to the client. |
eth_block_number | Number of the most recent block. |
eth_block_timestamp | Timestamp of the most recent block. |
eth_gas_price | Current gas price in wei. Might be inaccurate. |
eth_earliest_block_transactions | Number of transactions in the earliest block. |
eth_latest_block_transactions | Number of transactions in the latest block. |
eth_pending_block_transactions | The number of transactions in pending block. |
eth_hashrate | Hashes per second that this node is mining with. |
eth_sync_starting | Block number at which current import started. |
eth_sync_current | Number of most recent block. |
eth_sync_highest | Estimated number of highest block. |
Go modules is used for dependency management. Hence Go 1.11 is a minimum required version.
A local setup has been created to run locally the exporter, with a Grafana Agent instance scraping metrics from it, and pushing them to Grafana Cloud.
Pre-requisites
docker-compose --version
Steps
production/exporter
folder. You can use sample.yaml
as template..env
, configuring the following:EXPORTER_CONFIG_FILE=<Exporter config file located in the production/exporter folder, like `sample.yaml`>
PROM_REMOTE_WRITE_URL=<Grafana Cloud prometheus remote write URL>
PROM_GCOM_USER_ID=<Prometheus instance id>
PROM_GCOM_API_KEY=<Grafana Cloud API Key with MetricsPublisher role>
docker-compose up -d
This project is licensed under the MIT License - see the LICENSE file for details.