From e90cb4f5face47c9ea1449c863f1b0a82c2f3711 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Fri, 15 Jun 2018 17:33:44 +0400 Subject: [PATCH] add docs --- docs/index.rst | 1 + docs/metrics.md | 26 ++++++++++++++++++++++++++ node/node.go | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 docs/metrics.md diff --git a/docs/index.rst b/docs/index.rst index b40db3bf4..e7d86bc2b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -52,6 +52,7 @@ ABCI, Apps, Logging, Etc indexing-transactions.md how-to-read-logs.md running-in-production.md + metrics.md Research & Specification ------------------------ diff --git a/docs/metrics.md b/docs/metrics.md new file mode 100644 index 000000000..3a0a17faa --- /dev/null +++ b/docs/metrics.md @@ -0,0 +1,26 @@ +# Metrics + +Tendermint can serve metrics under `/metrics` RPC endpoint, which can be +consumed by Prometheus server. + +This functionality is disabled by default. Set `monitoring=true` if your config +to enable it. + +## List of available metrics + +| Name | Type | Description | +| --------------------------------------- | ------- | ----------------------------------------------------------------------------- | +| consensus_height | Gauge | Height of the chain | +| consensus_validators | Gauge | Number of validators | +| consensus_validators_power | Gauge | Total voting power of all validators | +| consensus_missing_validators | Gauge | Number of validators who did not sign | +| consensus_missing_validators_power | Gauge | Total voting power of the missing validators | +| consensus_byzantine_validators | Gauge | Number of validators who tried to double sign | +| consensus_byzantine_validators_power | Gauge | Total voting power of the byzantine validators | +| consensus_block_interval | Timing | Time between this and last block (Block.Header.Time) | +| consensus_rounds | Gauge | Number of rounds | +| consensus_num_txs | Gauge | Number of transactions | +| mempool_size | Gauge | Number of uncommitted transactions | +| consensus_total_txs | Gauge | Total number of transactions committed | +| consensus_block_size | Gauge | Block size in bytes | +| p2p_peers | Gauge | Number of peers node's connected to | diff --git a/node/node.go b/node/node.go index 00d6cc40f..0d3ecdc1d 100644 --- a/node/node.go +++ b/node/node.go @@ -111,7 +111,7 @@ func DefaultMetricsProvider() (*cs.Metrics, *p2p.Metrics, *mempl.Metrics) { Validators: prometheus.NewGaugeFrom(stdprometheus.GaugeOpts{ Subsystem: "consensus", Name: "validators", - Help: "Number of validators who signed.", + Help: "Number of validators.", }, []string{}), ValidatorsPower: prometheus.NewGaugeFrom(stdprometheus.GaugeOpts{ Subsystem: "consensus",