|
| 1 | +# How to configure metrics |
| 2 | + |
| 3 | +Rollkit can report and serve the Prometheus metrics, which in their turn can |
| 4 | +be consumed by Prometheus collector(s). |
| 5 | + |
| 6 | +This functionality is disabled by default. |
| 7 | + |
| 8 | +To enable the Prometheus metrics, set `instrumentation.prometheus=true` in your |
| 9 | +CometBFT node's [config file](https://docs.cometbft.com/v0.38/core/configuration) |
| 10 | +located at `$CMTHOME/config/config.toml`. |
| 11 | + |
| 12 | +Metrics will be served under `/metrics` on 26660 port by default. |
| 13 | +The listening address (default: `localhost:26660`) can be changed in the config file using |
| 14 | +`instrumentation.prometheus_listen_addr`. |
| 15 | + |
| 16 | +## List of available metrics |
| 17 | + |
| 18 | +The following metrics are available, grouped by their subsystem: |
| 19 | + |
| 20 | +### ABCI |
| 21 | + |
| 22 | +| Name | Type | Tags | Description | |
| 23 | +|----------------------------------------------|-----------|-----------------------------|--------------------------------------------| |
| 24 | +| cometbft_abci_connection_method_timing_seconds | Histogram | chain_id, method, type | Timing for each ABCI method. | |
| 25 | + |
| 26 | +### sequencer |
| 27 | + |
| 28 | +| Name | Type | Tags | Description | |
| 29 | +|--------------------------------------|-------|----------|------------------------------| |
| 30 | +| cometbft_sequencer_height | Gauge | chain_id | Height of the chain. | |
| 31 | +| cometbft_sequencer_num_txs | Gauge | chain_id | Number of transactions. | |
| 32 | +| cometbft_sequencer_block_size_bytes | Gauge | chain_id | Size of the block. | |
| 33 | +| cometbft_sequencer_total_txs | Gauge | chain_id | Total number of transactions. | |
| 34 | +| cometbft_sequencer_latest_block_height | Gauge | chain_id | The latest block height. | |
| 35 | + |
| 36 | +### mempool |
| 37 | + |
| 38 | +| Name | Type | Tags | Description | |
| 39 | +|------------------------------------------|-----------|----------|--------------------------------------------------------------------------------| |
| 40 | +| cometbft_mempool_size | Gauge | chain_id | Size of the mempool (number of uncommitted transactions). | |
| 41 | +| cometbft_mempool_size_bytes | Gauge | chain_id | Total size of the mempool in bytes. | |
| 42 | +| cometbft_mempool_tx_size_bytes | Histogram | chain_id | Transaction sizes in bytes. | |
| 43 | +| cometbft_mempool_failed_txs | Counter | chain_id | Number of failed transactions. | |
| 44 | +| cometbft_mempool_rejected_txs | Counter | chain_id | Number of rejected transactions. | |
| 45 | +| cometbft_mempool_evicted_txs | Counter | chain_id | Number of evicted transactions. | |
| 46 | +| cometbft_mempool_recheck_times | Counter | chain_id | Number of times transactions are rechecked in the mempool. | |
| 47 | + |
| 48 | +### p2p |
| 49 | + |
| 50 | +| Name | Type | Tags | Description | |
| 51 | +|--------------------------------------|---------|---------------------|--------------------------------------------------| |
| 52 | +| cometbft_p2p_peers | Gauge | chain_id | Number of peers. | |
| 53 | +| cometbft_p2p_peer_receive_bytes_total| Counter | peer_id, chID | Number of bytes received from a given peer. | |
| 54 | +| cometbft_p2p_peer_send_bytes_total | Counter | peer_id, chID | Number of bytes sent to a given peer. | |
| 55 | +| cometbft_p2p_peer_pending_send_bytes | Gauge | peer_id | Pending bytes to be sent to a given peer. | |
| 56 | +| cometbft_p2p_num_txs | Gauge | peer_id | Number of transactions submitted by each peer. | |
| 57 | +| cometbft_p2p_message_receive_bytes_total | Counter | message_type | Number of bytes of each message type received. | |
| 58 | +| cometbft_p2p_message_send_bytes_total | Counter | message_type | Number of bytes of each message type sent. | |
| 59 | + |
| 60 | +In addition to these, [go-libp2p metrics](https://github.com/libp2p/go-libp2p/tree/master/dashboards) are exported as well. |
| 61 | + |
| 62 | +### state |
| 63 | + |
| 64 | +| Name | Type | Tags | Description | |
| 65 | +|--------------------------------------------|-----------|----------|--------------------------------------------------------------------------| |
| 66 | +| cometbft_state_block_processing_time | Histogram | chain_id | Time spent processing FinalizeBlock. | |
| 67 | +| cometbft_state_consensus_param_updates | Counter | chain_id | Number of consensus parameter updates returned by the application since process start. | |
| 68 | + |
| 69 | +## centralized-sequencer |
| 70 | + |
| 71 | +The `centralized-sequencer` has its own metrics and configuration, see the [centralized sequencer docs](guides/centralized-sequencer) for details. |
0 commit comments