Coder Social home page Coder Social logo

zabbix-whatsminer's Introduction

zabbix-whatsminer

An external script and template for getting Whatsminer M3 metrics into Zabbix.

Script is using Cgminer API. https://github.com/tsileo/pycgminer

I'm using Whatsminer M3 with low-power firmware, so all triggers setup for lower hashrate (~9 Th)

Supported metrics

  • Fan In & Out
  • GH/S (RT 5s)
  • GH/S (Average)
  • Tempreture
  • Elapsed time
  • Uptime
  • ICMP ping

Supported triggers

  • Temp > 85 --> High temp on {HOST.NAME}
  • GH/s (Average) < 8.5 TH --> Low average hashrate ({ITEM.LASTVALUE}) on {HOST.NAME}
  • ICMP ping --> {HOST.NAME} is unavailable by ICMP
  • Uptime <= 0 --> {HOST.NAME} has just been restarted
  • Elapsed <= 180 --> {HOST.NAME} Cgminer has just been restarted

Metrics from cgminer

What you can take from summary (if you want!):

"SUMMARY": [ { "Accepted": 42328, "Best Share": 258988397, "Device Hardware%": 0.0007, "Device Rejected%": 0.038, "Difficulty Accepted": 346972160.0, "Difficulty Rejected": 131072.0, "Difficulty Stale": 0.0, "Discarded": 1163316, "Elapsed": 175700, "Fan Speed In": 2700, "Fan Speed Out": 2730, "Fan set_get_err_turnoff_threshold": 15, "Found Blocks": 0, "Get Failures": 0, "Getworks": 6281, "Hardware Errors": 2379, "Last getwork": 1549868976, "Local Work": 740990848, "MHS 15m": 8344447.22, "MHS 1m": 8566004.91, "MHS 5m": 8390624.45, "MHS 5s": 8703172.47, "MHS av": 8431652.53, "Network Blocks": 306, "Pool Rejected%": 0.0378, "Pool Stale%": 0.0, "Rejected": 16, "Remote Failures": 0, "Stale": 0, "Temperature": 79.5, "Total MH": 1481442755346.0, "Uptime": 180198, "Utility": 14.45, "Voltage": 20, "Work Utility": 117789.06, "fan[0] set_get_err_turnoff_count": 0, "fan[1] set_get_err_turnoff_count": 0, "fan_stop_count": 0, "fan_stop_turnoff_threshold": 5, "fan_stop_turnoff_times": 0, "freq_avg": 471, "freq_max": 485, "freq_min": 455 }'''

Requirements

  • Python 2 or 3
  • Python Requests
  • Zabbix 4.0

Install

  • Download whatsminer-zbx-chk and whatsminer_zbx_template.xml
  • Put whatsminer-zbx-chk into ExternalScript location (You will find it in zabbix_server configuration)
  • Make whatsminer-zbx-chk executable (chmod 755 whatsminer-zbx-chk)
  • Import whatsminer-zbx-template into zabbix
  • Add Whatsminer as Zabbix Host.
  • Link template to your ASICs

Debug

You cant test whatsminer-zbx-chk from CLI

./whatsminer-zbx-chk %HOST% %metrics%

Something like this:

./whatsminer-zbx-chk M3_hostname 'MHS av'

Donate

If you want :)

BTC: 1KMNPXdZ7yFMgQvBUvv1koz3yLBfHCgZv2

Thank you!

zabbix-whatsminer's People

Contributors

kostyainmadness avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

zhanghuijiang

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.