> For the complete documentation index, see [llms.txt](https://docs.stakelocal.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stakelocal.io/dashboard-installation/prometheus-jobs-and-targets/consensus-client-targets.md).

# Consensus Client Targets

## Consensus Client Targets

Consensus 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 review the configuration files for 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](/additional-modifications.md) section for details.
{% endhint %}

### Consensus Client Metrics Configuration

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

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

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/consensus_metrics/lighthouse.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:5054']
      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Lighthouse Beacon'
        group: 'Default Group'
        explorer: 'beaconcha.in'
```

If this instance of Lighthouse 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](/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels.md) for label definitions.

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

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

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/consensus_metrics/lodestar.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:8008']
      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Lodestar Beacon'
        group: 'Default Group'
        explorer: 'beaconcha.in'
```

If this instance of Lodestar 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](/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels.md) for label definitions.

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

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

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/consensus_metrics/nimbus.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:8008']
      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Nimbus'
        group: 'Default Group'
        explorer: 'beaconcha.in'
```

If this instance of Nimbus 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](/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels.md) for label definitions.

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

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

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/consensus_metrics/prysm.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:8080']
      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Prysm Beacon'
        group: 'Default Group'
        explorer: 'beaconcha.in'
```

If this instance of Prysm 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](/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels.md) for label definitions.

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

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

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/consensus_metrics/teku.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:8008']
      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Teku'
        group: 'Default Group'
        explorer: 'beaconcha.in'
```

If this instance of Teku 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](/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels.md) for label definitions.

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

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

```
    - targets: ['192.168.0.42:8080']
      labels:
        network: 'Goerli'
        host: 'server12'
        service: 'Prysm Beacon'
        group: 'Goerli Prysm/Geth'
        explorer: 'goerli.beaconcha.in'
```

### Consensus Client API Configuration

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

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

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/consensus_apis/lighthouse.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:5052']
      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Lighthouse Beacon'
        group: 'Default Group'
        explorer: 'beaconcha.in'
```

If this instance of Lighthouse 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](/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels.md) for label definitions.

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

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

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/consensus_apis/lodestar.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:9596']
      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Lodestar Beacon'
        group: 'Default Group'
        explorer: 'beaconcha.in'
```

If this instance of Lodestar 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](/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels.md) for label definitions.

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

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

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/consensus_apis/nimbus.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:5052']
      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Nimbus'
        group: 'Default Group'
        explorer: 'beaconcha.in'
```

If this instance of Nimbus 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](/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels.md) for label definitions.

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

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

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/consensus_apis/prysm.yml
```

It should look like the following.

<pre><code><strong>    - targets: ['127.0.0.1:3500']
</strong>      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Prysm Beacon'
        group: 'Default Group'
        explorer: 'beaconcha.in'
</code></pre>

If this instance of Prysm 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](/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels.md) for label definitions.

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

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

```bash
sudo nano /etc/prometheus/files_sd/stakelocal/consensus_apis/teku.yml
```

It should look like the following.

```
    - targets: ['127.0.0.1:5051']
      labels:
        network: 'Mainnet'
        host: 'Default Host'
        service: 'Teku'
        group: 'Default Group'
        explorer: 'beaconcha.in'
```

If this instance of Teku 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](/dashboard-installation/prometheus-jobs-and-targets/about-stake-local-labels.md) for label definitions.

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

An example consensus client API target file for the Mainnet network could look like the following.

```
    - targets: ['127.0.0.1:5051']
      labels:
        network: 'Mainnet'
        host: 'wopr'
        service: 'Backup Teku'
        group: 'Mainnet Teku/Besu'
        explorer: 'beaconcha.in'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.stakelocal.io/dashboard-installation/prometheus-jobs-and-targets/consensus-client-targets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
