From 989c26de60e21d5a4c2d19a494911659ba5d37a0 Mon Sep 17 00:00:00 2001 From: 3err0 Date: Sun, 27 Feb 2022 14:18:50 +0800 Subject: [PATCH] Added Hashrate chain element --- FarmGetstats | 42 +- Miner | 74 +- README.md | 12 +- rebootasic | 66 +- template-aixin-a1.xml | 578 +++--- template-antminer-l3.xml | 3790 ++++++++++++++++++------------------ template-antminer-s17.xml | 1144 +++++------ template-antminer-s19.yaml | 73 +- template-antminer-s9.xml | 1694 ++++++++-------- template-antminer-t17.xml | 99 +- template-cheetah-f1.xml | 614 +++--- template-farm.xml | 2746 +++++++++++++------------- template-whatsminer.yaml | 350 ++-- valuemaps-asic.xml | 96 +- zabbix_server.conf | 86 +- 15 files changed, 5815 insertions(+), 5649 deletions(-) diff --git a/FarmGetstats b/FarmGetstats index aa9f518..a12a008 100755 --- a/FarmGetstats +++ b/FarmGetstats @@ -1,21 +1,21 @@ -#!/bin/bash - -up=`/usr/bin/fping -c1 -t300 $1 &> /dev/null ; echo $?` - -if [ $up = 0 ]; then - -set -o errexit -set -o nounset - -ADDRESS=$1 -PORT=$2 - -stats_raw=`echo '{"id":0,"jsonrpc":"2.0","method":"miner_getstat1"}' | nc $ADDRESS $PORT | tr -d '\0\n'` -stats_raw=$(sed 's/}{/\},{/' <<< "$stats_raw") - -#STATS=$(jq '.STATS' <<< "$stats_raw") - -#echo $STATS -echo $stats_raw - -fi +#!/bin/bash + +up=`/usr/bin/fping -c1 -t300 $1 &> /dev/null ; echo $?` + +if [ $up = 0 ]; then + +set -o errexit +set -o nounset + +ADDRESS=$1 +PORT=$2 + +stats_raw=`echo '{"id":0,"jsonrpc":"2.0","method":"miner_getstat1"}' | nc $ADDRESS $PORT | tr -d '\0\n'` +stats_raw=$(sed 's/}{/\},{/' <<< "$stats_raw") + +#STATS=$(jq '.STATS' <<< "$stats_raw") + +#echo $STATS +echo $stats_raw + +fi diff --git a/Miner b/Miner index a3f9c40..d4f30f7 100644 --- a/Miner +++ b/Miner @@ -1,38 +1,38 @@ -#!/usr/bin/env python2.7 -import socket -import json -import requests -import sys, os - -command = sys.argv[1] -ip = sys.argv[2] -port = 4028 - -def stats(ip): - sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - sock.settimeout(1) - try: - sock.connect((ip, int(port))) - - sock.send(json.dumps({'command': command})) - - resp = '' - while 1: - buf = sock.recv(4096).decode("utf-8") - if buf: - resp += buf - else: - break - - res = command.upper() - - result = json.loads(resp[:-1].replace('}{', '},{')) - result = json.dumps(result[res]) - print result - except Exception as e: - print("Error " + str(e)) - finally: - sock.shutdown(socket.SHUT_RDWR) - sock.close() - +#!/usr/bin/env python2.7 +import socket +import json +import requests +import sys, os + +command = sys.argv[1] +ip = sys.argv[2] +port = 4028 + +def stats(ip): + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.settimeout(1) + try: + sock.connect((ip, int(port))) + + sock.send(json.dumps({'command': command})) + + resp = '' + while 1: + buf = sock.recv(4096).decode("utf-8") + if buf: + resp += buf + else: + break + + res = command.upper() + + result = json.loads(resp[:-1].replace('}{', '},{')) + result = json.dumps(result[res]) + print result + except Exception as e: + print("Error " + str(e)) + finally: + sock.shutdown(socket.SHUT_RDWR) + sock.close() + stats(ip) \ No newline at end of file diff --git a/README.md b/README.md index 85aef6c..6a6ba9f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# External script and tepmlates for Getting Antminer and GPU Claymore Farm metrics into Zabbix - -**#Antminer scripts (Antminer S9, L3 ...)** -* Miner - Feech asic JSON information -* rebootasic - Reboot asic wihtout ssh -* FarmGetstats - Get Claymor GPU Farm json information +# External script and tepmlates for Getting Antminer and GPU Claymore Farm metrics into Zabbix + +**#Antminer scripts (Antminer S9, L3 ...)** +* Miner - Feech asic JSON information +* rebootasic - Reboot asic wihtout ssh +* FarmGetstats - Get Claymor GPU Farm json information diff --git a/rebootasic b/rebootasic index 7058dfc..11b1a58 100755 --- a/rebootasic +++ b/rebootasic @@ -1,34 +1,34 @@ -#!/usr/bin/env python - -import socket, httplib, httplib2 -import sys - -URL = "http://"+sys.argv[1]+"/cgi-bin/reboot.cgi" -USER = sys.argv[2] -USER_DEFAULT = "root" -PASS = sys.argv[3] -PASS_DEFAULT = "root" - -h = httplib2.Http(cache=None, timeout=0.5) -h.add_credentials(USER, PASS) - -try: - response, content = h.request(URL, "GET", headers={'cache-control':'no-cache'}) - if response.status==401: - retry = httplib2.Http(cache=None, timeout=0.5) - retry.add_credentials(USER_DEFAULT, PASS_DEFAULT) - res, con = retry.request(URL, "GET", headers={'cache-control':'no-cache'}) - if res.status==500: - print "Change pass, Installed default password" - print "OK" - elif res.status==401: - print "Unauthorized, Wrong PASSWORD" - if response.status==500: - print "OK" - elif response.status==404: - URL = "http://"+sys.argv[1]+"/api/reboot" - response, content = h.request(URL, "GET", headers={'cache-control':'no-cache'}) -except httplib2.ServerNotFoundError: - print "HOST is Down" -except (socket.timeout, socket.error, httplib2.HttpLib2Error, httplib.ResponseNotReady): +#!/usr/bin/env python + +import socket, httplib, httplib2 +import sys + +URL = "http://"+sys.argv[1]+"/cgi-bin/reboot.cgi" +USER = sys.argv[2] +USER_DEFAULT = "root" +PASS = sys.argv[3] +PASS_DEFAULT = "root" + +h = httplib2.Http(cache=None, timeout=0.5) +h.add_credentials(USER, PASS) + +try: + response, content = h.request(URL, "GET", headers={'cache-control':'no-cache'}) + if response.status==401: + retry = httplib2.Http(cache=None, timeout=0.5) + retry.add_credentials(USER_DEFAULT, PASS_DEFAULT) + res, con = retry.request(URL, "GET", headers={'cache-control':'no-cache'}) + if res.status==500: + print "Change pass, Installed default password" + print "OK" + elif res.status==401: + print "Unauthorized, Wrong PASSWORD" + if response.status==500: + print "OK" + elif response.status==404: + URL = "http://"+sys.argv[1]+"/api/reboot" + response, content = h.request(URL, "GET", headers={'cache-control':'no-cache'}) +except httplib2.ServerNotFoundError: + print "HOST is Down" +except (socket.timeout, socket.error, httplib2.HttpLib2Error, httplib.ResponseNotReady): print "ERROR" \ No newline at end of file diff --git a/template-aixin-a1.xml b/template-aixin-a1.xml index 0f1b448..d69f367 100644 --- a/template-aixin-a1.xml +++ b/template-aixin-a1.xml @@ -1,289 +1,289 @@ - - - 5.0 - 2020-06-10T13:56:16Z - - - Aixin A1 - - - - - - - - {Aixin A1:AntMinerA1.Hashrate.nodata(15m)}=1 and {Aixin A1:icmpping.last()}=1 - AntMiner A1 Hashrate information not available on {HOST.NAME} - HIGH - YES - - - ({Aixin A1:AntMinerA1.Temp1.min(15m)}>{$TEMP_LOW} or {Aixin A1:AntMinerA1.Temp2.min(15m)}>{$TEMP_LOW} or {Aixin A1:AntMinerA1.Temp3.min(15m)}>{$TEMP_LOW}) and {Aixin A1:icmpping.last()}=1 - RECOVERY_EXPRESSION - ({Aixin A1:AntMinerA1.Temp1.last()}<{$TEMP_LOW} or {Aixin A1:AntMinerA1.Temp2.last()}<{$TEMP_LOW} or {Aixin A1:AntMinerA1.Temp3.last()}<{$TEMP_LOW}) and {Aixin A1:icmpping.last()}=1 - AntMiner A1 High temp on {HOST.NAME} - AVERAGE - YES - - - {Aixin A1:icmpping.last(5m)}=0 and {Aixin A1:net.tcp.service[tcp,,4028].last(5m)}=0 - RECOVERY_EXPRESSION - {Aixin A1:icmpping.last()}=1 or {Aixin A1:net.tcp.service[tcp,,4028].last()}=1 - AntMiner A1 Host DOWN {HOST.NAME} - DISASTER - YES - - - ({Aixin A1:AntMinerA1.Fan1.last(10m)}<{$FAN_LOW} or {Aixin A1:AntMinerA1.Fan2.last(10m)}<{$FAN_LOW}) and {Aixin A1:icmpping.last()}=1 - AntMiner A1 low fan speed {HOST.NAME} - YES - - - ({Aixin A1:AntMinerA1.Hashrate.last()}<{$HASH_LOW} and {Aixin A1:AntMinerA1.Elapsed.last()}>600) and ({Aixin A1:icmpping.last()}=1 and {Aixin A1:net.tcp.service[tcp,,4028].last()}=1) - RECOVERY_EXPRESSION - {Aixin A1:AntMinerA1.Hashrate.last(#3)}>{$HASH_LOW} - AntMiner A1 Low hashrate on {HOST.NAME} - WARNING - YES - - - - - Service state - - - 0 - Down - - - 1 - Up - - - - - + + + 5.0 + 2020-06-10T13:56:16Z + + + Aixin A1 + + + + + + + + {Aixin A1:AntMinerA1.Hashrate.nodata(15m)}=1 and {Aixin A1:icmpping.last()}=1 + AntMiner A1 Hashrate information not available on {HOST.NAME} + HIGH + YES + + + ({Aixin A1:AntMinerA1.Temp1.min(15m)}>{$TEMP_LOW} or {Aixin A1:AntMinerA1.Temp2.min(15m)}>{$TEMP_LOW} or {Aixin A1:AntMinerA1.Temp3.min(15m)}>{$TEMP_LOW}) and {Aixin A1:icmpping.last()}=1 + RECOVERY_EXPRESSION + ({Aixin A1:AntMinerA1.Temp1.last()}<{$TEMP_LOW} or {Aixin A1:AntMinerA1.Temp2.last()}<{$TEMP_LOW} or {Aixin A1:AntMinerA1.Temp3.last()}<{$TEMP_LOW}) and {Aixin A1:icmpping.last()}=1 + AntMiner A1 High temp on {HOST.NAME} + AVERAGE + YES + + + {Aixin A1:icmpping.last(5m)}=0 and {Aixin A1:net.tcp.service[tcp,,4028].last(5m)}=0 + RECOVERY_EXPRESSION + {Aixin A1:icmpping.last()}=1 or {Aixin A1:net.tcp.service[tcp,,4028].last()}=1 + AntMiner A1 Host DOWN {HOST.NAME} + DISASTER + YES + + + ({Aixin A1:AntMinerA1.Fan1.last(10m)}<{$FAN_LOW} or {Aixin A1:AntMinerA1.Fan2.last(10m)}<{$FAN_LOW}) and {Aixin A1:icmpping.last()}=1 + AntMiner A1 low fan speed {HOST.NAME} + YES + + + ({Aixin A1:AntMinerA1.Hashrate.last()}<{$HASH_LOW} and {Aixin A1:AntMinerA1.Elapsed.last()}>600) and ({Aixin A1:icmpping.last()}=1 and {Aixin A1:net.tcp.service[tcp,,4028].last()}=1) + RECOVERY_EXPRESSION + {Aixin A1:AntMinerA1.Hashrate.last(#3)}>{$HASH_LOW} + AntMiner A1 Low hashrate on {HOST.NAME} + WARNING + YES + + + + + Service state + + + 0 + Down + + + 1 + Up + + + + + diff --git a/template-antminer-l3.xml b/template-antminer-l3.xml index 0d90fb0..7283e0f 100644 --- a/template-antminer-l3.xml +++ b/template-antminer-l3.xml @@ -1,1895 +1,1895 @@ - - - 4.2 - 2019-12-28T02:40:48Z - - - AntMiner L3 - - - - - - - - {AntMiner L3:AntMinerL3.Hashrate.nodata(15m)}=1 and {AntMiner L3:icmpping.last()}=1 - 0 - - AntMiner L3 Hashrate information not available on {HOST.NAME} - 0 - - - 0 - 4 - - 0 - 1 - - - - - (({AntMiner L3:AntMinerL3.Temp1.min(15m)}>{$TEMP_LOW} or {AntMiner L3:AntMinerL3.Temp2.min(15m)}>{$TEMP_LOW} or {AntMiner L3:AntMinerL3.Temp3.min(15m)}>{$TEMP_LOW} or {AntMiner L3:AntMinerL3.Temp4.min(15m)}>{$TEMP_LOW}) and {AntMiner L3:icmpping.last()}=1) - 1 - (({AntMiner L3:AntMinerL3.Temp1.last()}<{$TEMP_LOW} or {AntMiner L3:AntMinerL3.Temp2.last()}<{$TEMP_LOW} or {AntMiner L3:AntMinerL3.Temp3.last()}<{$TEMP_LOW} or {AntMiner L3:AntMinerL3.Temp4.last()}<{$TEMP_LOW}) and {AntMiner L3:icmpping.last()}=1) - AntMiner L3 High temp on {HOST.NAME} - 0 - - - 0 - 3 - - 0 - 1 - - - - - {AntMiner L3:icmpping.max(#3)}=0 and {AntMiner L3:net.tcp.service[tcp,,4028].last(#3)}=0 - 1 - {AntMiner L3:icmpping.last()}=1 or {AntMiner L3:net.tcp.service[tcp,,4028].last()}=1 - AntMiner L3 Host DOWN {HOST.NAME} - 0 - - - 0 - 5 - - 0 - 1 - - - - - ({AntMiner L3:AntMinerL3.Hashrate.last(240)}<{$HASH_LOW} and {AntMiner L3:AntMinerL3.Elapsed.last()}>600) and ({AntMiner L3:icmpping.last()}=1) - 0 - - AntMiner L3 Low hashrate on {HOST.NAME} - 0 - - - 0 - 2 - - 0 - 1 - - - - - ({AntMiner L3:AntMinerL3.Fan1.last()}=0 or {AntMiner L3:AntMinerL3.Fan2.last()}=0) and ({AntMiner L3:icmpping.last()}=1) - 0 - - AntMiner L3 пропеллер сломан {HOST.NAME} - 0 - - - 0 - 0 - - 0 - 1 - - - - - {AntMiner L3:AntMinerL3.Fan_num.last()}=0 and {AntMiner L3:icmpping.last()}=1 and ({AntMiner L3:AntMinerL3.Elapsed.last()} = {AntMiner L3:AntMinerL3.Elapsed.prev()} and {AntMiner L3:AntMinerL3.Elapsed.last()}>0) - 1 - {AntMiner L3:AntMinerL3.Fan_num.last()}=2 - Асик завис - 0 - - - 0 - 0 - - 0 - 1 - - - - - ({AntMiner L3:AntMinerL3.URL1.str({$URL1})}=0 or {AntMiner L3:AntMinerL3.URL2.str({$URL2})}=0 or {AntMiner L3:AntMinerL3.URL3.str({$URL3})}=0) and {AntMiner L3:icmpping.last()}=1 - 0 - - Внимание "левые" URL! {HOST.NAME} - 0 - - - 1 - 0 - - 0 - 1 - - - - - {AntMiner L3:AntMinerL3.Userpool3.strlen()}<>0 or {AntMiner L3:AntMinerL3.Userpool4.strlen()}<>0 and {AntMiner L3:icmpping.last()}=1 - 1 - {AntMiner L3:AntMinerL3.Userpool3.strlen()}=0 or {AntMiner L3:AntMinerL3.Userpool4.strlen()}=0 - Внимание "левые" пулы ! {HOST.NAME} - 0 - - - 1 - 0 - - 0 - 1 - - - - - {AntMiner L3:AntMinerL3.CompileTime.str("2018")}=0 - 1 - {AntMiner L3:AntMinerL3.CompileTime.str("2019")}=1 - Старая прошивка L3 {HOST.NAME} - 0 - - - 1 - 0 - - 0 - 1 - - - - - - - Service state - - - 0 - Down - - - 1 - Up - - - - - + + + 4.2 + 2019-12-28T02:40:48Z + + + AntMiner L3 + + + + + + + + {AntMiner L3:AntMinerL3.Hashrate.nodata(15m)}=1 and {AntMiner L3:icmpping.last()}=1 + 0 + + AntMiner L3 Hashrate information not available on {HOST.NAME} + 0 + + + 0 + 4 + + 0 + 1 + + + + + (({AntMiner L3:AntMinerL3.Temp1.min(15m)}>{$TEMP_LOW} or {AntMiner L3:AntMinerL3.Temp2.min(15m)}>{$TEMP_LOW} or {AntMiner L3:AntMinerL3.Temp3.min(15m)}>{$TEMP_LOW} or {AntMiner L3:AntMinerL3.Temp4.min(15m)}>{$TEMP_LOW}) and {AntMiner L3:icmpping.last()}=1) + 1 + (({AntMiner L3:AntMinerL3.Temp1.last()}<{$TEMP_LOW} or {AntMiner L3:AntMinerL3.Temp2.last()}<{$TEMP_LOW} or {AntMiner L3:AntMinerL3.Temp3.last()}<{$TEMP_LOW} or {AntMiner L3:AntMinerL3.Temp4.last()}<{$TEMP_LOW}) and {AntMiner L3:icmpping.last()}=1) + AntMiner L3 High temp on {HOST.NAME} + 0 + + + 0 + 3 + + 0 + 1 + + + + + {AntMiner L3:icmpping.max(#3)}=0 and {AntMiner L3:net.tcp.service[tcp,,4028].last(#3)}=0 + 1 + {AntMiner L3:icmpping.last()}=1 or {AntMiner L3:net.tcp.service[tcp,,4028].last()}=1 + AntMiner L3 Host DOWN {HOST.NAME} + 0 + + + 0 + 5 + + 0 + 1 + + + + + ({AntMiner L3:AntMinerL3.Hashrate.last(240)}<{$HASH_LOW} and {AntMiner L3:AntMinerL3.Elapsed.last()}>600) and ({AntMiner L3:icmpping.last()}=1) + 0 + + AntMiner L3 Low hashrate on {HOST.NAME} + 0 + + + 0 + 2 + + 0 + 1 + + + + + ({AntMiner L3:AntMinerL3.Fan1.last()}=0 or {AntMiner L3:AntMinerL3.Fan2.last()}=0) and ({AntMiner L3:icmpping.last()}=1) + 0 + + AntMiner L3 пропеллер сломан {HOST.NAME} + 0 + + + 0 + 0 + + 0 + 1 + + + + + {AntMiner L3:AntMinerL3.Fan_num.last()}=0 and {AntMiner L3:icmpping.last()}=1 and ({AntMiner L3:AntMinerL3.Elapsed.last()} = {AntMiner L3:AntMinerL3.Elapsed.prev()} and {AntMiner L3:AntMinerL3.Elapsed.last()}>0) + 1 + {AntMiner L3:AntMinerL3.Fan_num.last()}=2 + Асик завис + 0 + + + 0 + 0 + + 0 + 1 + + + + + ({AntMiner L3:AntMinerL3.URL1.str({$URL1})}=0 or {AntMiner L3:AntMinerL3.URL2.str({$URL2})}=0 or {AntMiner L3:AntMinerL3.URL3.str({$URL3})}=0) and {AntMiner L3:icmpping.last()}=1 + 0 + + Внимание "левые" URL! {HOST.NAME} + 0 + + + 1 + 0 + + 0 + 1 + + + + + {AntMiner L3:AntMinerL3.Userpool3.strlen()}<>0 or {AntMiner L3:AntMinerL3.Userpool4.strlen()}<>0 and {AntMiner L3:icmpping.last()}=1 + 1 + {AntMiner L3:AntMinerL3.Userpool3.strlen()}=0 or {AntMiner L3:AntMinerL3.Userpool4.strlen()}=0 + Внимание "левые" пулы ! {HOST.NAME} + 0 + + + 1 + 0 + + 0 + 1 + + + + + {AntMiner L3:AntMinerL3.CompileTime.str("2018")}=0 + 1 + {AntMiner L3:AntMinerL3.CompileTime.str("2019")}=1 + Старая прошивка L3 {HOST.NAME} + 0 + + + 1 + 0 + + 0 + 1 + + + + + + + Service state + + + 0 + Down + + + 1 + Up + + + + + diff --git a/template-antminer-s17.xml b/template-antminer-s17.xml index d560849..d28438a 100644 --- a/template-antminer-s17.xml +++ b/template-antminer-s17.xml @@ -1,572 +1,572 @@ - - - 5.0 - 2020-06-06T07:32:42Z - - - Antminer S17+ - - - - - - - - {AntMiner S17 Plus:AntMinerS17.Hashrate.nodata(15m)}=1 and {AntMiner S17 Plus:icmpping.last()}=1 - AntMiner S17 Hashrate information not available on {HOST.NAME} - HIGH - YES - - - ({AntMiner S17 Plus:AntMinerS17.Temp1.min(15m)}>{$TEMP_LOW} or {AntMiner S17 Plus:AntMinerS17.Temp2.min(15m)}>{$TEMP_LOW} or {AntMiner S17 Plus:AntMinerS17.Temp3.min(15m)}>{$TEMP_LOW}) and {AntMiner S17 Plus:icmpping.last()}=1 - RECOVERY_EXPRESSION - ({AntMiner S17 Plus:AntMinerS17.Temp1.last()}<{$TEMP_LOW} or {AntMiner S17 Plus:AntMinerS17.Temp2.last()}<{$TEMP_LOW} or {AntMiner S17 Plus:AntMinerS17.Temp3.last()}<{$TEMP_LOW}) and {AntMiner S17 Plus:icmpping.last()}=1 - AntMiner S17 High temp on {HOST.NAME} - AVERAGE - YES - - - {AntMiner S17 Plus:icmpping.last(5m)}=0 and {AntMiner S17 Plus:net.tcp.service[tcp,,4028].last(5m)}=0 - RECOVERY_EXPRESSION - {AntMiner S17 Plus:icmpping.last()}=1 or {AntMiner S17 Plus:net.tcp.service[tcp,,4028].last()}=1 - AntMiner S17 Host DOWN {HOST.NAME} - DISASTER - YES - - - ({AntMiner S17 Plus:AntMinerS17.Fan1.last()}<{$FAN_LOW} or {AntMiner S17 Plus:AntMinerS17.Fan2.last()}<{$FAN_LOW} or {AntMiner S17 Plus:AntMinerS17.Fan3.last()}<{$FAN_LOW} or {AntMiner S17 Plus:AntMinerS17.Fan4.last()}<{$FAN_LOW}) and ({AntMiner S17 Plus:icmpping.last()}=1 and {AntMiner S17 Plus:AntMinerS17.Elapsed.last()}>300) - AntMiner S17 low fan speed {HOST.NAME} - YES - - - ({AntMiner S17 Plus:AntMinerS17.Hashrate.last()}<{$HASH_LOW} and {AntMiner S17 Plus:AntMinerS17.Elapsed.last()}>600) and ({AntMiner S17 Plus:icmpping.last()}=1 and {AntMiner S17 Plus:net.tcp.service[tcp,,4028].last()}=1) - RECOVERY_EXPRESSION - {AntMiner S17 Plus:AntMinerS17.Hashrate.last()}>{$HASH_LOW} or ( {AntMiner S17 Plus:icmpping.last(5m)}=0 and {AntMiner S17 Plus:net.tcp.service[tcp,,4028].last(5m)}=0 ) - AntMiner S17 Low hashrate on {HOST.NAME} - WARNING - YES - - - ({AntMiner S17 Plus:icmpping.last(#1)}=1 and {AntMiner S17 Plus:net.tcp.service[tcp,,4028].last()}=1) and ({AntMiner S17 Plus:AntMinerS17.LS_online_pool1.str(true, #3)}=1 and {AntMiner S17 Plus:AntMinerS17.LS_pool1.last()}>{$LS_TIME}) or ({AntMiner S17 Plus:AntMinerS17.LS_online_pool2.str(true, #3)}=1 and {AntMiner S17 Plus:AntMinerS17.LS_pool2.last()}>{$LS_TIME}) or ({AntMiner S17 Plus:AntMinerS17.LS_online_pool3.str(true, #3)}=1 and {AntMiner S17 Plus:AntMinerS17.LS_pool3.last()}>{$LS_TIME}) - RECOVERY_EXPRESSION - ({AntMiner S17 Plus:AntMinerS17.LS_online_pool1.str(true, #3)}=1 and {AntMiner S17 Plus:AntMinerS17.LS_pool1.last()}<{$LS_TIME}) or ({AntMiner S17 Plus:AntMinerS17.LS_online_pool2.str(true, #3)}=1 and {AntMiner S17 Plus:AntMinerS17.LS_pool2.last()}<{$LS_TIME}) or ({AntMiner S17 Plus:AntMinerS17.LS_online_pool3.str(true, #3)}=1 and {AntMiner S17 Plus:AntMinerS17.LS_pool3.last()}<{$LS_TIME}) - AntMiner S17 превышено время шары {HOST.NAME} - INFO - - - ({AntMiner S17 Plus:AntMinerS17.Fan_num.last()}=0) and ({AntMiner S17 Plus:icmpping.last()}=1) and ({AntMiner S17 Plus:AntMinerS17.Elapsed.last()}={AntMiner S17 Plus:AntMinerS17.Elapsed.prev()}) and ({AntMiner S17 Plus:AntMinerS17.Elapsed.last()}>0) - RECOVERY_EXPRESSION - {AntMiner S17 Plus:AntMinerS17.Fan_num.last()}=2 - Асик завис !!! - YES - - - - - Service state - - - 0 - Down - - - 1 - Up - - - - - + + + 5.0 + 2020-06-06T07:32:42Z + + + Antminer S17+ + + + + + + + + {AntMiner S17 Plus:AntMinerS17.Hashrate.nodata(15m)}=1 and {AntMiner S17 Plus:icmpping.last()}=1 + AntMiner S17 Hashrate information not available on {HOST.NAME} + HIGH + YES + + + ({AntMiner S17 Plus:AntMinerS17.Temp1.min(15m)}>{$TEMP_LOW} or {AntMiner S17 Plus:AntMinerS17.Temp2.min(15m)}>{$TEMP_LOW} or {AntMiner S17 Plus:AntMinerS17.Temp3.min(15m)}>{$TEMP_LOW}) and {AntMiner S17 Plus:icmpping.last()}=1 + RECOVERY_EXPRESSION + ({AntMiner S17 Plus:AntMinerS17.Temp1.last()}<{$TEMP_LOW} or {AntMiner S17 Plus:AntMinerS17.Temp2.last()}<{$TEMP_LOW} or {AntMiner S17 Plus:AntMinerS17.Temp3.last()}<{$TEMP_LOW}) and {AntMiner S17 Plus:icmpping.last()}=1 + AntMiner S17 High temp on {HOST.NAME} + AVERAGE + YES + + + {AntMiner S17 Plus:icmpping.last(5m)}=0 and {AntMiner S17 Plus:net.tcp.service[tcp,,4028].last(5m)}=0 + RECOVERY_EXPRESSION + {AntMiner S17 Plus:icmpping.last()}=1 or {AntMiner S17 Plus:net.tcp.service[tcp,,4028].last()}=1 + AntMiner S17 Host DOWN {HOST.NAME} + DISASTER + YES + + + ({AntMiner S17 Plus:AntMinerS17.Fan1.last()}<{$FAN_LOW} or {AntMiner S17 Plus:AntMinerS17.Fan2.last()}<{$FAN_LOW} or {AntMiner S17 Plus:AntMinerS17.Fan3.last()}<{$FAN_LOW} or {AntMiner S17 Plus:AntMinerS17.Fan4.last()}<{$FAN_LOW}) and ({AntMiner S17 Plus:icmpping.last()}=1 and {AntMiner S17 Plus:AntMinerS17.Elapsed.last()}>300) + AntMiner S17 low fan speed {HOST.NAME} + YES + + + ({AntMiner S17 Plus:AntMinerS17.Hashrate.last()}<{$HASH_LOW} and {AntMiner S17 Plus:AntMinerS17.Elapsed.last()}>600) and ({AntMiner S17 Plus:icmpping.last()}=1 and {AntMiner S17 Plus:net.tcp.service[tcp,,4028].last()}=1) + RECOVERY_EXPRESSION + {AntMiner S17 Plus:AntMinerS17.Hashrate.last()}>{$HASH_LOW} or ( {AntMiner S17 Plus:icmpping.last(5m)}=0 and {AntMiner S17 Plus:net.tcp.service[tcp,,4028].last(5m)}=0 ) + AntMiner S17 Low hashrate on {HOST.NAME} + WARNING + YES + + + ({AntMiner S17 Plus:icmpping.last(#1)}=1 and {AntMiner S17 Plus:net.tcp.service[tcp,,4028].last()}=1) and ({AntMiner S17 Plus:AntMinerS17.LS_online_pool1.str(true, #3)}=1 and {AntMiner S17 Plus:AntMinerS17.LS_pool1.last()}>{$LS_TIME}) or ({AntMiner S17 Plus:AntMinerS17.LS_online_pool2.str(true, #3)}=1 and {AntMiner S17 Plus:AntMinerS17.LS_pool2.last()}>{$LS_TIME}) or ({AntMiner S17 Plus:AntMinerS17.LS_online_pool3.str(true, #3)}=1 and {AntMiner S17 Plus:AntMinerS17.LS_pool3.last()}>{$LS_TIME}) + RECOVERY_EXPRESSION + ({AntMiner S17 Plus:AntMinerS17.LS_online_pool1.str(true, #3)}=1 and {AntMiner S17 Plus:AntMinerS17.LS_pool1.last()}<{$LS_TIME}) or ({AntMiner S17 Plus:AntMinerS17.LS_online_pool2.str(true, #3)}=1 and {AntMiner S17 Plus:AntMinerS17.LS_pool2.last()}<{$LS_TIME}) or ({AntMiner S17 Plus:AntMinerS17.LS_online_pool3.str(true, #3)}=1 and {AntMiner S17 Plus:AntMinerS17.LS_pool3.last()}<{$LS_TIME}) + AntMiner S17 превышено время шары {HOST.NAME} + INFO + + + ({AntMiner S17 Plus:AntMinerS17.Fan_num.last()}=0) and ({AntMiner S17 Plus:icmpping.last()}=1) and ({AntMiner S17 Plus:AntMinerS17.Elapsed.last()}={AntMiner S17 Plus:AntMinerS17.Elapsed.prev()}) and ({AntMiner S17 Plus:AntMinerS17.Elapsed.last()}>0) + RECOVERY_EXPRESSION + {AntMiner S17 Plus:AntMinerS17.Fan_num.last()}=2 + Асик завис !!! + YES + + + + + Service state + + + 0 + Down + + + 1 + Up + + + + + diff --git a/template-antminer-s19.yaml b/template-antminer-s19.yaml index 46dd4a4..6ee5c98 100644 --- a/template-antminer-s19.yaml +++ b/template-antminer-s19.yaml @@ -1,6 +1,6 @@ zabbix_export: version: '5.2' - date: '2021-10-07T01:08:08Z' + date: '2022-02-27T06:16:08Z' groups: - name: 'Antminer S19' @@ -132,6 +132,75 @@ zabbix_export: - '0.001' master_item: key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]' + - + name: Hashrate1 + type: DEPENDENT + key: AntMinerT17.Hashrate1 + delay: '0' + history: 1d + trends: 1d + value_type: FLOAT + units: TH/s + applications: + - + name: AntMinerT17 + preprocessing: + - + type: JSONPATH + parameters: + - '$[1][''chain_rate1'']' + - + type: MULTIPLIER + parameters: + - '0.001' + master_item: + key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]' + - + name: Hashrate2 + type: DEPENDENT + key: AntMinerT17.Hashrate2 + delay: '0' + history: 1d + trends: 1d + value_type: FLOAT + units: TH/s + applications: + - + name: AntMinerT17 + preprocessing: + - + type: JSONPATH + parameters: + - '$[1][''chain_rate2'']' + - + type: MULTIPLIER + parameters: + - '0.001' + master_item: + key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]' + - + name: Hashrate3 + type: DEPENDENT + key: AntMinerT17.Hashrate3 + delay: '0' + history: 1d + trends: 1d + value_type: FLOAT + units: TH/s + applications: + - + name: AntMinerT17 + preprocessing: + - + type: JSONPATH + parameters: + - '$[1][''chain_rate3'']' + - + type: MULTIPLIER + parameters: + - '0.001' + master_item: + key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]' - name: LastOnline_pool1 type: DEPENDENT @@ -392,7 +461,7 @@ zabbix_export: value: '1200' - macro: '{$TEMP_LOW}' - value: '90' + value: '85' - macro: '{$UNAME}' value: root diff --git a/template-antminer-s9.xml b/template-antminer-s9.xml index 791c8fc..cdd1820 100644 --- a/template-antminer-s9.xml +++ b/template-antminer-s9.xml @@ -1,847 +1,847 @@ - - - 5.2 - 2021-10-07T01:07:35Z - - - AntMiner S9 - - - - - - - - ({AntMiner S9:AntMinerS9.Hashrate.nodata(15m)}=1 or {AntMiner S9:AntMinerS9.Hashrate.last(5m)}=0) and {AntMiner S9:icmpping.last()}=1 - AntMiner S9 Hashrate information not available on {HOST.NAME} - HIGH - YES - - - ({AntMiner S9:AntMinerS9.Temp6.min(15m)}>{$TEMP_LOW} or {AntMiner S9:AntMinerS9.Temp7.min(15m)}>{$TEMP_LOW} or {AntMiner S9:AntMinerS9.Temp8.min(15m)}>{$TEMP_LOW}) and {AntMiner S9:icmpping.last()}=1 - RECOVERY_EXPRESSION - ({AntMiner S9:AntMinerS9.Temp6.last()}<{$TEMP_LOW} or {AntMiner S9:AntMinerS9.Temp7.last()}<{$TEMP_LOW} or {AntMiner S9:AntMinerS9.Temp8.last()}<{$TEMP_LOW}) and {AntMiner S9:icmpping.last()}=1 - AntMiner S9 High temp on {HOST.NAME} - AVERAGE - YES - - - {AntMiner S9:icmpping.max(#3)}=0 and {AntMiner S9:net.tcp.service[tcp,,4028].last(#3)}=0 - RECOVERY_EXPRESSION - {AntMiner S9:icmpping.last()}=1 or {AntMiner S9:net.tcp.service[tcp,,4028].last()}=1 - AntMiner S9 Host DOWN {HOST.NAME} - DISASTER - YES - - - (({AntMiner S9:AntMinerS9.Fan5.last()}<{$FAN_LOW} and {AntMiner S9:AntMinerS9.Fan5.last(#2)}<{$FAN_LOW} and {AntMiner S9:AntMinerS9.Fan5.last(#3)}<{$FAN_LOW}) or ({AntMiner S9:AntMinerS9.Fan6.last()}<{$FAN_LOW} and {AntMiner S9:AntMinerS9.Fan6.last(#2)}<{$FAN_LOW} and {AntMiner S9:AntMinerS9.Fan6.last(#3)}<{$FAN_LOW})) and {AntMiner S9:icmpping.last()}=1 - AntMiner S9 low fan speed {HOST.NAME} - YES - - - ({AntMiner S9:AntMinerS9.Hashrate.last()}<{$HASH_LOW} and {AntMiner S9:AntMinerS9.Elapsed.last()}>600) and ({AntMiner S9:icmpping.last()}=1 and {AntMiner S9:net.tcp.service[tcp,,4028].last()}=1) - RECOVERY_EXPRESSION - {AntMiner S9:AntMinerS9.Hashrate.last()}>{$HASH_LOW} or {AntMiner S9:icmpping.last()}=0 or {AntMiner S9:AntMinerS9.Hashrate.nodata(15m)}=1 - AntMiner S9 Low hashrate on {HOST.NAME} - WARNING - YES - - - ({AntMiner S9:icmpping.max(#1)}=1 and {AntMiner S9:net.tcp.service[tcp,,4028].last()}=1) and ({AntMiner S9:AntMinerS9.LS_online_pool1.str(true, #3)}=1 and {AntMiner S9:AntMinerS9.LS_pool1.last()}>{$LS_TIME}) or ({AntMiner S9:AntMinerS9.LS_online_pool2.str(true, #3)}=1 and {AntMiner S9:AntMinerS9.LS_pool2.last()}>{$LS_TIME}) or ({AntMiner S9:AntMinerS9.LS_online_pool3.str(true, #3)}=1 and {AntMiner S9:AntMinerS9.LS_pool3.last()}>{$LS_TIME}) - RECOVERY_EXPRESSION - ({AntMiner S9:AntMinerS9.LS_online_pool1.str(true, #3)}=1 and {AntMiner S9:AntMinerS9.LS_pool1.last()}<{$LS_TIME}) or ({AntMiner S9:AntMinerS9.LS_online_pool2.str(true, #3)}=1 and {AntMiner S9:AntMinerS9.LS_pool2.last()}<{$LS_TIME}) or ({AntMiner S9:AntMinerS9.LS_online_pool3.str(true, #3)}=1 and {AntMiner S9:AntMinerS9.LS_pool3.last()}<{$LS_TIME}) - AntMiner S9 превышено время шары {HOST.NAME} - INFO - - - ({AntMiner S9:AntMinerS9.Fan_num.last()}=0) and ({AntMiner S9:icmpping.last()}=1) and ({AntMiner S9:AntMinerS9.Elapsed.last()}={AntMiner S9:AntMinerS9.Elapsed.prev()}) and ({AntMiner S9:AntMinerS9.Elapsed.last()}>0) - RECOVERY_EXPRESSION - {AntMiner S9:AntMinerS9.Fan_num.last()}=2 - Асик завис !!! - DISABLED - YES - - - ({AntMiner S9:AntMinerS9.Userpool3.strlen()}<>0 or {AntMiner S9:AntMinerS9.Userpool4.strlen()}<>0) and ({AntMiner S9:icmpping.last()}=1) - RECOVERY_EXPRESSION - ({AntMiner S9:AntMinerS9.Userpool3.strlen()}=0 or {AntMiner S9:AntMinerS9.Userpool4.strlen()}=0) - Внимание "левые" пулы ! {HOST.NAME} - DISABLED - YES - - - - - Asic - - - 1 - Normal - - - 240 - Low Power Enhanced Mode - - - 241 - HashRate-0.5TH/S - - - 242 - HashRate-1.0TH/S - - - 243 - HashRate-1.5TH/S - - - 244 - HashRate-2.0TH/S - - - 245 - HashRate-2.5TH/S - - - 246 - HashRate-3.0TH/S - - - 250 - Hashrate Unchanged - Lower Voltage - - - - - Service state - - - 0 - Down - - - 1 - Up - - - - - + + + 5.2 + 2021-10-07T01:07:35Z + + + AntMiner S9 + + + + + + + + ({AntMiner S9:AntMinerS9.Hashrate.nodata(15m)}=1 or {AntMiner S9:AntMinerS9.Hashrate.last(5m)}=0) and {AntMiner S9:icmpping.last()}=1 + AntMiner S9 Hashrate information not available on {HOST.NAME} + HIGH + YES + + + ({AntMiner S9:AntMinerS9.Temp6.min(15m)}>{$TEMP_LOW} or {AntMiner S9:AntMinerS9.Temp7.min(15m)}>{$TEMP_LOW} or {AntMiner S9:AntMinerS9.Temp8.min(15m)}>{$TEMP_LOW}) and {AntMiner S9:icmpping.last()}=1 + RECOVERY_EXPRESSION + ({AntMiner S9:AntMinerS9.Temp6.last()}<{$TEMP_LOW} or {AntMiner S9:AntMinerS9.Temp7.last()}<{$TEMP_LOW} or {AntMiner S9:AntMinerS9.Temp8.last()}<{$TEMP_LOW}) and {AntMiner S9:icmpping.last()}=1 + AntMiner S9 High temp on {HOST.NAME} + AVERAGE + YES + + + {AntMiner S9:icmpping.max(#3)}=0 and {AntMiner S9:net.tcp.service[tcp,,4028].last(#3)}=0 + RECOVERY_EXPRESSION + {AntMiner S9:icmpping.last()}=1 or {AntMiner S9:net.tcp.service[tcp,,4028].last()}=1 + AntMiner S9 Host DOWN {HOST.NAME} + DISASTER + YES + + + (({AntMiner S9:AntMinerS9.Fan5.last()}<{$FAN_LOW} and {AntMiner S9:AntMinerS9.Fan5.last(#2)}<{$FAN_LOW} and {AntMiner S9:AntMinerS9.Fan5.last(#3)}<{$FAN_LOW}) or ({AntMiner S9:AntMinerS9.Fan6.last()}<{$FAN_LOW} and {AntMiner S9:AntMinerS9.Fan6.last(#2)}<{$FAN_LOW} and {AntMiner S9:AntMinerS9.Fan6.last(#3)}<{$FAN_LOW})) and {AntMiner S9:icmpping.last()}=1 + AntMiner S9 low fan speed {HOST.NAME} + YES + + + ({AntMiner S9:AntMinerS9.Hashrate.last()}<{$HASH_LOW} and {AntMiner S9:AntMinerS9.Elapsed.last()}>600) and ({AntMiner S9:icmpping.last()}=1 and {AntMiner S9:net.tcp.service[tcp,,4028].last()}=1) + RECOVERY_EXPRESSION + {AntMiner S9:AntMinerS9.Hashrate.last()}>{$HASH_LOW} or {AntMiner S9:icmpping.last()}=0 or {AntMiner S9:AntMinerS9.Hashrate.nodata(15m)}=1 + AntMiner S9 Low hashrate on {HOST.NAME} + WARNING + YES + + + ({AntMiner S9:icmpping.max(#1)}=1 and {AntMiner S9:net.tcp.service[tcp,,4028].last()}=1) and ({AntMiner S9:AntMinerS9.LS_online_pool1.str(true, #3)}=1 and {AntMiner S9:AntMinerS9.LS_pool1.last()}>{$LS_TIME}) or ({AntMiner S9:AntMinerS9.LS_online_pool2.str(true, #3)}=1 and {AntMiner S9:AntMinerS9.LS_pool2.last()}>{$LS_TIME}) or ({AntMiner S9:AntMinerS9.LS_online_pool3.str(true, #3)}=1 and {AntMiner S9:AntMinerS9.LS_pool3.last()}>{$LS_TIME}) + RECOVERY_EXPRESSION + ({AntMiner S9:AntMinerS9.LS_online_pool1.str(true, #3)}=1 and {AntMiner S9:AntMinerS9.LS_pool1.last()}<{$LS_TIME}) or ({AntMiner S9:AntMinerS9.LS_online_pool2.str(true, #3)}=1 and {AntMiner S9:AntMinerS9.LS_pool2.last()}<{$LS_TIME}) or ({AntMiner S9:AntMinerS9.LS_online_pool3.str(true, #3)}=1 and {AntMiner S9:AntMinerS9.LS_pool3.last()}<{$LS_TIME}) + AntMiner S9 превышено время шары {HOST.NAME} + INFO + + + ({AntMiner S9:AntMinerS9.Fan_num.last()}=0) and ({AntMiner S9:icmpping.last()}=1) and ({AntMiner S9:AntMinerS9.Elapsed.last()}={AntMiner S9:AntMinerS9.Elapsed.prev()}) and ({AntMiner S9:AntMinerS9.Elapsed.last()}>0) + RECOVERY_EXPRESSION + {AntMiner S9:AntMinerS9.Fan_num.last()}=2 + Асик завис !!! + DISABLED + YES + + + ({AntMiner S9:AntMinerS9.Userpool3.strlen()}<>0 or {AntMiner S9:AntMinerS9.Userpool4.strlen()}<>0) and ({AntMiner S9:icmpping.last()}=1) + RECOVERY_EXPRESSION + ({AntMiner S9:AntMinerS9.Userpool3.strlen()}=0 or {AntMiner S9:AntMinerS9.Userpool4.strlen()}=0) + Внимание "левые" пулы ! {HOST.NAME} + DISABLED + YES + + + + + Asic + + + 1 + Normal + + + 240 + Low Power Enhanced Mode + + + 241 + HashRate-0.5TH/S + + + 242 + HashRate-1.0TH/S + + + 243 + HashRate-1.5TH/S + + + 244 + HashRate-2.0TH/S + + + 245 + HashRate-2.5TH/S + + + 246 + HashRate-3.0TH/S + + + 250 + Hashrate Unchanged - Lower Voltage + + + + + Service state + + + 0 + Down + + + 1 + Up + + + + + diff --git a/template-antminer-t17.xml b/template-antminer-t17.xml index 1607e83..6ded186 100644 --- a/template-antminer-t17.xml +++ b/template-antminer-t17.xml @@ -1,7 +1,7 @@ 5.2 - 2021-10-07T01:08:45Z + 2022-02-27T06:12:24Z Antminer T17 @@ -185,6 +185,102 @@ Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"] + + Hashrate5 + DEPENDENT + AntMinerT17.Hashrate5 + 0 + 1d + 1d + FLOAT + TH/s + + + AntMinerT17 + + + + + JSONPATH + + $[1]['chain_rate1'] + + + + MULTIPLIER + + 0.001 + + + + + Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"] + + + + Hashrate6 + DEPENDENT + AntMinerT17.Hashrate6 + 0 + 1d + 1d + FLOAT + TH/s + + + AntMinerT17 + + + + + JSONPATH + + $[1]['chain_rate2'] + + + + MULTIPLIER + + 0.001 + + + + + Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"] + + + + Hashrate7 + DEPENDENT + AntMinerT17.Hashrate7 + 0 + 1d + 1d + FLOAT + TH/s + + + AntMinerT17 + + + + + JSONPATH + + $[1]['chain_rate3'] + + + + MULTIPLIER + + 0.001 + + + + + Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"] + + LastOnline_pool1 DEPENDENT @@ -599,6 +695,7 @@ return $123; RECOVERY_EXPRESSION {AntMiner T17:AntMinerT17.Fan_num.last()}=2 Асик завис !!! + DISABLED YES diff --git a/template-cheetah-f1.xml b/template-cheetah-f1.xml index 6843c0e..f1dc0fe 100644 --- a/template-cheetah-f1.xml +++ b/template-cheetah-f1.xml @@ -1,307 +1,307 @@ - - - 5.0 - 2020-06-10T13:57:57Z - - - Cheetah F1 - - - - - - - - {Cheetah F1:AntMinerF1.Hashrate.nodata(15m)}=1 and {Cheetah F1:icmpping.last()}=1 - AntMiner F1 Hashrate information not available on {HOST.NAME} - HIGH - YES - - - ({Cheetah F1:AntMinerF1.Temp1.min(15m)}>{$TEMP_LOW} or {Cheetah F1:AntMinerF1.Temp2.min(15m)}>{$TEMP_LOW} or {Cheetah F1:AntMinerF1.Temp3.min(15m)}>{$TEMP_LOW} or {Cheetah F1:AntMinerF1.Temp4.min(15m)}>{$TEMP_LOW}) and {Cheetah F1:icmpping.last()}=1 - RECOVERY_EXPRESSION - ({Cheetah F1:AntMinerF1.Temp1.last()}<{$TEMP_LOW} or {Cheetah F1:AntMinerF1.Temp2.last()}<{$TEMP_LOW} or {Cheetah F1:AntMinerF1.Temp3.last()}<{$TEMP_LOW}) and {Cheetah F1:icmpping.last()}=1 - AntMiner F1 High temp on {HOST.NAME} - AVERAGE - YES - - - {Cheetah F1:icmpping.last(5m)}=0 and {Cheetah F1:net.tcp.service[tcp,,4028].last(5m)}=0 - RECOVERY_EXPRESSION - {Cheetah F1:icmpping.last()}=1 or {Cheetah F1:net.tcp.service[tcp,,4028].last()}=1 - AntMiner F1 Host DOWN {HOST.NAME} - DISASTER - YES - - - ({Cheetah F1:AntMinerF1.Fan1.last(10m)}<{$FAN_LOW} or {Cheetah F1:AntMinerF1.Fan2.last(10m)}<{$FAN_LOW}) and {Cheetah F1:icmpping.last()}=1 - AntMiner F1 low fan speed {HOST.NAME} - YES - - - ({Cheetah F1:AntMinerF1.Hashrate.last()}<{$HASH_LOW} and {Cheetah F1:AntMinerF1.Elapsed.last()}>600) and ({Cheetah F1:icmpping.last()}=1 and {Cheetah F1:net.tcp.service[tcp,,4028].last()}=1) - RECOVERY_EXPRESSION - {Cheetah F1:AntMinerF1.Hashrate.last(#3)}>{$HASH_LOW} - AntMiner F1 Low hashrate on {HOST.NAME} - WARNING - YES - - - - - Service state - - - 0 - Down - - - 1 - Up - - - - - + + + 5.0 + 2020-06-10T13:57:57Z + + + Cheetah F1 + + + + + + + + {Cheetah F1:AntMinerF1.Hashrate.nodata(15m)}=1 and {Cheetah F1:icmpping.last()}=1 + AntMiner F1 Hashrate information not available on {HOST.NAME} + HIGH + YES + + + ({Cheetah F1:AntMinerF1.Temp1.min(15m)}>{$TEMP_LOW} or {Cheetah F1:AntMinerF1.Temp2.min(15m)}>{$TEMP_LOW} or {Cheetah F1:AntMinerF1.Temp3.min(15m)}>{$TEMP_LOW} or {Cheetah F1:AntMinerF1.Temp4.min(15m)}>{$TEMP_LOW}) and {Cheetah F1:icmpping.last()}=1 + RECOVERY_EXPRESSION + ({Cheetah F1:AntMinerF1.Temp1.last()}<{$TEMP_LOW} or {Cheetah F1:AntMinerF1.Temp2.last()}<{$TEMP_LOW} or {Cheetah F1:AntMinerF1.Temp3.last()}<{$TEMP_LOW}) and {Cheetah F1:icmpping.last()}=1 + AntMiner F1 High temp on {HOST.NAME} + AVERAGE + YES + + + {Cheetah F1:icmpping.last(5m)}=0 and {Cheetah F1:net.tcp.service[tcp,,4028].last(5m)}=0 + RECOVERY_EXPRESSION + {Cheetah F1:icmpping.last()}=1 or {Cheetah F1:net.tcp.service[tcp,,4028].last()}=1 + AntMiner F1 Host DOWN {HOST.NAME} + DISASTER + YES + + + ({Cheetah F1:AntMinerF1.Fan1.last(10m)}<{$FAN_LOW} or {Cheetah F1:AntMinerF1.Fan2.last(10m)}<{$FAN_LOW}) and {Cheetah F1:icmpping.last()}=1 + AntMiner F1 low fan speed {HOST.NAME} + YES + + + ({Cheetah F1:AntMinerF1.Hashrate.last()}<{$HASH_LOW} and {Cheetah F1:AntMinerF1.Elapsed.last()}>600) and ({Cheetah F1:icmpping.last()}=1 and {Cheetah F1:net.tcp.service[tcp,,4028].last()}=1) + RECOVERY_EXPRESSION + {Cheetah F1:AntMinerF1.Hashrate.last(#3)}>{$HASH_LOW} + AntMiner F1 Low hashrate on {HOST.NAME} + WARNING + YES + + + + + Service state + + + 0 + Down + + + 1 + Up + + + + + diff --git a/template-farm.xml b/template-farm.xml index fb3159b..53674ce 100644 --- a/template-farm.xml +++ b/template-farm.xml @@ -1,1373 +1,1373 @@ - - - 4.2 - 2020-05-12T04:29:40Z - - - Фермы - - - - - - - - {Farm:net.tcp.service[tcp,,3333].last(5m)}=0 and {Farm:icmpping.last(5m)}=1 - 1 - {Farm:net.tcp.service[tcp,,3333].last()}=1 or ({Farm:net.tcp.service[tcp,,3333].last(3m)}=0 and {Farm:icmpping.last(3m)}=0) - Claymore DOWN {HOST.NAME} - 0 - - - 0 - 4 - - 0 - 1 - - - - - {Farm:net.tcp.service[tcp,,3333].last(3m)}=0 and {Farm:icmpping.last(3m)}=0 - 1 - {Farm:icmpping.last()}=1 or {Farm:net.tcp.service[tcp,,3333].last()}=1 - Farm Host DOWN {HOST.NAME} - 0 - - - 0 - 5 - - 0 - 1 - - - - - ({Farm:icmpping.last()}=1 and {Farm:net.tcp.service[tcp,,3333].last()}=1) and ({Farm:Farm.Card1.last(#1)}<23000) or ({Farm:Farm.Card2.last(#1)}<23000) or ({Farm:Farm.Card3.last(#1)}<23000) or ({Farm:Farm.Card4.last(#1)}<23000) or ({Farm:Farm.Card5.last(#1)}<23000) or ({Farm:Farm.Card6.last(#1)}<23000) or ({Farm:Farm.Card7.last(#1)}<23000) or ({Farm:Farm.Card8.last(#1)}<23000) or ({Farm:Farm.Card9.last(#1)}<23000) or ({Farm:Farm.Card10.last(#1)}<23000) or ({Farm:Farm.Card11.last(#1)}<23000) - 1 - ({Farm:icmpping.last()}=1 and {Farm:net.tcp.service[tcp,,3333].last()}=1) and ({Farm:Farm.Card1.nodata(1m)}=0 and {Farm:Farm.Card1.last()}>23000) and -({Farm:Farm.Card2.nodata(1m)}=0 and {Farm:Farm.Card2.last()}>23000) and -({Farm:Farm.Card3.nodata(1m)}=0 and {Farm:Farm.Card3.last()}>23000) and -({Farm:Farm.Card4.nodata(1m)}=0 and {Farm:Farm.Card4.last()}>23000) and -({Farm:Farm.Card5.nodata(1m)}=0 and {Farm:Farm.Card5.last()}>23000) and -({Farm:Farm.Card6.nodata(1m)}=0 and {Farm:Farm.Card6.last()}>23000) and -({Farm:Farm.Card7.nodata(1m)}=0 and {Farm:Farm.Card7.last()}>23000) and -({Farm:Farm.Card8.nodata(1m)}=0 and {Farm:Farm.Card8.last()}>23000) and -({Farm:Farm.Card9.nodata(1m)}=0 and {Farm:Farm.Card9.last()}>23000) and -({Farm:Farm.Card10.nodata(1m)}=0 and {Farm:Farm.Card10.last()}>23000) and -({Farm:Farm.Card11.nodata(1m)}=0 and {Farm:Farm.Card11.last()}>23000) - Farm Low hashrate on {HOST.NAME} - 0 - - - 1 - 1 - - 0 - 1 - - - - - ({Farm:icmpping.last()}=1 and {Farm:net.tcp.service[tcp,,3333].last()}=1) and {Farm:Farm.VideoSum.last()}<{$VIDEO} - 0 - - Отвал GPU {HOST.NAME} - 0 - - - 0 - 3 - - 0 - 1 - - - - - {Farm:net.tcp.service[tcp,,3333].last()}=1 and {Farm:icmpping.last()}=1 and {Farm:FarmGetstats["{HOST.CONN}", "{$HOST.PORT}"].nodata(15m)}=1 - 0 - - Ферма зависла {HOST.NAME} - 0 - - - 0 - 2 - - 0 - 1 - - - - - - - Service state - - - 0 - Down - - - 1 - Up - - - - - + + + 4.2 + 2020-05-12T04:29:40Z + + + Фермы + + + + + + + + {Farm:net.tcp.service[tcp,,3333].last(5m)}=0 and {Farm:icmpping.last(5m)}=1 + 1 + {Farm:net.tcp.service[tcp,,3333].last()}=1 or ({Farm:net.tcp.service[tcp,,3333].last(3m)}=0 and {Farm:icmpping.last(3m)}=0) + Claymore DOWN {HOST.NAME} + 0 + + + 0 + 4 + + 0 + 1 + + + + + {Farm:net.tcp.service[tcp,,3333].last(3m)}=0 and {Farm:icmpping.last(3m)}=0 + 1 + {Farm:icmpping.last()}=1 or {Farm:net.tcp.service[tcp,,3333].last()}=1 + Farm Host DOWN {HOST.NAME} + 0 + + + 0 + 5 + + 0 + 1 + + + + + ({Farm:icmpping.last()}=1 and {Farm:net.tcp.service[tcp,,3333].last()}=1) and ({Farm:Farm.Card1.last(#1)}<23000) or ({Farm:Farm.Card2.last(#1)}<23000) or ({Farm:Farm.Card3.last(#1)}<23000) or ({Farm:Farm.Card4.last(#1)}<23000) or ({Farm:Farm.Card5.last(#1)}<23000) or ({Farm:Farm.Card6.last(#1)}<23000) or ({Farm:Farm.Card7.last(#1)}<23000) or ({Farm:Farm.Card8.last(#1)}<23000) or ({Farm:Farm.Card9.last(#1)}<23000) or ({Farm:Farm.Card10.last(#1)}<23000) or ({Farm:Farm.Card11.last(#1)}<23000) + 1 + ({Farm:icmpping.last()}=1 and {Farm:net.tcp.service[tcp,,3333].last()}=1) and ({Farm:Farm.Card1.nodata(1m)}=0 and {Farm:Farm.Card1.last()}>23000) and +({Farm:Farm.Card2.nodata(1m)}=0 and {Farm:Farm.Card2.last()}>23000) and +({Farm:Farm.Card3.nodata(1m)}=0 and {Farm:Farm.Card3.last()}>23000) and +({Farm:Farm.Card4.nodata(1m)}=0 and {Farm:Farm.Card4.last()}>23000) and +({Farm:Farm.Card5.nodata(1m)}=0 and {Farm:Farm.Card5.last()}>23000) and +({Farm:Farm.Card6.nodata(1m)}=0 and {Farm:Farm.Card6.last()}>23000) and +({Farm:Farm.Card7.nodata(1m)}=0 and {Farm:Farm.Card7.last()}>23000) and +({Farm:Farm.Card8.nodata(1m)}=0 and {Farm:Farm.Card8.last()}>23000) and +({Farm:Farm.Card9.nodata(1m)}=0 and {Farm:Farm.Card9.last()}>23000) and +({Farm:Farm.Card10.nodata(1m)}=0 and {Farm:Farm.Card10.last()}>23000) and +({Farm:Farm.Card11.nodata(1m)}=0 and {Farm:Farm.Card11.last()}>23000) + Farm Low hashrate on {HOST.NAME} + 0 + + + 1 + 1 + + 0 + 1 + + + + + ({Farm:icmpping.last()}=1 and {Farm:net.tcp.service[tcp,,3333].last()}=1) and {Farm:Farm.VideoSum.last()}<{$VIDEO} + 0 + + Отвал GPU {HOST.NAME} + 0 + + + 0 + 3 + + 0 + 1 + + + + + {Farm:net.tcp.service[tcp,,3333].last()}=1 and {Farm:icmpping.last()}=1 and {Farm:FarmGetstats["{HOST.CONN}", "{$HOST.PORT}"].nodata(15m)}=1 + 0 + + Ферма зависла {HOST.NAME} + 0 + + + 0 + 2 + + 0 + 1 + + + + + + + Service state + + + 0 + Down + + + 1 + Up + + + + + diff --git a/template-whatsminer.yaml b/template-whatsminer.yaml index 788ee0d..5cefe3e 100644 --- a/template-whatsminer.yaml +++ b/template-whatsminer.yaml @@ -1,175 +1,175 @@ -zabbix_export: - version: '5.2' - date: '2021-03-29T07:44:35Z' - groups: - - - name: Whatsminer - templates: - - - template: Whatsminer - name: Whatsminer - groups: - - - name: Whatsminer - applications: - - - name: WhatsHW - - - name: WhatsInfo - - - name: WhatsState - items: - - - name: Fan-In - type: DEPENDENT - key: FanIn - delay: '0' - history: 1d - trends: '0' - value_type: FLOAT - applications: - - - name: WhatsHW - preprocessing: - - - type: JSONPATH - parameters: - - '$[0][''Fan Speed In'']' - master_item: - key: 'Whats["summary", "{HOST.CONN}", "{$HOST.PORT}"]' - - - name: Fan-Out - type: DEPENDENT - key: FanOut - delay: '0' - history: 1d - trends: '0' - value_type: FLOAT - applications: - - - name: WhatsHW - preprocessing: - - - type: JSONPATH - parameters: - - '$[0][''Fan Speed Out'']' - master_item: - key: 'Whats["summary", "{HOST.CONN}", "{$HOST.PORT}"]' - - - name: Hashrate - type: DEPENDENT - key: Hash - delay: '0' - history: 1d - trends: '0' - value_type: FLOAT - units: TH/s - applications: - - - name: WhatsHW - preprocessing: - - - type: JSONPATH - parameters: - - '$[0][''MHS av'']' - master_item: - key: 'Whats["summary", "{HOST.CONN}", "{$HOST.PORT}"]' - - - name: UpDown - type: SIMPLE - key: icmpping - delay: 60s - history: 1d - trends: '0' - applications: - - - name: WhatsState - valuemap: - name: 'Service state' - - - name: Asic - type: SIMPLE - key: 'net.tcp.service[tcp,,4028]' - delay: 60s - history: 1d - trends: '0' - applications: - - - name: WhatsState - valuemap: - name: 'Service state' - request_method: POST - - - name: Temperature - type: DEPENDENT - key: Temp - delay: '0' - history: 1d - trends: '0' - value_type: TEXT - applications: - - - name: WhatsHW - preprocessing: - - - type: JSONPATH - parameters: - - '$[0][''Temperature'']' - master_item: - key: 'Whats["summary", "{HOST.CONN}", "{$HOST.PORT}"]' - - - name: AsicPolls - type: EXTERNAL - key: 'Whats["pools", "{HOST.CONN}", "{$HOST.PORT}"]' - delay: 300s - history: '0' - trends: '0' - value_type: TEXT - applications: - - - name: WhatsInfo - - - name: AsicSummary - type: EXTERNAL - key: 'Whats["summary", "{HOST.CONN}", "{$HOST.PORT}"]' - delay: 300s - history: 1d - trends: '0' - value_type: TEXT - applications: - - - name: WhatsInfo - macros: - - - macro: '{$TEMP_HIGH}' - value: '80' - triggers: - - - expression: '{Whatsminer:Hash.nodata(15m)}=1 and {Whatsminer:icmpping.last()}=1' - name: 'Whatsminer Hashrate information not available on {HOST.NAME}' - priority: HIGH - manual_close: 'YES' - - - expression: '{Whatsminer:icmpping.max(#3)}=0 and {Whatsminer:net.tcp.service[tcp,,4028].last(#3)}=0' - recovery_mode: RECOVERY_EXPRESSION - recovery_expression: '{Whatsminer:icmpping.last()}=1 and {Whatsminer:net.tcp.service[tcp,,4028].last()}=1' - name: 'WhatsMiner Host Down {HOST.NAME}' - priority: DISASTER - manual_close: 'YES' - - - expression: '{Whatsminer:Temp.last(,15m)}>{$TEMP_HIGH} and {Whatsminer:icmpping.last()}=1' - recovery_mode: RECOVERY_EXPRESSION - recovery_expression: '{Whatsminer:Temp.last(,15m)}<{$HIGH_TEMP} and {Whatsminer:icmpping.last()}=1' - name: 'Whatsminer {HOST.NAME} High Temp' - priority: AVERAGE - manual_close: 'YES' - value_maps: - - - name: 'Service state' - mappings: - - - value: '0' - newvalue: Down - - - value: '1' - newvalue: Up +zabbix_export: + version: '5.2' + date: '2021-03-29T07:44:35Z' + groups: + - + name: Whatsminer + templates: + - + template: Whatsminer + name: Whatsminer + groups: + - + name: Whatsminer + applications: + - + name: WhatsHW + - + name: WhatsInfo + - + name: WhatsState + items: + - + name: Fan-In + type: DEPENDENT + key: FanIn + delay: '0' + history: 1d + trends: '0' + value_type: FLOAT + applications: + - + name: WhatsHW + preprocessing: + - + type: JSONPATH + parameters: + - '$[0][''Fan Speed In'']' + master_item: + key: 'Whats["summary", "{HOST.CONN}", "{$HOST.PORT}"]' + - + name: Fan-Out + type: DEPENDENT + key: FanOut + delay: '0' + history: 1d + trends: '0' + value_type: FLOAT + applications: + - + name: WhatsHW + preprocessing: + - + type: JSONPATH + parameters: + - '$[0][''Fan Speed Out'']' + master_item: + key: 'Whats["summary", "{HOST.CONN}", "{$HOST.PORT}"]' + - + name: Hashrate + type: DEPENDENT + key: Hash + delay: '0' + history: 1d + trends: '0' + value_type: FLOAT + units: TH/s + applications: + - + name: WhatsHW + preprocessing: + - + type: JSONPATH + parameters: + - '$[0][''MHS av'']' + master_item: + key: 'Whats["summary", "{HOST.CONN}", "{$HOST.PORT}"]' + - + name: UpDown + type: SIMPLE + key: icmpping + delay: 60s + history: 1d + trends: '0' + applications: + - + name: WhatsState + valuemap: + name: 'Service state' + - + name: Asic + type: SIMPLE + key: 'net.tcp.service[tcp,,4028]' + delay: 60s + history: 1d + trends: '0' + applications: + - + name: WhatsState + valuemap: + name: 'Service state' + request_method: POST + - + name: Temperature + type: DEPENDENT + key: Temp + delay: '0' + history: 1d + trends: '0' + value_type: TEXT + applications: + - + name: WhatsHW + preprocessing: + - + type: JSONPATH + parameters: + - '$[0][''Temperature'']' + master_item: + key: 'Whats["summary", "{HOST.CONN}", "{$HOST.PORT}"]' + - + name: AsicPolls + type: EXTERNAL + key: 'Whats["pools", "{HOST.CONN}", "{$HOST.PORT}"]' + delay: 300s + history: '0' + trends: '0' + value_type: TEXT + applications: + - + name: WhatsInfo + - + name: AsicSummary + type: EXTERNAL + key: 'Whats["summary", "{HOST.CONN}", "{$HOST.PORT}"]' + delay: 300s + history: 1d + trends: '0' + value_type: TEXT + applications: + - + name: WhatsInfo + macros: + - + macro: '{$TEMP_HIGH}' + value: '80' + triggers: + - + expression: '{Whatsminer:Hash.nodata(15m)}=1 and {Whatsminer:icmpping.last()}=1' + name: 'Whatsminer Hashrate information not available on {HOST.NAME}' + priority: HIGH + manual_close: 'YES' + - + expression: '{Whatsminer:icmpping.max(#3)}=0 and {Whatsminer:net.tcp.service[tcp,,4028].last(#3)}=0' + recovery_mode: RECOVERY_EXPRESSION + recovery_expression: '{Whatsminer:icmpping.last()}=1 and {Whatsminer:net.tcp.service[tcp,,4028].last()}=1' + name: 'WhatsMiner Host Down {HOST.NAME}' + priority: DISASTER + manual_close: 'YES' + - + expression: '{Whatsminer:Temp.last(,15m)}>{$TEMP_HIGH} and {Whatsminer:icmpping.last()}=1' + recovery_mode: RECOVERY_EXPRESSION + recovery_expression: '{Whatsminer:Temp.last(,15m)}<{$HIGH_TEMP} and {Whatsminer:icmpping.last()}=1' + name: 'Whatsminer {HOST.NAME} High Temp' + priority: AVERAGE + manual_close: 'YES' + value_maps: + - + name: 'Service state' + mappings: + - + value: '0' + newvalue: Down + - + value: '1' + newvalue: Up diff --git a/valuemaps-asic.xml b/valuemaps-asic.xml index be8ea70..bffd388 100644 --- a/valuemaps-asic.xml +++ b/valuemaps-asic.xml @@ -1,48 +1,48 @@ - - - 4.2 - 2019-07-10T14:29:22Z - - - Asic - - - 1 - Normal - - - 240 - Low Power Enhanced Mode - - - 241 - HashRate-0.5TH/S - - - 242 - HashRate-1.0TH/S - - - 243 - HashRate-1.5TH/S - - - 244 - HashRate-2.0TH/S - - - 245 - HashRate-2.5TH/S - - - 246 - HashRate-3.0TH/S - - - 250 - Hashrate Unchanged - Lower Voltage - - - - - + + + 4.2 + 2019-07-10T14:29:22Z + + + Asic + + + 1 + Normal + + + 240 + Low Power Enhanced Mode + + + 241 + HashRate-0.5TH/S + + + 242 + HashRate-1.0TH/S + + + 243 + HashRate-1.5TH/S + + + 244 + HashRate-2.0TH/S + + + 245 + HashRate-2.5TH/S + + + 246 + HashRate-3.0TH/S + + + 250 + Hashrate Unchanged - Lower Voltage + + + + + diff --git a/zabbix_server.conf b/zabbix_server.conf index a98fb85..a3fc8c3 100644 --- a/zabbix_server.conf +++ b/zabbix_server.conf @@ -1,44 +1,44 @@ -LogFile=/var/log/zabbix/zabbix_server.log -LogFileSize=1 -DebugLevel=1 -PidFile=/var/run/zabbix/zabbix_server.pid -DBHost=localhost -DBName=zabbix -DBUser=zabbix -DBPassword=password -DBSocket=/var/run/mysqld/mysqld.sock -# DBPort= -StartPollers=32 -# StartPreprocessors=3 -StartPollersUnreachable=16 -StartTrappers=15 -StartPingers=32 -# StartDiscoverers=1 -StartHTTPPollers=0 -StartEscalators=10 -# StartAlerters=3 -ListenIP=0.0.0.0 -HousekeepingFrequency=0 -# MaxHousekeeperDelete=0 -CacheSize=1G -StartDBSyncers=10 -HistoryCacheSize=512M -#HistoryIndexCacheSize=128M -TrendCacheSize=128M -ValueCacheSize=256M -Timeout=30 -# UnreachablePeriod=45 -# UnavailableDelay=60 -# UnreachableDelay=15 -AlertScriptsPath=/usr/lib/zabbix/alertscripts -ExternalScripts=/usr/lib/zabbix/externalscripts -FpingLocation=/usr/bin/fping -LogSlowQueries=3000 -# TmpDir=/tmp -StartProxyPollers=0 -# ProxyConfigFrequency=3600 -# ProxyDataFrequency=1 -AllowRoot=1 -# User=zabbix -# Include=/usr/local/etc/zabbix_server.conf.d/ +LogFile=/var/log/zabbix/zabbix_server.log +LogFileSize=1 +DebugLevel=1 +PidFile=/var/run/zabbix/zabbix_server.pid +DBHost=localhost +DBName=zabbix +DBUser=zabbix +DBPassword=password +DBSocket=/var/run/mysqld/mysqld.sock +# DBPort= +StartPollers=32 +# StartPreprocessors=3 +StartPollersUnreachable=16 +StartTrappers=15 +StartPingers=32 +# StartDiscoverers=1 +StartHTTPPollers=0 +StartEscalators=10 +# StartAlerters=3 +ListenIP=0.0.0.0 +HousekeepingFrequency=0 +# MaxHousekeeperDelete=0 +CacheSize=1G +StartDBSyncers=10 +HistoryCacheSize=512M +#HistoryIndexCacheSize=128M +TrendCacheSize=128M +ValueCacheSize=256M +Timeout=30 +# UnreachablePeriod=45 +# UnavailableDelay=60 +# UnreachableDelay=15 +AlertScriptsPath=/usr/lib/zabbix/alertscripts +ExternalScripts=/usr/lib/zabbix/externalscripts +FpingLocation=/usr/bin/fping +LogSlowQueries=3000 +# TmpDir=/tmp +StartProxyPollers=0 +# ProxyConfigFrequency=3600 +# ProxyDataFrequency=1 +AllowRoot=1 +# User=zabbix +# Include=/usr/local/etc/zabbix_server.conf.d/ StatsAllowedIP=127.0.0.1 \ No newline at end of file