Prometheus.io exporter for the cgminer binary that is shipped with the BW.com L21 miner. It currently exports a limited set of data. PR's welcome!
Thanks to HyperBitShop.io for sponsoring this project.
./bw_exporter -port 4030 -cghost 127.0.0.1 -cgport 4028 -cgtimeout 5s
Install dep and the dependencies...
make dep
make arm
The releases tab has master
binaries cross compiled for ARM suitable for running on the miner. These are built automatically on Travis.
Download the latest release and copy the bw_exporter
binary to /usr/bin
chmod ugo+x bw_exporter
scp bw_exporter root@MINER_IP:/usr/bin
Create /etc/systemd/system/bw_exporter.service
ssh root@MINER_IP "echo '
[Unit]
Description=bw_exporter
After=init.service
[Service]
Type=simple
ExecStart=/usr/bin/bw_exporter
Restart=always
RestartSec=4s
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target
' > /etc/systemd/system/bw_exporter.service"
Enable the service:
ssh root@MINER_IP "systemctl enable bw_exporter; systemctl start bw_exporter"
Open your browser to http://MINER_IP:4030/metrics
prometheus.yml
:
scrape_configs:
- job_name: 'bw_exporter'
file_sd_configs:
- files:
- 'bw_exporter.json'
bw_exporter.json
:
[{
"targets": ["MINER_IP:4030"]
}]
The json configuration is reloaded every time it is modified.