---
eip: 2159
label: EIP-2159
title: Common Prometheus Metrics Names for Clients
status: Final
type: Standards Track
category: Interface
created: 2019-07-01
official: https://eips.ethereum.org/EIPS/eip-2159
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2159.md
canonical: https://eips.huatuo.xyz/eip-2159/
lang: en
tldr: Standard Prometheus metric names for chain height, sync target and peers, so operators can monitor different Ethereum clients with one dashboard and one set of alerts.
tags: [monitoring, prometheus, metrics, clients, operations]
---

# EIP-2159: Common Prometheus Metrics Names for Clients

> Standardized names of common metrics for Ethereum clients to use with Prometheus, a widely used monitoring and alerting solution.

**TL;DR:** Standard Prometheus metric names for chain height, sync target and peers, so operators can monitor different Ethereum clients with one dashboard and one set of alerts.

## What problem does it solve?

Most Ethereum clients export metrics in Prometheus format so operators can graph performance and alert when something goes wrong. But each client named its metrics differently. If you ran a mix of clients, which is good for resilience, you needed separate dashboards and alert rules for each one.

EIP-2159 picks standard names for a few metrics that every client can report. With them, one dashboard and one alert configuration work across a heterogeneous set of nodes.

## How it works

The EIP defines four gauges. Clients may export many more metrics, but non-standard ones **should not** use the `ethereum_` prefix.

| Metric | Meaning | JSON-RPC equivalent |
| --- | --- | --- |
| `ethereum_blockchain_height` | Current height of the canonical chain | `eth_blockNumber` |
| `ethereum_best_known_block_number` | Estimated highest block available | `highestBlock` from `eth_syncing`, or `eth_blockNumber` if not syncing |
| `ethereum_peer_count` | Peers currently connected | `net_peerCount` |
| `ethereum_peer_limit` | Maximum peers allowed | none |

`ethereum_best_known_block_number` always has a value: when the node is not syncing, it equals the current chain height. That makes "how far behind am I?" a simple subtraction.

The spec deliberately does not say *how* to expose metrics (port, path, flags), since clients already differ and standardizing that brings little benefit.

## Sample code

A Prometheus scrape config and three alert rules built only on the standard names:

```yaml
# prometheus.yml
scrape_configs:
  - job_name: ethereum
    static_configs:
      - targets: ["node-a:METRICS_PORT", "node-b:METRICS_PORT"]  # each client's metrics port
```

```yaml
# alerts.yml
groups:
  - name: ethereum
    rules:
      - alert: NodeFallingBehind
        expr: ethereum_best_known_block_number - ethereum_blockchain_height > 10
        for: 5m
      - alert: ChainStalled
        expr: increase(ethereum_blockchain_height[5m]) == 0
        for: 5m
      - alert: LowPeers
        expr: ethereum_peer_count < 5
        for: 10m
```

A dashboard panel for peer usage:

```promql
ethereum_peer_count / ethereum_peer_limit
```

## Things to know

- **Status: Final.** It is an Interface standard and does not affect consensus.
- Thresholds in the sample alerts are illustrative. Tune them to your network and block time.
- Clients that already exported these values under old names may break existing dashboards when switching. The spec suggests exposing both names during a transition.
- The metrics port and enabling flag differ by client and are not covered here. Check each client's documentation.
- Consensus-layer (beacon chain) clients follow a separate, more detailed metrics specification.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-2159
