A small service to expose miner stats from NH to Prometheus.
You need node 12, start with npm i and then node app.js.
For setting the NH api keys you need to export NH_API_KEY="key" and export NH_API_SECRET="secret" before the service start.
You can reach the metrics on localhost:3000/metrics.
For docker you can run;
docker run -e NH_API_KEY="key" -e NH_API_SECRET="secret" -e NH_API_ORG_ID="orgId" ghcr.io/tg44/nicehash-exporter
For docker compose;
version: '3.1'
services:
nicehash-exporter:
image: ghcr.io/tg44/nicehash-exporter
restart: unless-stopped
environment:
- NH_API_KEY=key
- NH_API_SECRET=secret
- NH_API_ORG_ID=orgId
- PORT=3000 #optionally you can override the port inside for dev reasons, default is 3000
- REFRESH_RATE_SECONDS=30 #optionally you can override the api poll rate, default is 30
- NODDE_METRICS_PREFIX=nh_ #optionally you can override the node system/app metrics prefix, default is empty
- NH_METRICS_PREFIX=nh_ #optionally you can override the NH metrics prefix, default is nh_
- NH_RATES=BTCUSDC,BTCEURS #optionally you can override the exported rates in a comma separated list of rates
ports:
- 3000:3000
PRs are always welcome!
ETH: 0x58f2198cda7d6cac855dd3fa29abe67e98adb2cd
But, if you want to support my work in any way just send me an email ;) (You can find my email address in the git commit history.)
Content type
Image
Digest
sha256:013778c83…
Size
32.2 MB
Last updated
over 3 years ago
docker pull tg44/nicehash-exporter