A Prometheus exporter for Bitcoin Core nodes written in python and packaged for running as a container.
A rudimentary Grafana dashboard is available in the dashboard/bitcoin-grafana.json
file.
The main script is a modified version of bitcoin-monitor.py
, updated to remove the need for the
bitcoin-cli
binary, packaged into a Docker image, and expanded to export additional metrics.
docker run \
--name=bitcoin-exporter \
-p 9332:9332 \
-e BITCOIN_RPC_HOST=bitcoin-node \
-e BITCOIN_RPC_USER=alice \
-e BITCOIN_RPC_PASSWORD=DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E= \
jvstein/bitcoin-prometheus-exporter:v0.7.0
There's a docker-compose.yml
file in the repository that references a test bitcoin node. To
test changes to the exporter in docker, run the following commands.
docker-compose down
docker-compose build
docker-compose up
If you see a lot of ConnectionRefusedError
errors, run chmod og+r test-bitcoin.conf
.
See the CHANGELOG.md
file for changes.