Supervision tool#

prometheus#

Tendermint also supports the use of prometheus metrics. This function is enabled by setting prometheus=true in config/config.toml. Through setting prometheus_listen_addr, the default supervision address :26660 is changed. The default status is set as enable on OKTC’s testnet.

Metrics available on OKTC#

NameTypeTagsDescription
tendermint_consensus_heightGaugeconsensus block height
tendermint_consensus_validatorsGaugenumber of validators
tendermint_consensus_validators_powerGaugetotal voting power of validators
tendermint_consensus_missing_validatorsGaugenumber of missing validators
tendermint_consensus_missing_validators_powerGaugetotal voting power of missing validators
tendermint_consensus_byzantine_validatorsGaugenumber of byzantine validators
tendermint_consensus_byzantine_validators_powerGaugetotal voting power of byzantine validators
tendermint_consensus_block_interval_secondsHistogramblock interval
tendermint_consensus_roundsGaugeconsensus round
tendermint_consensus_num_txsGaugenumber of transactions in the block
tendermint_consensus_block_partsCounterpeer_idnumber of block parts
tendermint_consensus_latest_block_heightGaugelatest block height after consensus
tendermint_consensus_fast_syncingGauge0 (not fast syncing) , 1 (syncing)
tendermint_consensus_total_txsGaugetotal number of transactions in the block
tendermint_consensus_block_size_bytesGaugeblock size
tendermint_consensus_new_round_processing_timeGaugeprocessing time for consensus initialization
tendermint_consensus_propose_processing_timeGaugeconsensus proposal processing time
tendermint_consensus_prevote_processing_timeGaugeconsensus prevote processing time
tendermint_consensus_precommit_processing_timeGaugeconsensus precommit processing time
tendermint_consensus_commit_processing_timeGaugeconsensus commit processing time
tendermint_p2p_peersGaugenumber of connected peers
tendermint_p2p_peer_receive_bytes_totalCounterpeer_id, chIDtotal bytes received from the specific peer
tendermint_p2p_peer_send_bytes_totalCounterpeer_id, chIDtotal bytes sent to a peer node
tendermint_p2p_peer_pending_send_bytesGaugepeer_idnumber of bytes pending to be sent
tendermint_p2p_num_txsGaugepeer_idnumber of transactions broadcast from a peer node
tendermint_mempool_sizeGaugenumber of uncommitted transactions
tendermint_mempool_tx_size_bytesHistogramincreased transaction size in the memory pool
tendermint_mempool_failed_txsCounternumber of transactions that fail to pass verification in the memory pool
tendermint_mempool_recheck_timesCounternumber of rechecked transactions executed in the memory pool
tendermint_state_block_processing_timeHistogramblock processing time
x_order_canceledGaugeorder canceled
x_order_expiredGaugeorder expired
x_order_fullfilledGaugeorder filled
x_order_partial_filledGaugeorder partially filled
x_order_pendingGaugeorder pending

Supervision tool#

Create monitor.yml

version: '2'
services:
  prometheus:
    image: prom/prometheus
    container_name: prometheus
    hostname: prometheus
    user: "root"
    volumes:
      - ./prometheus_config.yml:/etc/prometheus/prometheus.yml
    ports:
      - "9090:9090"

  grafana:
    image: grafana/grafana
    container_name: grafana
    hostname: grafana
    user: "root"
    ports:
      - '3000:3000'

Create prometheus_config.yml in the same directory

global:
  scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.

scrape_configs:
  - job_name: 'node'
    static_configs:
      - targets: ['localhost:26660']
        labels:
          instance: fullnode

Enable prometheus and grafana in the same directory

docker-compose -f monitor.yml up -d

After enabling the above, you can see the information on prometheus via http://localhost:9090. You can configure a dashboard (template id: 7044) suitable for oktc via http://localhost:3000(the default account name and password are both admin) and adjust it by customizing the names of metrics.

Note: Users can also enable prometheus and grafana through other methods.