Configure Ethereum Metrics Exporter

Configure the consensus and execution clients to which Ethereum Metrics Exporter will listen

Configure Ethereum Metrics Exporter

Edit the eth-metrics.yml file.

sudo nano /etc/eth-metrics/eth-metrics.yml

Insert the following text into the eth-metrics.yml file.

consensus:
  enabled: true
  url: "<CONSENSUS_CLIENT_URL>"
  name: "<CONSENSUS_CLIENT_NAME>"
execution:
  enabled: true
  url: "<EXECUTION_CLIENT_URL>"
  name: "<EXECUTION_CLIENT_NAME>"
  modules:
    - "eth"
    - "net"
    - "web3"
    - "txpool"
pair:
  enabled: true

Make the following customizations to the text inserted:

  1. Replace <CONSENSUS_CLIENT_URL> with the URL to your consensus client API. It should look similar to http://localhost:3500/. You can replace localhost with the IP address of your consensus client, if it is not running on the local host. Use the correct port for your consensus client.

    Default Consensus Client API Ports

    1. Lighthouse: 5052

    2. Lodestar: 9596

    3. Nimbus: 5052

    4. Prysm: 3500

    5. Teku: 5051

  2. Replace <CONSENSUS_CLIENT_NAME> with one of the following execution client names: Lighthouse Beacon, Lodestar Beacon, Nimbus, Prysm Beacon, Teku.

  3. Replace <EXECUTION_CLIENT_URL> with the URL to your execution client API. It should look similar to http://localhost:8545. You can replace localhost with the IP address of your execution client, if it is not running on the local host. All execution clients use the same port.

  4. Replace <EXECUTION_CLIENT_URL> with one of the following execution client names: Besu, Erigon, Geth, Nethermind.

When you are done making changes, you final eth-metrics.yml file might look something like the following.

consensus:
  enabled: true
  url: "http://127.0.0.1:3500/"
  name: "Prysm Beacon"
execution:
  enabled: true
  url: "http://127.0.0.1:8545/"
  name: "Geth"
  modules:
    - "eth"
    - "net"
    - "web3"
    - "txpool"
pair:
  enabled: true

Save the file and exit the editor.

Last updated