Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

This article examines EIP-2159, which proposes standardizing Ethereum client metrics to simplify monitoring clusters running different clients.

This article translates, summarizes, and supplements the material linked below.

I have also covered other EIPs.

Overview

Ethereum clients commonly use Prometheus, a monitoring and alerting system, to observe their behavior and performance and detect problems affecting the blockchain.

Prometheus collects metrics that can be used to create dashboards and trigger alerts when problems occur.

Many metrics exposed by Ethereum clients in a Prometheus-compatible format are client-specific, but some are shared across implementations, including metrics describing blockchain progress and errors.

Standardizing names and definitions for common metrics allows operators to monitor multiple clients through a single dashboard and alert configuration. This makes it easier to understand client health and respond quickly to problems.

The proposal establishes a common vocabulary for monitoring Ethereum clients through Prometheus, allowing multiple implementations to be managed from one place.

Motivation

Ethereum operators may run clusters of nodes using different client implementations. Each client exposes metrics describing node health and performance, but at the time of the proposal, there were no common names or definitions for these metrics. Client developers selected their own metric names and meanings.

This makes monitoring heterogeneous clusters difficult. Differences in names and formats complicate the creation of centralized dashboards and alert configurations.

Common definitions would allow operators to monitor nodes running different clients using the same dashboards and alert rules, helping them understand cluster-wide health and respond promptly to issues.

Standardizing metric names and meanings allows nodes running different software to be monitored through one interface.

Specification

The following table defines metrics that Ethereum clients exposing Prometheus-compatible metrics can collect. Clients may expose additional metrics, but the ethereum_ prefix should be reserved for these standardized metrics.

Name Metric type Definition JSON-RPC equivalent
ethereum_blockchain_height Gauge Current height of the canonical chain eth_blockNumber
ethereum_best_known_block_number Gauge Estimated highest available block highestBlock of eth_syncing or eth_blockNumber if not syncing
ethereum_peer_count Gauge Current number of connected peers net_peerCount
ethereum_peer_limit Gauge Maximum number of peers the node allows No equivalent

A Gauge is a metric whose value can increase or decrease over time, such as blockchain height or the number of connected peers.

  • ethereum_blockchain_height represents the current height of the canonical chain.
  • ethereum_best_known_block_number estimates the highest available block number on the network.
    • If the node is not syncing, its current chain height is used.
  • ethereum_peer_count represents the number of currently connected peers.
  • ethereum_peer_limit represents the maximum permitted number of peers; there is no equivalent JSON-RPC method.

These metrics allow operators to monitor Ethereum clients efficiently and detect performance problems or network anomalies quickly.

Additional Notes

The defined metrics are independent of particular Ethereum client implementations, but provide enough information for overview dashboards monitoring multiple nodes. Heterogeneous node deployments can therefore be monitored efficiently through a common dashboard.

Similarly, a more prescriptive specification exists for beacon chain client metrics, although details of how metrics are exposed are omitted. Existing implementations differ in this area, and standardizing those details is not considered especially beneficial.

The proposal establishes common metric names and meanings while allowing differences in how implementations expose their metrics. Operators can monitor different Ethereum nodes and beacon chain clients more consistently and obtain a clearer view of network health.

Compatibility

Standardizing Ethereum client metrics does not affect Ethereum consensus. The change concerns monitoring and alerting rather than the protocol's operation.

Some clients may already expose these metrics under different names. Adopting the new names could break existing dashboards and alerts. Clients wishing to preserve backward compatibility can expose metrics under both their previous and standardized names.

Other clients may already use the standardized names for metrics with different meanings. In such cases, backward compatibility cannot be preserved merely by reusing the name. Changing its meaning to conform to the new standard may cause confusion.

Overall, the proposal improves monitoring and alerting without changing Ethereum's consensus rules, but implementations must consider compatibility with existing monitoring systems.

Citation

Adrian Sutton (@ajsutton), "EIP-2159: Common Prometheus Metrics Names for Clients," Ethereum Improvement Proposals, no. 2159, July 2019. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-2159.

Conclusion

EIP-2159 proposes common Ethereum client metrics to simplify monitoring node clusters that use different client implementations.

If you have questions, feel free to contact me on Twitter.

Twitter @cardene777

I also publish articles on the following platforms.

https://chaldene.net/