Coder Social home page Coder Social logo

blockassets / bw_exporter Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 2.0 35 KB

Prometheus.io exporter for BW L21 scrypt miner

Home Page: https://www.hyperbitshop.io/

License: MIT License

Makefile 1.53% Go 89.90% Shell 8.57%
prometheus prometheus-exporter miners scrypt golang cgminer

bw_exporter's Introduction

Build Status

BW Exporter

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.

Usage (defaults):

./bw_exporter -port 4030 -cghost 127.0.0.1 -cgport 4028 -cgtimeout 5s

Setup

Install dep and the dependencies...

make dep

Build binary for arm

make arm

Install onto miner

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"

Test install on miner

Open your browser to http://MINER_IP:4030/metrics

Prometheus configuration

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.

bw_exporter's People

Contributors

delatbabel avatar lookfirst avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.