Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kynesys.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Metrics Reference

A Demos node ships a built-in Prometheus exporter. When enabled, a dedicated HTTP server serves the standard GET /metrics endpoint (and a simple /health / /healthz returning {"status":"ok"}) on its own port, separate from the RPC server. Every metric name is prefixed with demos_. In addition to the metrics below, the exporter also emits the default prom-client process/Node.js metrics (memory, CPU, event loop, GC), which are also demos_-prefixed.

Enabling

Metrics are controlled by the metrics config block:
Config keyDefaultDescription
metrics.enabledtrueMaster switch for the exporter.
metrics.port9090Port the metrics HTTP server binds.
metrics.host0.0.0.0Bind address.
See Node Configuration for how these map to environment variables and the Docker Compose / Grafana stack that scrapes this endpoint. Collected gauges are refreshed on a 2.5s interval; counters are incremented at their call sites.

Core metrics

System

MetricTypeLabels
demos_node_uptime_secondsgauge
demos_node_infogaugeversion, node_id

Consensus and chain

MetricTypeLabels / Buckets
demos_consensus_rounds_totalcounter
demos_consensus_round_duration_secondshistogrambuckets: 0.1, 0.5, 1, 2, 5, 10, 30
demos_block_heightgauge
demos_mempool_sizegauge

Network and peers

MetricTypeLabels / Buckets
demos_peers_connectedgauge
demos_peers_totalgauge
demos_messages_sent_totalcountertype
demos_messages_received_totalcountertype
demos_peer_latency_secondshistogrambuckets: 0.01, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5 (aggregated, no per-peer label)

Transactions

MetricTypeLabels / Buckets
demos_transactions_totalcountertype, status
demos_transactions_failed_totalcountertype, reason
demos_tpsgauge
demos_transaction_processing_secondshistogramtype; buckets: 0.001, 0.005, 0.01, 0.05, 0.1, 0.5, 1, 5

API

MetricTypeLabels / Buckets
demos_api_requests_totalcountermethod, endpoint, status_code
demos_api_request_duration_secondshistogrammethod, endpoint; buckets: 0.001, 0.005, 0.01, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10
demos_api_errors_totalcountermethod, endpoint, error_code

IPFS and GCR

MetricTypeLabels
demos_ipfs_pins_totalgauge
demos_ipfs_storage_bytesgauge
demos_ipfs_peersgauge
demos_ipfs_operations_totalcounteroperation
demos_gcr_accounts_totalgauge
demos_gcr_total_supplygauge

Observability metrics

These mirror the subsystem registry and boot tracker that also back the /health endpoint.
MetricTypeLabelsNotes
demos_subsystem_upgaugesubsystem1 when status is ready/running, else 0.
demos_subsystem_skippedgaugesubsystem1 when intentionally skipped.
demos_subsystem_uptime_secondsgaugesubsystemSeconds since the last state transition.
demos_subsystem_restart_totalcountersubsystemTransitions back to running after failed/ready.
demos_subsystem_error_totalcountersubsystemErrors recorded via subsystemError().
demos_boot_step_statusgaugestepEnum: 0=pending, 1=running, 2=ready, 3=failed, 4=skipped.
demos_boot_completegauge1 when all boot steps are ready/skipped.
demos_dormant_modegauge1 when the node booted with no peers.
demos_main_loop_heartbeat_secondsgaugeSeconds since the last main-loop tick.
demos_main_loop_iterations_totalcounterMain-loop iterations since boot.
demos_port_driftgaugesubsystemActual minus requested port (0 normally).
demos_uncaught_exception_totalcountersourceuncaughtException handler invocations.
demos_unhandled_rejection_totalcountersourceunhandledRejection handler invocations.

Collector metrics

Sampled live from node state and the host on each collection tick.

Block detail

MetricTypeLabels
demos_last_block_tx_countgauge
demos_seconds_since_last_blockgauge
demos_last_block_timestampgauge

Host system

MetricTypeLabels
demos_system_cpu_usage_percentgauge
demos_system_memory_used_bytesgauge
demos_system_memory_total_bytesgauge
demos_system_memory_usage_percentgauge
demos_system_load_average_1mgauge
demos_system_load_average_5mgauge
demos_system_load_average_15mgauge

Network I/O (per interface)

MetricTypeLabels
demos_system_network_rx_bytes_totalgaugeinterface
demos_system_network_tx_bytes_totalgaugeinterface
demos_system_network_rx_rate_bytesgaugeinterface
demos_system_network_tx_rate_bytesgaugeinterface

Service and peer health

MetricTypeLabels
demos_service_docker_container_upgaugecontainer
demos_service_port_opengaugeport, service
demos_peer_online_countgauge
demos_peer_offline_countgauge
demos_peer_infogaugepeer_id, url, status (capped at 20 peers)
demos_node_http_healthgaugeendpoint (1=responding)
demos_node_http_response_time_msgaugeendpoint
demos_node_metadatagaugeversion, version_name, identity (always 1)

Sample scrape

# HELP demos_block_height Current block height
# TYPE demos_block_height gauge
demos_block_height 184213

# HELP demos_subsystem_up Whether the named subsystem is in 'ready' or 'running' state (1) or not (0)
# TYPE demos_subsystem_up gauge
demos_subsystem_up{subsystem="chain"} 1
demos_subsystem_up{subsystem="rpc"} 1
demos_subsystem_up{subsystem="mcp"} 0

# HELP demos_boot_complete 1 when every registered boot step is in ready/skipped, 0 otherwise
# TYPE demos_boot_complete gauge
demos_boot_complete 1