Skip to content

HON95/prometheus-ethermine-exporter

Repository files navigation

Prometheus Ethermine Exporter

GitHub release CI FOSSA status Docker pulls

Dashboard

An exporter for the following cryptocurrency mining pools:

The exporter uses the unified API structure for all the listed pools, so support for arbitrary other pools will not be added.

Usage

Exporter (Docker)

Example docker-compose.yml:

services:
  ethermine-exporter:
    image: hon95/prometheus-ethermine-exporter:1
    #command:
    #  - '--endpoint=:8080'
    #  - '--debug'
    user: 1000:1000
    environment:
      - TZ=Europe/Oslo
    ports:
      - "8080:8080/tcp"

Prometheus

Example prometheus.yml:

global:
    scrape_interval: 15s
    scrape_timeout: 10s

scrape_configs:
  - job_name: ethermine-ethermine-pool
    # Limit due to API rate restriction
    scrape_interval: 5m
    metrics_path: /pool
    params:
      pool: [ethermine]
    static_configs:
      - targets:
          # TODO Point this to your exporter
          - ethermine-exporter:8080

  - job_name: ethermine-ethpool-pool
    # Limit due to API rate restriction
    scrape_interval: 5m
    metrics_path: /pool
    params:
      pool: [ethpool]
    static_configs:
      - targets:
          # TODO Point this to your exporter
          - ethermine-exporter:8080

  - job_name: ethermine-ethermine-miner
    # Limit due to API rate restriction
    scrape_interval: 5m
    metrics_path: /miner
    params:
      pool: [ethermine]
    static_configs:
      - targets:
          # TODO List your ETH addresses here
          - F6403152cAd46F2224046C9B9F523d690E41Bffd
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        # TODO Point this to your exporter
        replacement: ethermine-exporter:8080

Replace ethermine-exporter with the IP address or hostname of the exporter (or the machine it's running on if publishing the port as in the example above). Set targets to the address(es) to monitor.

Note: Only one pool per job is supported, so if you want to scrape multiple pools, you need to create jobs for each pool.

Grafana

Example dashboards:

Configuration

Docker Image Versions

Use 1 for stable v1.Y.Z releases and latest for bleeding/unstable releases.

Metrics

See the pool example output and the miner example output (I'm too lazy to create a pretty table right now).

Note: All metrics start with ethermine (due to the name of this exporter), regardless of the actual pool the petric is for (which is provided as a label).

Development

  • Build: go build -o prometheus-ethermine-exporter cmd/prometheus-ethermine-exporter/*.go
  • Lint: golint ./...

License

GNU General Public License version 3 (GPLv3).

About

A Prometheus exporter for Ethermine, ETC Ethermine, Ethpool, Zcash Flypool, Ravencoin Flypool and BEAM Flypool

Topics

Resources

License

Stars

Watchers

Forks