A Prometheus Exporter for a Bitcoin Fullnode running with bitcoind
  • Go 99.5%
  • Dockerfile 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-05-06 19:37:46 +02:00
.github feat: add internal metric + add goreleaser 2024-06-17 20:12:24 +02:00
config feat: implement cookie auth 2025-05-06 19:04:00 +02:00
fetcher fix: handle cookie updates 2025-05-06 19:37:46 +02:00
prometheus feat: add total network metrics 2024-06-19 22:51:50 +02:00
util feat: implement cookie auth 2025-05-06 19:04:00 +02:00
zmq fix: make gosec happy 2024-06-18 00:21:26 +02:00
.goreleaser.yml feat: add internal metric + add goreleaser 2024-06-17 20:12:24 +02:00
Dockerfile feat: add internal metric + add goreleaser 2024-06-17 20:12:24 +02:00
go.mod docs: update readme 2024-06-18 00:34:56 +02:00
go.sum feat: add transaction tracker 2024-06-17 23:38:30 +02:00
LICENSE Initial commit 2024-06-17 00:23:23 +02:00
main.go feat: add transaction tracker 2024-06-17 23:38:30 +02:00
README.md feat: implement cookie auth 2025-05-06 19:04:00 +02:00
version.go feat: make log-level customizable 2024-06-17 20:31:52 +02:00

Bitcoind Prometheus Exporter ₿

Prometheus metrics for a bitcoin node made simple

Buid License

🔍 About the project

A Prometheus Exporter, which provides a deep insight into a Bitcoin full node.

⚙️ Configuration

This tool is configured via environment variables. Some environment variables are required and some activate additional functionalities.

Variable Description Required Default
RPC_ADDRESS The RPC address for the Bitcoin full node, e.g. http://127.0.0.1:8332
RPC_USER The user name that was defined in the Bitcoin Node configuration
RPC_PASS The password that was set in the Bitcoin Node configuration
RPC_COOKIE_FILE The path to the cookie file
ZMQ_ADDRESS The address to the ZeroMQ interface of the Bitcoin Fullnode. This variable is required to determine the transcation rates. e.g. 127.0.0.1:28333
FETCH_INTERVAL The interval at which the metrics are to be recalculated. 10
METRIC_PORT The port via which the metrics are provided. 3000
LOG_LEVEL The log level for the service info

Please note that either RPC_USER and RPC_PASS or RPC_COOKIE_FILE must be set.

💻 Grafana Dashboard

The official Grafana dashboard can be found here: https://grafana.com/grafana/dashboards/21351

🐳 Run with Docker

Docker-CLI

docker run -d --name bitcoind_exporter \
  -e RPC_ADDRESS=http://127.0.0.1:8332 \
  -e RPC_USER=mempool \
  -e RPC_PASS=mempool \
  -e ZMQ_ADDRESS=127.0.0.1:28333 \
  -v /path/to/cookie/.cookie:/.cookie:ro \
   ghcr.io/primexz/bitcoind-exporter:latest

🚀 Docker-Compose

vim docker-compose.yml
version: "3.8"
services:
  bitcoind_exporter:
    image: ghcr.io/primexz/bitcoind-exporter:latest
    environment:
      - RPC_ADDRESS=http://127.0.0.1:8332
      - RPC_USER=mempool
      - RPC_PASS=mempool
      - ZMQ_ADDRESS=127.0.0.1:28333
    # Optional, only necessary if Cookie-Auth is to be used
    volumes:
      - /path/to/cookie/.cookie:/.cookie:ro
    restart: always
docker-compose up -d