https://github.com/primexz/bitcoind-exporter
A Prometheus Exporter for a Bitcoin Fullnode running with bitcoind
https://github.com/primexz/bitcoind-exporter
bitcoin bitcoin-core bitcoind docker go golang prometheus prometheus-exporter
Last synced: 9 months ago
JSON representation
A Prometheus Exporter for a Bitcoin Fullnode running with bitcoind
- Host: GitHub
- URL: https://github.com/primexz/bitcoind-exporter
- Owner: Primexz
- License: gpl-3.0
- Created: 2024-06-16T22:23:23.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-05-06T17:37:54.000Z (about 1 year ago)
- Last Synced: 2025-07-10T23:53:57.874Z (11 months ago)
- Topics: bitcoin, bitcoin-core, bitcoind, docker, go, golang, prometheus, prometheus-exporter
- Language: Go
- Homepage:
- Size: 38.1 KB
- Stars: 6
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bitcoind Prometheus Exporter ₿
**Prometheus metrics for a bitcoin node made simple**


## 🔍 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
```bash
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
```bash
vim docker-compose.yml
```
```yaml
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
```
```bash
docker-compose up -d
```