Giter Site home page Giter Site logo

miner_exporter's Introduction

miner_exporter

Prometheus exporter for the Helium miner (validator). Using prometheus_client, this code exposes metrics from the helium miner to a prometheus compatible server.

This is only the exporter, which still requires a prometheus server for data and grafana for the dashboard. Prometheus and Grafana servers can run on an external machine, the same machine as the miner, or possibly using a cloud service. The helium_miner_grafana_dashboard can be imported to Grafana.

Note port 9825 is the 'reserved' port for this specific exporter. Feel free to use whatever you like, of course, but you won't be able to dial 9VAL on your phone.

Running via Docker

Using the docker file, you can run this with Docker or docker-compose! Both of these expose Prometheus on 9825, feel free to choose your own port. The images are hosted on both GHCR and Dockerhub.

Docker client

docker run -p 9825:9825 --name miner_exporter -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/tedder/miner_exporter:latest

Docker-Compose

Using your existing docker-compose file, add the section for the exporter (below). When you're done, run docker-compose up -d as usual. That's it!

version: "3"
services:
  validator:
    image: quay.io/team-helium/validator:latest-val-amd64
    container_name: validator
...
  miner_exporter:
    image: ghcr.io/tedder/miner_exporter:latest
    container_name: miner_exporter
    volumes:
    - /var/run/docker.sock:/var/run/docker.sock
    ports:
    - "9825:9825"

Running locally

On the miner machine:

install python3, python3-venv

pip install prometheus_client

Details on the libraries:

Then install the service in a home directory:

sudo make install

Then install the systemd unit file:

sudo make install-service

Then enable and start the service:

sudo systemctl enable validator_exporter
sudo systemctl start validator_exporter

Configuration

The following parameters can be used to modify configuration and behavior of the exporter:

UPDATE_PERIOD  # seconds between scrapes, int
VALIDATOR_JSONRPC_ADDRESS # address to call jsonrpc methods, default: http://localhost:4467
MINER_EXPORTER_PORT # port which miner_exporter listens on, default: 9825
COLLECT_SYSTEM_USAGE # boolean, default: False
ALL_HBBFT # collect HBBFT performance metrics on all validators, not just this validator, default: False
ALL_PENALTIES # collect penalty and heartbeat metrics on all stakes validators, default: False

miner_exporter's People

Contributors

artifactstaking avatar gradoj avatar ke6jjj avatar kellybyrd avatar paulvmo avatar tedder 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.