Skip to content

mmilata/bitcoin-prometheus-exporter

 
 

Repository files navigation

Bitcoin Core Prometheus Exporter

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.md, updated to remove the need for the bitcoin-cli binary, packaged into a Docker image, and expanded to export additional metrics.

Run the container

docker run \
    --name=bitcoin-exporter \
    -p 8443:8443 \
    -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.5.0

Basic Testing

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.

About

Prometheus exporter for Bitcoin Core nodes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 95.2%
  • Dockerfile 4.8%