github.com/KYVENetwork/cometbft/v38@v38.0.3/docs/core/metrics.md (about)

     1  ---
     2  order: 5
     3  ---
     4  
     5  # Metrics
     6  
     7  CometBFT can report and serve the Prometheus metrics, which in their turn can
     8  be consumed by Prometheus collector(s).
     9  
    10  This functionality is disabled by default.
    11  
    12  To enable the Prometheus metrics, set `instrumentation.prometheus=true` in your
    13  config file. Metrics will be served under `/metrics` on 26660 port by default.
    14  Listen address can be changed in the config file (see
    15  `instrumentation.prometheus\_listen\_addr`).
    16  
    17  ## List of available metrics
    18  
    19  The following metrics are available:
    20  
    21  | **Name**                                   | **Type**  | **Tags**         | **Description**                                                                                                                            |
    22  |--------------------------------------------|-----------|------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
    23  | abci\_connection\_method\_timing\_seconds  | Histogram | method, type     | Timings for each of the ABCI methods                                                                                                       |
    24  | blocksync\_syncing                         | Gauge     |                  | Either 0 (not block syncing) or 1 (syncing)                                                                                                |
    25  | consensus\_height                          | Gauge     |                  | Height of the chain                                                                                                                        |
    26  | consensus\_validators                      | Gauge     |                  | Number of validators                                                                                                                       |
    27  | consensus\_validators\_power               | Gauge     |                  | Total voting power of all validators                                                                                                       |
    28  | consensus\_validator\_power                | Gauge     |                  | Voting power of the node if in the validator set                                                                                           |
    29  | consensus\_validator\_last\_signed\_height | Gauge     |                  | Last height the node signed a block, if the node is a validator                                                                            |
    30  | consensus\_validator\_missed\_blocks       | Gauge     |                  | Total amount of blocks missed for the node, if the node is a validator                                                                     |
    31  | consensus\_missing\_validators             | Gauge     |                  | Number of validators who did not sign                                                                                                      |
    32  | consensus\_missing\_validators\_power      | Gauge     |                  | Total voting power of the missing validators                                                                                               |
    33  | consensus\_byzantine\_validators           | Gauge     |                  | Number of validators who tried to double sign                                                                                              |
    34  | consensus\_byzantine\_validators\_power    | Gauge     |                  | Total voting power of the byzantine validators                                                                                             |
    35  | consensus\_block\_interval\_seconds        | Histogram |                  | Time between this and last block (Block.Header.Time) in seconds                                                                            |
    36  | consensus\_rounds                          | Gauge     |                  | Number of rounds                                                                                                                           |
    37  | consensus\_num\_txs                        | Gauge     |                  | Number of transactions                                                                                                                     |
    38  | consensus\_total\_txs                      | Gauge     |                  | Total number of transactions committed                                                                                                     |
    39  | consensus\_block\_parts                    | Counter   | peer\_id         | Number of blockparts transmitted by peer                                                                                                   |
    40  | consensus\_latest\_block\_height           | Gauge     |                  | /status sync\_info number                                                                                                                  |
    41  | consensus\_block\_size\_bytes              | Gauge     |                  | Block size in bytes                                                                                                                        |
    42  | consensus\_step\_duration                  | Histogram | step             | Histogram of durations for each step in the consensus protocol                                                                             |
    43  | consensus\_round\_duration                 | Histogram |                  | Histogram of durations for all the rounds that have occurred since the process started                                                     |
    44  | consensus\_block\_gossip\_parts\_received  | Counter   | matches\_current | Number of block parts received by the node                                                                                                 |
    45  | consensus\_quorum\_prevote\_delay          | Gauge     |                  | Interval in seconds between the proposal timestamp and the timestamp of the earliest prevote that achieved a quorum                        |
    46  | consensus\_full\_prevote\_delay            | Gauge     |                  | Interval in seconds between the proposal timestamp and the timestamp of the latest prevote in a round where all validators voted           |
    47  | consensus\_vote\_extension\_receive\_count | Counter   | status           | Number of vote extensions received                                                                                                         |
    48  | consensus\_proposal\_receive\_count        | Counter   | status           | Total number of proposals received by the node since process start                                                                         |
    49  | consensus\_proposal\_create\_count         | Counter   |                  | Total number of proposals created by the node since process start                                                                          |
    50  | consensus\_round\_voting\_power\_percent   | Gauge     | vote\_type       | A value between 0 and 1.0 representing the percentage of the total voting power per vote type received within a round                      |
    51  | consensus\_late\_votes                     | Counter   | vote\_type       | Number of votes received by the node since process start that correspond to earlier heights and rounds than this node is currently in.     |
    52  | p2p\_message\_send\_bytes\_total           | Counter   | message\_type    | Number of bytes sent to all peers per message type                                                                                         |
    53  | p2p\_message\_receive\_bytes\_total        | Counter   | message\_type    | Number of bytes received from all peers per message type                                                                                   |
    54  | p2p\_peers                                 | Gauge     |                  | Number of peers node's connected to                                                                                                        |
    55  | p2p\_peer\_receive\_bytes\_total           | Counter   | peer\_id, chID   | Number of bytes per channel received from a given peer                                                                                     |
    56  | p2p\_peer\_send\_bytes\_total              | Counter   | peer\_id, chID   | Number of bytes per channel sent to a given peer                                                                                           |
    57  | p2p\_peer\_pending\_send\_bytes            | Gauge     | peer\_id         | Number of pending bytes to be sent to a given peer                                                                                         |
    58  | p2p\_num\_txs                              | Gauge     | peer\_id         | Number of transactions submitted by each peer\_id                                                                                          |
    59  | p2p\_pending\_send\_bytes                  | Gauge     | peer\_id         | Amount of data pending to be sent to peer                                                                                                  |
    60  | mempool\_size                              | Gauge     |                  | Number of uncommitted transactions                                                                                                         |
    61  | mempool\_tx\_size\_bytes                   | Histogram |                  | Transaction sizes in bytes                                                                                                                 |
    62  | mempool\_failed\_txs                       | Counter   |                  | Number of failed transactions                                                                                                              |
    63  | mempool\_recheck\_times                    | Counter   |                  | Number of transactions rechecked in the mempool                                                                                            |
    64  | state\_block\_processing\_time             | Histogram |                  | Time spent processing FinalizeBlock in ms                                                                                                 |
    65  | state\_consensus\_param\_updates           | Counter   |                  | Number of consensus parameter updates returned by the application since process start                                                      |
    66  | state\_validator\_set\_updates             | Counter   |                  | Number of validator set updates returned by the application since process start                                                            |
    67  | statesync\_syncing                         | Gauge     |                  | Either 0 (not state syncing) or 1 (syncing)                                                                                                |
    68  
    69  ## Useful queries
    70  
    71  Percentage of missing + byzantine validators:
    72  
    73  ```md
    74  ((consensus\_byzantine\_validators\_power + consensus\_missing\_validators\_power) / consensus\_validators\_power) * 100
    75  ```