项目作者: HON95

项目描述 :
A Prometheus exporter for Ethermine, ETC Ethermine, Ethpool, Zcash Flypool, Ravencoin Flypool and BEAM Flypool
高级语言: Go
项目地址: git://github.com/HON95/prometheus-ethermine-exporter.git
创建时间: 2021-04-27T23:02:56Z
项目社区:https://github.com/HON95/prometheus-ethermine-exporter

开源协议:GNU General Public License v3.0

下载


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:

  1. services:
  2. ethermine-exporter:
  3. image: hon95/prometheus-ethermine-exporter:1
  4. #command:
  5. # - '--endpoint=:8080'
  6. # - '--debug'
  7. user: 1000:1000
  8. environment:
  9. - TZ=Europe/Oslo
  10. ports:
  11. - "8080:8080/tcp"

Prometheus

Example prometheus.yml:

  1. global:
  2. scrape_interval: 15s
  3. scrape_timeout: 10s
  4. scrape_configs:
  5. - job_name: ethermine-ethermine-pool
  6. # Limit due to API rate restriction
  7. scrape_interval: 5m
  8. metrics_path: /pool
  9. params:
  10. pool: [ethermine]
  11. static_configs:
  12. - targets:
  13. # TODO Point this to your exporter
  14. - ethermine-exporter:8080
  15. - job_name: ethermine-ethpool-pool
  16. # Limit due to API rate restriction
  17. scrape_interval: 5m
  18. metrics_path: /pool
  19. params:
  20. pool: [ethpool]
  21. static_configs:
  22. - targets:
  23. # TODO Point this to your exporter
  24. - ethermine-exporter:8080
  25. - job_name: ethermine-ethermine-miner
  26. # Limit due to API rate restriction
  27. scrape_interval: 5m
  28. metrics_path: /miner
  29. params:
  30. pool: [ethermine]
  31. static_configs:
  32. - targets:
  33. # TODO List your ETH addresses here
  34. - F6403152cAd46F2224046C9B9F523d690E41Bffd
  35. relabel_configs:
  36. - source_labels: [__address__]
  37. target_label: __param_target
  38. - source_labels: [__param_target]
  39. target_label: instance
  40. - target_label: __address__
  41. # TODO Point this to your exporter
  42. 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).