Skip to content

jvstein/bitcoin-prometheus-exporter

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.py, 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 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

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.

Change Log

See the CHANGELOG.md file for changes.

Other Exporters