Skip to content

The Bitcoin node metrics exporter for Prometheus built on the Rust Bitcoin Community's crate for Bitcoin JSON-RPC.

License

Notifications You must be signed in to change notification settings

AltaModaTech/btcnode-metrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

btcnode-metrics

The Bitcoin node metrics exporter for Prometheus based on Rust Bitcoin Community's crate for Bitcoin JSON-RPC support, corepc-client. Why is that important? Other exporters use deprecated/archived crates like rust-bitcoincore-rpc or rust-bitcoind-json-rpc. Using this exporter helps you keep up to date with the Rust Bitcoin Community's work.

Install & Configure

Install

cargo install btcnode-metrics

Configure

After installing btcnode-metrics,

  • Copy config.toml.example to config.local.toml.
  • Edit config.local.toml
    • the node section is for the Bitcoin node to monitor
    • the server section is for exposing the endpoint for Prometheus

Usage

To run:

cargo run -- -c ./config.local.toml

For additional output, set the [logging level(https://docs.rs/env_logger/latest/env_logger/)]:

RUST_LOG=info cargo run -- -c ./config.local.toml

Additional Details

About corepc-client

The Rust Bitcoin Community's corepc-client crate replaces the previous the Bitcoin node RPC crates that were archived on 11/25/2025:

Code structure

This repository's code is separated into:

  • btcnode-metrics implements the API for Prometheus to call for gathering metrics.
  • btcnode_metrics_gatherer module gathers metrics from the Bitcoin node and transforms them into Prometheus format.

About

The Bitcoin node metrics exporter for Prometheus built on the Rust Bitcoin Community's crate for Bitcoin JSON-RPC.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages