Install Ethereum Metrics Exporter

Install Ethereum Metrics Exporter for access to additional API data

Ethereum Metrics Exporter

Ethereum Metrics Exporter exports queries consensus and execution client APIs and exports that data in the Prometheus metrics format. There is some overlap between the client API endpoints accessed by Ethereum Metrics Exporter and json_exporter, but both exporters offer access to data in unique ways.

A single instance of Ethereum Metrics Exporter can be configured to query a single consensus/execution client group. Multiple instances of Ethereum Metrics Exporter are required to monitor multiple consensus/execution groups.

Create System Account

Create a user account under which Ethereum Metrics Exporter can run.

sudo adduser --system eth-metrics --group --no-create-home

Install Ethereum Metrics Exporter

Download and build the Ethereum Metrics Exporter executable.

go install github.com/ethpandaops/ethereum-metrics-exporter@latest

Copy the executable to the /usr/local/bin directory.

sudo cp ~/go/bin/ethereum-metrics-exporter /usr/local/bin

Create Supporting Directories

Create additional required directories.

sudo mkdir -p /var/local/lib/eth-metrics /etc/eth-metrics

Configure Startup

Create a systemd service file to configure automatic startup of the Ethereum Metrics Exporter service for a single consensus/execution client pair.

sudo nano /etc/systemd/system/eth-metrics.service

Insert the following into the Ethereum Metrics Exporter systemd service file.

[Unit]
Description=Ethereum Metrics Exporter
Wants=network-online.target
After=network-online.target

[Service]
User=eth-metrics
Group=eth-metrics
Type=simple
Restart=always
RestartSec=5
ExecStart=/usr/local/bin/ethereum-metrics-exporter \
                --config /etc/eth-metrics/eth-metrics.yml \
                --metrics-port 9095

[Install]
WantedBy=multi-user.target

The default listening port for the Ethereum Metrics Exporter is 9090, which also happens to be the default listening port for Prometheus. In the service file above, the Ethereum Metrics Exporter port is re-assigned to 9095 through the metrics port flag.

Each instance of Ethereum Metrics Exporter can only monitor a single consensus/execution client pair. If you need to monitor multiple consensus/execution client pairs using Ethereum Metrics Exporter, there are two options:

  1. If each client pair is running on a separate host, it is easiest to follow the instructions above to install Ethereum Metrics Exporter on each host and configure it to query the local clients.

  2. If multiple client pairs are running on the same host, or if you want to run all monitoring software from the same host, you will need to configure multiple instances of Ethereum Metrics Exporter on the same system. For each new client pair, copy the eth-metrics.service file above to a new unique name, and modify the configuration file and port specified in the ExecStart line to something unique across instances.

Notes

Ethereum Metrics Exporter will listen on port 9095. This is the port from which Prometheus will query for metrics.

We have not yet configured nor started Ethereum Metrics Exporter.

Last updated