Skip to main content

Full node metrics

Introduction

This article is the reference material for developers regarding metrics tracked by Hathor full node.

Hathor full node integrates with Prometheus and tracks metrics in text-based format for it and compatible systems.

Metrics description format

In the next section we describe each metric using the following format:

  • Name.
  • Type: counter | gauge | histogram | summary. To know more about metric types, refer to Prometheus documentation — metric types.
  • Meaning: description of what the metric measures.
  • Labels: list of all key/value pairs defining metric's labels.
  • Sample text format: metric_name{label_name="label_value",...} <value> <timestamp>
  • Sample example.
  • Baseline: if appropriate, a threshold for the metric — e.g.: above (or below) X units — indicating a healthy or correct functioning of the full node.
  • Main usage: if appropriate, a brief description of the primary use of the metric.

Metrics

connected_peers

  • Type: gauge
  • Meaning: number of active connections established with peers.
  • Sample text format:
connected_peers <value> <timestamp>
  • Sample example:
connected_peers 16.0 1395066363000

best_block_height

  • Type: gauge
  • Meaning: number of blocks of the best blockchain.
  • Sample text format:
best_block_height <value> <timestamp>
  • Sample example:
best_block_height 12980.0 1395066363000
  • Main usage: used (alongside other metrics) to check whether the full node is synced with the network. One can manually compare it with 'Best block' at Hathor Explorer.

blocks

  • Type: gauge
  • Meaning: number of blocks recorded on the blockchain. Similar to best_block_height but including voided blocks.
  • Sample text format:
blocks <value> <timestamp>
  • Sample example:
blocks 12981.0 1395066363000
  • Main usage: used (alongside other metrics) to check whether the full node is synced with the network. One can manually compare it with 'Blocks' at Hathor Explorer.

transactions

  • Type: gauge
  • Meaning: number of transactions on the database, regardless of being confirmed or voided.
  • Sample text format:
transactions <value> <timestamp>
  • Sample example:
transactions 95.0 1395066363000
  • Main usage: used (alongside other metrics) to check whether the full node is synced with the network. One can manually compare it with 'Transactions' at Hathor Explorer.

websocket_connections

  • Type: gauge
  • Meaning: number of active websocket connections.
  • Sample text format:
websocket_connections <value> <timestamp>
  • Sample example:
websocket_connections 0.0 1395066363000
  • Main usage: used to check the number of applications (wallets and explorers) being served by the full node.

peer_connection_received_messages

  • Type: gauge
  • Meaning: total number of messages received from peers.
  • Labels:
    • connection_string="<string>"
    • network="testnet|mainnet"
    • peer_id="<string>"
  • Sample text format:
peer_connection_received_messages{connection_string="<string>", network="testnet|mainnet", peer_id="<string>"} <value> <timestamp>
  • Sample example:
peer_connection_received_messages{connection_string="tcp://142.86.77.201:50456",network="mainnet",peer_id="b2c9f2e0d0f765e9830f7463a142e7b097cc22f5010119ee8f3a8ab251ec703a"} 1212.0 1395066363000

peer_connection_sent_messages

  • Type: gauge
  • Meaning: total number of messages sent to peers.
  • Labels:
    • connection_string="<string>"
    • network="testnet|mainnet"
    • peer_id="<string>"
  • Sample text format:
peer_connection_sent_messages{connection_string="<string>", network="testnet|mainnet", peer_id="<string>"} <value> <timestamp>
  • Sample example:
peer_connection_sent_messages{connection_string="tcp://142.86.77.201:50456",network="mainnet",peer_id="b2c9f2e0d0f765e9830f7463a142e7b097cc22f5010119ee8f3a8ab251ec703a"} 42.0 1395066363000

peer_connection_received_bytes

  • Type: gauge
  • Meaning: total number of bytes received from peers.
  • Labels:
    • connection_string="<string>"
    • network="testnet|mainnet"
    • peer_id="<string>"
  • Sample text format:
peer_connection_received_bytes{connection_string="<string>", network="testnet|mainnet", peer_id="<string>"} <value> <timestamp>
  • Sample example:
peer_connection_received_bytes{connection_string="tcp://142.86.77.201:50456",network="mainnet",peer_id="b2c9f2e0d0f765e9830f7463a142e7b097cc22f5010119ee8f3a8ab251ec703a"} 423222.0 1395066363000

peer_connection_sent_bytes

  • Type: gauge
  • Meaning: total number of bytes sent to peers.
  • Labels:
    • connection_string="<string>"
    • network="testnet|mainnet"
    • peer_id="<string>"
  • Sample text format:
peer_connection_sent_bytes{connection_string="<string>", network="testnet|mainnet", peer_id="<string>"} <value> <timestamp>
  • Sample example:
peer_connection_sent_bytes{connection_string="tcp://142.86.77.201:50456",network="mainnet",peer_id="b2c9f2e0d0f765e9830f7463a142e7b097cc22f5010119ee8f3a8ab251ec703a"} 6339.0 1395066363000

peer_connection_received_txs

  • Type: gauge
  • Meaning: total number of transactions received from peers.
  • Labels:
    • connection_string="<string>"
    • network="testnet|mainnet"
    • peer_id="<string>"
  • Sample text format:
peer_connection_received_txs{connection_string="<string>", network="testnet|mainnet", peer_id="<string>"} <value> <timestamp>
  • Sample example:
peer_connection_received_txs{connection_string="tcp://142.86.77.201:50456",network="mainnet",peer_id="b2c9f2e0d0f765e9830f7463a142e7b097cc22f5010119ee8f3a8ab251ec703a"} 0.0 1395066363000

peer_connection_discarded_txs

  • Type: gauge
  • Meaning: total number of discarded transactions among those received from peers.
  • Labels:
    • connection_string="<string>"
    • network="testnet|mainnet"
    • peer_id="<string>"
  • Sample text format:
peer_connection_discarded_txs{connection_string="<string>", network="testnet|mainnet", peer_id="<string>"} <value> <timestamp>
  • Sample example:
peer_connection_discarded_txs{connection_string="tcp://142.86.77.201:50456",network="mainnet",peer_id="b2c9f2e0d0f765e9830f7463a142e7b097cc22f5010119ee8f3a8ab251ec703a"} 0.0 1395066363000

peer_connection_received_blocks

  • Type: gauge
  • Meaning: total number of blocks received from peers.
  • Labels:
    • connection_string="<string>"
    • network="testnet|mainnet"
    • peer_id="<string>"
  • Sample text format:
peer_connection_received_blocks{connection_string="<string>", network="testnet|mainnet", peer_id="<string>"} <value> <timestamp>
  • Sample example:
peer_connection_received_blocks{connection_string="tcp://142.86.77.201:50456",network="mainnet",peer_id="b2c9f2e0d0f765e9830f7463a142e7b097cc22f5010119ee8f3a8ab251ec703a"} 0.0 1395066363000

peer_connection_discarded_blocks

  • Type: gauge
  • Meaning: total number of discarded blocks among those received from peers.
  • Labels:
    • connection_string="<string>"
    • network="testnet|mainnet"
    • peer_id="<string>"
  • Sample text format:
peer_connection_discarded_blocks{connection_string="<string>", network="testnet|mainnet", peer_id="<string>"} <value> <timestamp>
  • Sample example:
peer_connection_discarded_blocks{connection_string="tcp://142.86.77.201:50456",network="mainnet",peer_id="b2c9f2e0d0f765e9830f7463a142e7b097cc22f5010119ee8f3a8ab251ec703a"} 0.0 1395066363000

tx_storage_total_sst_files_size

  • Type: gauge
  • Meaning: size of a specific fraction of full node's database (in bytes).
  • Label:
    • column_family="<string>"
  • Sample text format:
tx_storage_total_sst_files_size{column_family="<string>"} <value> <timestamp>
  • Sample example:
tx_storage_total_sst_files_size{column_family="b'tx'"} 2.572416e+06 1395066363000

hash_rate

  • Type: gauge
  • Meaning: conversion of the weight of the best block to a linear scale equivalent to H/s.
  • Sample text format:
hash_rate <value> <timestamp>
  • Sample example:
hash_rate 1.0519586405340237e+011 1395066363000

connecting_peers

  • Type: gauge
  • Meaning: number of connections being established with peers.
  • Sample text format:
connecting_peers <value> <timestamp>
  • Sample example:
connecting_peers 6.0 1395066363000

handshaking_peers

  • Type: gauge
  • Meaning: number of peer connections in handshake stage.
  • Sample text format:
handshaking_peers <value> <timestamp>
  • Sample example:
handshaking_peers 0.0 1395066363000

known_peers

  • Type: gauge
  • Meaning: total number of peers known by the node.
  • Sample text format:
known_peers <value> <timestamp>
  • Sample example:
known_peers 16.0 1395066363000

best_block_weight

  • Type: gauge
  • Meaning: weight of the latest block in the best chain.
  • Sample text format:
best_block_weight <value> <timestamp>
  • Sample example:
best_block_weight 41.52117762321128 1395066363000

subscribed_addresses

  • Type: gauge
  • Meaning: number of subscribed addresses in the websocket API.
  • Sample text format:
subscribed_addresses <value> <timestamp>
  • Sample example:
subscribed_addresses 0.0 1395066363000

completed_jobs

  • Type: gauge
  • Meaning: total number of completed jobs in the stratum server.
  • Sample text format:
completed_jobs <value> <timestamp>
  • Sample example:
completed_jobs 0.0 1395066363000
  • Main usage: useful only for solo mining (i.e., apart from a mining pool).

blocks_found

  • Type: gauge
  • Meaning: total number of blocks found by the miner in the stratum server.
  • Sample text format:
blocks_found <value> <timestamp>
  • Sample example:
blocks_found 0.0 1395066363000
  • Main usage: useful only for solo mining (i.e., apart from a mining pool).

estimated_hash_rate

  • Type: gauge
  • Meaning: estimated hash rate for stratum miners.
  • Sample text format:
estimated_hash_rate <value> <timestamp>
  • Sample example:
estimated_hash_rate 0.0 1395066363000
  • Main usage: useful only for solo mining (i.e., apart from a mining pool).

transaction_cache_hits

  • Type: gauge
  • Meaning: total number of hits in transaction cache.
  • Sample text format:
transaction_cache_hits <value> <timestamp>
  • Sample example:
transaction_cache_hits 0.0 1395066363000

transaction_cache_misses

  • Type: gauge
  • Meaning: total number of misses in transaction cache.
  • Sample text format:
transaction_cache_misses <value> <timestamp>
  • Sample example:
transaction_cache_misses 0.0 1395066363000

What's next?