# Execution Client Targets

## Execution Client Targets

Execution client data is collected by Prometheus from three different sources:

1. Directly from the client metrics page
2. Indirectly from the client API via json\_exporter
3. Indirectly from the client API via Ethereum Metrics Exporter

We will set up the first two here. Ethereum Metrics Exporter is covered in a later section.

{% hint style="info" %}
If you would like to monitor more than one instance of the same client, please see the Additional Modifications section for details.
{% endhint %}

### Execution Client Metrics Configuration

To configure the Prometheus target for client metrics, follow the instructions for your client below.

{% tabs %}
{% tab title="Besu" %}
Edit the Besu configuration file in the `/etc/prometheus/files_sd/stakelocal/execution_metrics` directory.

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/execution_metrics/besu.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:9545']
      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Besu'
        group: 'Default Group'
        explorer: 'etherscan.io'
```

If this instance of Besu is accessible at a different IP address or port, update those in the `targets` line.

Update the `network`, `host`, `service`, `group` and `explorer` labels, as needed. See [About Stake Local Labels](https://docs.stakelocal.io/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels) for label definitions.

Save the file and exit the editor.
{% endtab %}

{% tab title="Erigon" %}
Edit the Erigon configuration file in the `/etc/prometheus/files_sd/stakelocal/execution_metrics` directory.

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/execution_metrics/erigon.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:6060']
      labels:
        network: 'Mainnet'
        service: 'Erigon'
        host: 'Default Host'
        group: 'Default Group'
        explorer: 'etherscan.io'
```

If this instance of Erigon is accessible at a different IP address or port, update those in the `targets` line.

Update the `network`, `host`, `service`, `group` and `explorer` labels, as needed. See [About Stake Local Labels](https://docs.stakelocal.io/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels) for label definitions.

Save the file and exit the editor.
{% endtab %}

{% tab title="Geth" %}
Edit the Geth configuration file in the `/etc/prometheus/files_sd/stakelocal/execution_metrics` directory.

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/execution_metrics/geth.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:6060']
      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Geth'
        group: 'Default Group'
        explorer: 'etherscan.io'
```

If this instance of Geth is accessible at a different IP address or port, update those in the `targets` line.

Update the `network`, `host`, `service`, `group` and `explorer` labels, as needed. See [About Stake Local Labels](https://docs.stakelocal.io/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels) for label definitions.

Save the file and exit the editor.
{% endtab %}

{% tab title="Nethermind" %}
Edit the Nethermind configuration file in the `/etc/prometheus/files_sd/stakelocal/execution_metrics` directory.

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/execution_metrics/nethermind.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:8080']
      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Nethermind'
        group: 'Default Group'
        explorer: 'etherscan.io'
```

If this instance of Nethermind is accessible at a different IP address or port, update those in the `targets` line.

Update the `network`, `host`, `service`, `group` and `explorer` labels, as needed. See [About Stake Local Labels](https://docs.stakelocal.io/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels) for label definitions.

Save the file and exit the editor.
{% endtab %}
{% endtabs %}

An example execution client API target file for the Sepolia network could look like the following.

```
    - targets: ['localhost:8080']
      labels:
        network: 'Sepolia'
        host: 'nuc'
        service: 'Nethermind'
        group: 'Sepolia Nimbus/Nethermind'
        explorer: 'sepolia.etherscan.io'
```

### Execution Client API Configuration

To configure the Prometheus target for client APIs, follow the instructions for your client below.

{% tabs %}
{% tab title="Besu" %}
Edit the Besu configuration file in the `/etc/prometheus/files_sd/stakelocal/execution_apis` directory.

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/execution_apis/besu.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:8545']
      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Besu'
        group: 'Default Group'
        explorer: 'etherscan.io'
        json_exporter: '127.0.0.1:7979'
        client: 'Besu'
```

If this instance of Besu is accessible at a different IP address or port, update those in the `targets` line.

Update the `network`, `host`, `service`, `group` and `explorer` labels, as needed. See [About Stake Local Labels](https://docs.stakelocal.io/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels) for label definitions. The `json_exporter` and `client` labels may be left as-is.

Save the file and exit the editor.
{% endtab %}

{% tab title="Erigon" %}
Edit the Erigon configuration file in the `/etc/prometheus/files_sd/stakelocal/execution_apis` directory.

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/execution_apis/erigon.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:8545']
      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Erigon'
        group: 'Default Group'
        explorer: 'etherscan.io'
        json_exporter: '127.0.0.1:7979'
        client: 'Erigon'
```

If this instance of Erigon is accessible at a different IP address or port, update those in the `targets` line.

Update the `network`, `host`, `service`, `group` and `explorer` labels, as needed. See [About Stake Local Labels](https://docs.stakelocal.io/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels) for label definitions. The `json_exporter` and `client` labels may be left as-is.

Save the file and exit the editor.
{% endtab %}

{% tab title="Geth" %}
Edit the Geth configuration file in the `/etc/prometheus/files_sd/stakelocal/execution_apis` directory.

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/execution_apis/geth.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:8545']
      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Geth'
        group: 'Default Group'
        explorer: 'etherscan.io'
        json_exporter: '127.0.0.1:7979'
        client: 'Geth'
```

If this instance of Geth is accessible at a different IP address or port, update those in the `targets` line.

Update the `network`, `host`, `service`, `group` and `explorer` labels, as needed. See [About Stake Local Labels](https://docs.stakelocal.io/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels) for label definitions. The `json_exporter` and `client` labels may be left as-is.

Save the file and exit the editor.
{% endtab %}

{% tab title="Nethermind" %}
Edit the Nethermind configuration file in the `/etc/prometheus/files_sd/stakelocal/execution_apis` directory.

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/execution_apis/nethermind.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:8545']
      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Nethermind'
        group: 'Default Group'
        explorer: 'etherscan.io'
        json_exporter: '127.0.0.1:7979'
        client: 'Nethermind'
```

If this instance of Nethermind is accessible at a different IP address or port, update those in the `targets` line.

Update the `network`, `host`, `service`, `group` and `explorer` labels, as needed. See [About Stake Local Labels](https://docs.stakelocal.io/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels) for label definitions. The `json_exporter` and `client` labels may be left as-is.

Save the file and exit the editor.
{% endtab %}
{% endtabs %}

An example execution client metrics target file for the Goerli network could look like the following.

```
    - targets: ['192.168.0.12:8545']
      labels:
        network: 'Goerli'
        host: 'mrwhiskers'
        service: 'Erigon'
        group: 'Goerli Lighthouse/Erigon'
        explorer: 'goerli.etherscan.io'
        json_exporter: '127.0.0.1:7979'
        client: 'Erigon'
```
