Skip to main content
All metrics are served at GET /metrics on the metrics port and are exposed in the standard Prometheus text format. Configure the port using ports.metrics in the Helm chart.

Configuration

Metrics are configured in the node’s config.json:
{
  "metrics": {
    "address": "0.0.0.0:9100",
    "histogram_buckets": {},
    "global_labels": {
      "network": "mainnet",
      "node_id": "validator-01"
    }
  }
}
FieldDescription
addressListen address for the metrics and probes HTTP server. If the metrics section is absent, the server does not start.
histogram_bucketsCustom histogram buckets by metric name. When empty, default duration buckets apply to all histograms whose names end with the suffix *_seconds.
global_labelsKey-value pairs added to every metric. Useful for distinguishing nodes in a shared Prometheus.
Default histogram buckets for *_seconds metrics:
[0.000001, 0.0001, 0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0, 60.0, 120.0, 300.0, 600.0, 3600.0]

Build info

ton_node_build_info is an informational gauge that is always set to 1. Build metadata is encoded as labels:
ton_node_build_info{version="<node-version>", commit="<git-commit>", branch="<git-branch>", build_time="<build-timestamp>", rustversion="<rustc-version>", arch="<target-arch>", os="<target-os>"} 1
LabelDescription
versionPackage version from Cargo.toml
commitFull git commit hash
branchGit branch at build time
build_timeBuild timestamp
rustversionRust compiler version
archTarget architecture; x86_64, aarch64, etc.
osTarget OS; linux, macos, etc.

Naming convention

All metrics follow the format:
ton_node_{subsystem}_{metric_name}[_{unit_suffix}]
  • ton_node_ – application prefix that prevents collisions in shared Prometheus instances.
  • {subsystem} – functional area defined in the table below.
  • {metric_name} – descriptive name in snake case.
  • {unit_suffix} – optional: _total (counters), _seconds (durations), _bytes (sizes), _ratio (dimensionless).
SubsystemScope
engineCore node state, sync status, masterchain tracking
validatorBlock validation lifecycle
collatorBlock collation lifecycle
outqueueOutbound message queue cleanup
ext_messagesExternal messages queue
networkADNL, catchain, overlay, neighbor stats
dbDatabase, shard state, gc, persistent state
blockBlock parsing, block sizes

Metric types

TypeBehaviorSuffix convention
counterMonotonically increasing value. Resets to 0 on restart._total
gaugeArbitrary value that can increase or decrease.none, _seconds, _ratio
histogramSamples sorted into configurable buckets. Exposes _bucket, _sum, _count._seconds, _bytes, _ratio, or none

Labels

Some metrics carry labels for additional dimensions:
LabelSubsystemsValuesDescription
shardvalidator, collator, outqueueShardIdent stringShard identifier for per-shard breakdown
stepoutqueuestep identifierOutgoing queue cleanup step identifier
peernetworkpeer key ID (hex)ADNL peer for round-trip measurements
neighbournetworkneighbor key ID (hex)Overlay neighbor for reliability tracking

engine

Core node state, including sync progress, masterchain tracking, validation intent, and applied transactions. This subsystem exposes 8 metrics: 7 gauges and 1 counter.
MetricTypeDescription
ton_node_engine_sync_statusgaugeSync state machine value.
ton_node_engine_timediff_secondsgaugeSeconds between current time and the last applied masterchain block.
ton_node_engine_last_mc_block_utimegaugeUnix timestamp of the last applied masterchain block.
ton_node_engine_last_mc_block_seqnogaugeSeqno of the last applied masterchain block.
ton_node_engine_shards_mc_seqnogaugeMasterchain block seqno last processed by the shard client.
ton_node_engine_shards_timediff_secondsgaugeSeconds between current time and the masterchain block last processed by the shard client.
ton_node_engine_will_validategauge1 if the node intends to validate, 0 otherwise.
ton_node_engine_applied_transactions_totalcounterTotal number of transactions in all applied blocks, including masterchain and shards.

Sync status values

ValueStateDescription
0not_setInitial state; status not yet determined
1start_bootBoot sequence started
3load_statesLoading shard states from the network
4finish_bootBoot sequence completing
5sync_blocksSyncing blocks from the network
6syncedFully synced with the network
7checking_dbDatabase integrity check in progress
8db_brokenDatabase corruption detected
A healthy, synced node reports sync_status = 6. During initial sync or restart, the value progresses through 1 → 3 → 4 → 5 → 6.

Time difference

timediff_seconds measures the gap between wall-clock time and the gen_utime of the last applied masterchain block. Values below 20 seconds indicate a healthy node; values above 60 seconds require investigation.

validator

Block validation lifecycle, including state, set membership, outcomes, and gas. It exposes 8 metrics: 4 gauges, 3 counters, and 1 histogram.
MetricTypeDescription
ton_node_validator_statusgaugeValidation state machine value.
ton_node_validator_in_current_setgauge1 if the node is in the current validator set (p34).
ton_node_validator_in_next_setgauge1 if the node is in the next validator set (p36).
ton_node_validator_activegaugeNumber of validation queries currently in progress.
ton_node_validator_successes_totalcounterSuccessful block validations.
ton_node_validator_failures_totalcounterFailed block validations.
ton_node_validator_ref_block_failures_totalcounterFailed reference shard block validations.
ton_node_validator_gas_rate_ratiohistogramGas rate ratio from validation.

Validation status values

ValueStateDescription
0Not in SetNode is not part of the current validator set
1WaitingWaiting for next validation round
2CountdownElected; countdown to validation start
3ActiveActively validating blocks

collator

Block collation lifecycle, including outcomes, duration, gas usage, message flow, and transaction counts. It exposes 14 metrics: 2 gauges, 6 counters, and 6 histograms.
MetricTypeDescription
ton_node_collator_activegaugeNumber of collation queries currently in progress.
ton_node_collator_successes_totalcounterSuccessful block collations.
ton_node_collator_failures_totalcounterFailed block collations.
ton_node_collator_duration_secondshistogramEnd-to-end block collation duration.
ton_node_collator_process_ext_messages_secondshistogramTime to process inbound external messages.
ton_node_collator_process_new_messages_secondshistogramTime to process new internal messages.
ton_node_collator_gas_usedhistogramGas consumed per collated block.
ton_node_collator_gas_rate_ratiohistogramGas rate ratio from collation.
ton_node_collator_dequeued_messages_totalcounterMessages dequeued from the outbound queue during collation.
ton_node_collator_enqueued_messages_totalcounterMessages enqueued to the outbound queue during collation.
ton_node_collator_inbound_messages_totalcounterInbound messages processed during collation.
ton_node_collator_outbound_messages_totalcounterOutbound messages produced during collation.
ton_node_collator_transit_messages_totalcounterTransit messages, which are forwarded between shards, during collation.
ton_node_collator_executed_transactions_totalcounterTransactions executed during collation.

outqueue

Outbound message queue periodic cleanup statistics. This subsystem exposes 4 metrics, all of which are gauges.
MetricTypeDescription
ton_node_outqueue_clean_partialgauge1 if last outgoing queue clean was partial; not all messages processed.
ton_node_outqueue_clean_duration_secondsgaugeDuration of the last outgoing queue clean in seconds.
ton_node_outqueue_clean_processedgaugeMessages processed in the last outgoing queue clean.
ton_node_outqueue_clean_deletedgaugeMessages deleted in the last outgoing queue clean.

ext_messages

External message queue containing messages received from clients and awaiting inclusion in blocks. It exposes 2 metrics: 1 gauge, 1 counter.
MetricTypeDescription
ton_node_ext_messages_queue_sizegaugeCurrent size of the external message queue.
ton_node_ext_messages_expired_totalcounterExpired external messages removed from the queue.

network

Networking metrics covering ADNL round-trips, catchain timings, overlay queries, and neighbor reliability. It exposes 7 metrics: 1 gauge, 1 counter, and 5 histograms.
MetricTypeLabelsDescription
ton_node_network_adnl_roundtrip_secondshistogrampeerADNL query round-trip time.
ton_node_network_catchain_overlay_query_secondshistogramCatchain overlay query time.
ton_node_network_catchain_send_secondshistogramCatchain send message time.
ton_node_network_catchain_client_query_secondshistogramCatchain client query time.
ton_node_network_consensus_overlay_query_secondshistogramConsensus overlay query time.
ton_node_network_neighbour_failures_totalcounterneighbourFailed queries to overlay neighbors.
ton_node_network_neighbour_unreliabilitygaugeneighbourNeighbor unreliability score; higher values indicate lower reliability.

db

Database operations, including shard state management, garbage collection, persistent state, and Merkle updates. It exposes 5 metrics: 1 gauge, 4 histograms.
MetricTypeDescription
ton_node_db_shardstate_queue_sizegaugeShard state processing queue size.
ton_node_db_shardstate_gc_secondshistogramShard state garbage collection duration.
ton_node_db_persistent_state_write_secondshistogramPersistent state write duration; BoC serialization.
ton_node_db_restore_merkle_update_secondshistogramMerkle update duration during chain restore.
ton_node_db_calc_merkle_update_secondshistogramMerkle update calculation duration.

block

Block parsing and size metrics. It exposes 3 metrics, all of which are histograms.
MetricTypeDescription
ton_node_block_accounts_parsing_secondshistogramTime to parse accounts from a block.
ton_node_block_parsed_accountshistogramNumber of accounts parsed per block.
ton_node_block_size_byteshistogramBlock size in bytes.