主页EIPs
EIPsEIP-2159
EIP-2159

Common Prometheus Metrics Names for Clients

FinalStandards Track: Interface
创建时间: 2019-07-01
Adrian Sutton (@ajsutton)
社区讨论原文链接编辑
1 分钟了解

相关视频
欢迎补充好内容
去提交
正文

Simple Summary

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

Abstract

Many Ethereum clients expose a range of metrics in a format compatible with Prometheus to allow operators to monitor the client's behaviour and performance and raise alerts if the chain isn't progressing or there are other indications of errors. While the majority of these metrics are highly client-specific, reporting on internal implementation details of the client, some are applicable to all clients. By standardizing the naming and format of these common metrics, operators are able to monitor the operation of multiple clients in a single dashboard or alerting configuration.

Motivation

Using common names and meanings for metrics which apply to all clients allows node operators to monitor clusters of nodes using heterogeneous clients using a single dashboard and alerting configuration. Currently there are no agreed names or meanings, leaving client developers to invent their own making it difficult to monitor a heterogeneous cluster.

Specification

The table below defines metrics which may be captured by Ethereum clients which expose metrics to Prometheus. Clients may expose additional metrics however these should not use the ethereum_ prefix.

NameMetric typeDefinitionJSON-RPC Equivalent
ethereum_blockchain_heightGaugeThe current height of the canonical chaineth_blockNumber
ethereum_best_known_block_numberGaugeThe estimated highest block availablehighestBlock of eth_syncing or eth_blockNumber if not syncing
ethereum_peer_countGaugeThe current number of peers connectednet_peerCount
ethereum_peer_limitGaugeThe maximum number of peers this node allows to connectNo equivalent

Note that ethereum_best_known_block_number always has a value. When the eth_syncing JSON-RPC method would return false, the current chain height is used.

Rationale

The defined metrics are independent of Ethereum client implementation but provide sufficient information to create an overview dashboard to support monitoring a group of Ethereum nodes.

There is a similar, though more prescriptive, specification for beacon chain client metrics. The specific details of how to expose the metrics has been omitted as there is variance in existing implementations and standardising this does not provide any significant benefit.

Backwards Compatibility

This is not a consensus affecting change.

Clients may already be publishing these metrics using different names and changing to the new form may break existing alerts or dashboards. Clients that want to avoid this incompatibility can expose the metrics under both the old and new names.

Clients may also be publishing metrics with a different meaning using these names. Backwards compatibility cannot be preserved in this case.

Implementation

Pantheon switched to using these standard metric names in its 1.2 release: https://github.com/PegaSysEng/pantheon/pull/1634.

References

  1. Prometheus. https://prometheus.io
  2. Beacon chain metrics specification. https://github.com/ethereum/eth2.0-metrics/blob/master/metrics.md

Copyright and related rights waived via CC0.

扩展阅读
欢迎补充好内容
去提交
相关项目
欢迎补充好内容
去提交

不想错过最新的 EIP 动态?

订阅 EIPs Fun 周刊以跟进相关更新,建⽴你与 EIP 之间的连接 ,更好地建设以太坊。

详情
聚集 EIP 贡献者, 扩展以太坊
资源
GitHub
支持社区