Giter Club home page Giter Club logo

mining-prometheus-collector's Introduction

mining-prometheus-collector

Collects mining status data from detected miners for prometheus ingestion. Each scrape translates to a call to the miner's API, so the data received will be live (not cached).

Some of the supported miners don't have great (or any) API documentation so in those cases I may have had to guess what specific parts are to "standardize" them between miners. I haven't come up with a properly "standardized" set of metrics yet; I will do once several miners are integrated.

NOTE This was designed to be run inside a Minerstat MSOS instance, so IPs/ports, etc, are hard-coded. I might be changing this to be more independent in the near future (1/2024).

Supported miners

  • t-rex
  • lolminer

I will add to these as I support new miners in my mining rig. Dual mining is not supported (yet).

Installation

Bootstrap it onto a new box with:

curl -L https://raw.githubusercontent.com/gdhaworth/mining-prometheus-collector/main/scripts/bootstrap.sh | bash -

The bootstrap and installation scripts assume you have the packages installed and environment of a Minerstat MSOS installation. That means:

  • sudo does not require a password
  • git is installed
  • systemd is present

The bootstrap/installation will set up pyenv for itself and selfishly install packages without a virtualenv (because this is on a MSOS box that shouldn't care). If I extend this project beyond Minerstat I will add ways to make this more portable (can turn parts off, etc).

NOTE This is an update from code I had written 3 years ago in a private repo which originally supported both Linux and Windows. I have only been using Linux since updating and starting this repository, but it shouldn't take much effort to get it running on Windows.

Implementation notes

  • Metrics are created on each collect() because I don't want to show stale data; I'm assuming it's being scraped often enough that it will catch metrics that show up from time to time (like if the miner API shows a value only sometimes). This is a side effect from not having complete documentation on the APIs from some miners so I don't know if they will consistently return the same set of data each time.

mining-prometheus-collector's People

Contributors

gdhaworth avatar

Watchers

 avatar Kostas Georgiou 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.