Bitcoin node metrics exporter for Prometheus
2.4K
Bitcoin node metrics exporter for Prometheus.
Example metrics data and json metrics.
Tested with bitcoin RPC clients:
0.18.10.20.00.2.1Put in your docker-compose.yml
exporter:
image: 4ops/bitcoin-exporter:stable
ports:
- '9133:9133'
environment:
BITCOIN_RPCUSER: 'some_eusername'
BITCOIN_RPCPASSWORD: 'sEcReT_P@sSsW0Rd'
BITCOIN_RPCHOST: 'bitcoin.mycompany.org'
BITCOIN_RPCPORT: '8332'
See full example in docker directory.
Example spec for bitcoin-exporter container:
- env:
- name: BITCOIN_RPCUSER
valueFrom:
secretKeyRef:
name: bitcoin-credentials
key: BITCOIN_RPCUSER
- name: BITCOIN_RPCPASSWORD
valueFrom:
secretKeyRef:
name: bitcoin-credentials
key: BITCOIN_RPCPASSWORD
- name: BITCOIN_RPCHOST
value: bitcoin.mycompany.org
- name: BITCOIN_RPCPORT
value: '18332'
image: 4ops/bitcoin-exporter:stable
readinessProbe:
httpGet:
path: /metrics
port: http-metrics
timeoutSeconds: 3
initialDelaySeconds: 5
periodSeconds: 10
name: metrics-exporter
ports:
- containerPort: 9133
name: http-metrics
protocol: TCP
resources:
requests:
cpu: 100m
memory: 200Mi
limits:
cpu: 100m
memory: 200Mi
securityContext:
allowPrivilegeEscalation: false
runAsGroup: 1000
runAsUser: 1000
procMount: Default
See full example in kubernetes directory.
Bitcoin exporter reads environments variables at startup. No more config files are required.
BITCOIN_RPCUSER, BITCOIN_RPCPASSWORD - bitcoin node RPC credentials.BITCOIN_RPCHOST - hostname or IP address of bitcoin node.BITCOIN_RPCPORT - port number for RPC connections.BITCOIN_RPCSCHEME - http or https. Default: httpMETRICS_URL - path for prometheus scrapes. Default: /metricsMETRICS_PORT - metrics server port number. Default: 9133METRICS_PREFIX - prefix for naming metrics. Default: bitcoin_LOG_LEVEL - logging verbosity level. Maybe on of: debug, info, notice, warn, warning, error. Silent by default.LOG_TIME - if has any non-empty value, prints timestamp in ISO format.Content type
Image
Digest
Size
27.1 MB
Last updated
about 7 years ago
docker pull 4ops/bitcoin-exporter