Files
zabbix-mining/template-antminer-s9.yaml
T

525 lines
16 KiB
YAML
Raw Normal View History

2022-04-17 07:21:16 +08:00
zabbix_export:
version: '5.2'
date: '2022-04-16T23:16:24Z'
groups:
-
name: 'AntMiner S9'
templates:
-
template: 'AntMiner S9'
name: 'AntMiner S9'
groups:
-
name: 'AntMiner S9'
applications:
-
name: AntMinerS9
-
name: AntMinerS9All
-
name: AntMinerS9Pool
items:
-
name: CompileTime
type: DEPENDENT
key: AntMinerS9.CompileTime
delay: '0'
history: 1d
trends: '0'
status: DISABLED
value_type: TEXT
applications:
-
name: AntMinerS9
preprocessing:
-
type: JSONPATH
parameters:
- '$[0][''CompileTime'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Elapsed
type: DEPENDENT
key: AntMinerS9.Elapsed
delay: '0'
history: 1d
trends: 1d
units: s
applications:
-
name: AntMinerS9
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''Elapsed'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Fan5
type: DEPENDENT
key: AntMinerS9.Fan5
delay: '0'
history: 1d
trends: 1d
units: RPM
applications:
-
name: AntMinerS9
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''fan5'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Fan6
type: DEPENDENT
key: AntMinerS9.Fan6
delay: '0'
history: 1d
trends: 1d
units: RPM
applications:
-
name: AntMinerS9
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''fan6'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Fan_num
type: DEPENDENT
key: AntMinerS9.Fan_num
delay: '0'
history: 1d
trends: 1d
applications:
-
name: AntMinerS9
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''fan_num'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Hashrate
type: DEPENDENT
key: AntMinerS9.Hashrate
delay: '0'
history: 1d
trends: 1d
value_type: FLOAT
units: TH/s
applications:
-
name: AntMinerS9
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''GHS 5s'']'
-
type: MULTIPLIER
parameters:
- '0.001'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Hashrate6
type: DEPENDENT
key: AntMinerS9.Hashrate6
delay: '0'
history: 1d
trends: 1d
value_type: FLOAT
units: TH/s
applications:
-
name: AntMinerS9
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''chain_rate6'']'
-
type: MULTIPLIER
parameters:
- '0.001'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Hashrate7
type: DEPENDENT
key: AntMinerS9.Hashrate7
delay: '0'
history: 1d
trends: 1d
value_type: FLOAT
units: TH/s
applications:
-
name: AntMinerS9
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''chain_rate7'']'
-
type: MULTIPLIER
parameters:
- '0.001'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Hashrate8
type: DEPENDENT
key: AntMinerS9.Hashrate8
delay: '0'
history: 1d
trends: 1d
value_type: FLOAT
units: TH/s
applications:
-
name: AntMinerS9
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''chain_rate8'']'
-
type: MULTIPLIER
parameters:
- '0.001'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: LastOnline_pool1
type: DEPENDENT
key: AntMinerS9.LS_online_pool1
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
applications:
-
name: AntMinerS9Pool
preprocessing:
-
type: JSONPATH
parameters:
- '$[0][''Stratum Active'']'
master_item:
key: 'Miner["pools", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: LastOnline_pool2
type: DEPENDENT
key: AntMinerS9.LS_online_pool2
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
applications:
-
name: AntMinerS9Pool
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''Stratum Active'']'
master_item:
key: 'Miner["pools", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: LastOnline_pool3
type: DEPENDENT
key: AntMinerS9.LS_online_pool3
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
applications:
-
name: AntMinerS9Pool
preprocessing:
-
type: JSONPATH
parameters:
- '$[2][''Stratum Active'']'
master_item:
key: 'Miner["pools", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: LastTime_pool1
type: DEPENDENT
key: AntMinerS9.LS_pool1
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
applications:
-
name: AntMinerS9Pool
preprocessing:
-
type: JSONPATH
parameters:
- '$[0][''Last Share Time'']'
-
type: JAVASCRIPT
parameters:
- |
var $123 = (value.replace(/:/g,''));
return $123;
master_item:
key: 'Miner["pools", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: LastTime_pool2
type: DEPENDENT
key: AntMinerS9.LS_pool2
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
applications:
-
name: AntMinerS9Pool
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''Last Share Time'']'
-
type: JAVASCRIPT
parameters:
- |
var $123 = (value.replace(/:/g,''));
return $123;
master_item:
key: 'Miner["pools", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: LastTime_pool3
type: DEPENDENT
key: AntMinerS9.LS_pool3
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
applications:
-
name: AntMinerS9Pool
preprocessing:
-
type: JSONPATH
parameters:
- '$[2][''Last Share Time'']'
-
type: JAVASCRIPT
parameters:
- |
var $123 = (value.replace(/:/g,''));
return $123;
master_item:
key: 'Miner["pools", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Temp6
type: DEPENDENT
key: AntMinerS9.Temp6
delay: '0'
history: 1d
trends: 1d
units: C
applications:
-
name: AntMinerS9
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''temp2_6'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Temp7
type: DEPENDENT
key: AntMinerS9.Temp7
delay: '0'
history: 1d
trends: 1d
units: C
applications:
-
name: AntMinerS9
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''temp2_7'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Temp8
type: DEPENDENT
key: AntMinerS9.Temp8
delay: '0'
history: 1d
trends: 1d
units: C
applications:
-
name: AntMinerS9
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''temp2_8'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Type
type: DEPENDENT
key: AntMinerS9.Type
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
inventory_link: TYPE
applications:
-
name: AntMinerS9
preprocessing:
-
type: JSONPATH
parameters:
- '$[0][''Type'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: UP_DOwn
type: SIMPLE
key: icmpping
delay: 60s
history: 1d
trends: 1d
applications:
-
name: AntMinerS9
valuemap:
name: 'Service state'
-
name: AntMinerGetAllpool
type: EXTERNAL
key: 'Miner["pools", "{HOST.CONN}", "{$HOST.PORT}"]'
delay: 300s
history: '0'
trends: '0'
value_type: TEXT
applications:
-
name: AntMinerS9Pool
-
name: AntMinerGetAllstats
type: EXTERNAL
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
delay: 300s
history: '0'
trends: '0'
value_type: TEXT
applications:
-
name: AntMinerS9All
-
name: Asic
type: SIMPLE
key: 'net.tcp.service[tcp,,4028]'
delay: 60s
history: 1d
trends: 1d
applications:
-
name: AntMinerS9
valuemap:
name: 'Service state'
macros:
-
macro: '{$FAN_LOW}'
value: '800'
-
macro: '{$HASH_LOW}'
value: '11'
-
macro: '{$HOST.PORT}'
value: '4028'
-
macro: '{$LS_TIME}'
value: '1000'
-
macro: '{$TEMP_LOW}'
value: '90'
-
macro: '{$UNAME}'
value: root
-
macro: '{$UPASS}'
value: Okey123
triggers:
-
expression: '({AntMiner S9:AntMinerS9.Hashrate.nodata(15m)}=1 or {AntMiner S9:AntMinerS9.Hashrate.last(5m)}=0) and {AntMiner S9:icmpping.last()}=1'
name: 'AntMiner S9 Hashrate information not available on {HOST.NAME}'
priority: HIGH
manual_close: 'YES'
-
expression: '({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_mode: RECOVERY_EXPRESSION
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'
name: 'AntMiner S9 High temp on {HOST.NAME}'
priority: AVERAGE
manual_close: 'YES'
-
expression: '{AntMiner S9:icmpping.max(#3)}=0 and {AntMiner S9:net.tcp.service[tcp,,4028].last(#3)}=0'
recovery_mode: RECOVERY_EXPRESSION
recovery_expression: '{AntMiner S9:icmpping.last()}=1 or {AntMiner S9:net.tcp.service[tcp,,4028].last()}=1'
name: 'AntMiner S9 Host DOWN {HOST.NAME}'
priority: DISASTER
manual_close: 'YES'
-
expression: '(({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'
name: 'AntMiner S9 low fan speed {HOST.NAME}'
manual_close: 'YES'
-
expression: '(({AntMiner S9:AntMinerS9.Hashrate.last()}<{$HASH_LOW} and {AntMiner S9:AntMinerS9.Hashrate.last()}>0) and {AntMiner S9:AntMinerS9.Elapsed.last()}>600) and ({AntMiner S9:icmpping.last()}=1 and {AntMiner S9:net.tcp.service[tcp,,4028].last()}=1)'
recovery_mode: RECOVERY_EXPRESSION
recovery_expression: '{AntMiner S9:AntMinerS9.Hashrate.last()}>{$HASH_LOW} or {AntMiner S9:AntMinerS9.Hashrate.nodata(15m)}=1 or {AntMiner S9:icmpping.last()}=0'
name: 'AntMiner S9 Low hashrate on {HOST.NAME}'
priority: WARNING
manual_close: 'YES'
-
expression: '({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_mode: RECOVERY_EXPRESSION
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})'
name: 'AntMiner S9 превышено время шары {HOST.NAME}'
priority: INFO
-
expression: '({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_mode: RECOVERY_EXPRESSION
recovery_expression: '{AntMiner S9:AntMinerS9.Fan_num.last()}=2'
name: 'Асик завис !!!'
status: DISABLED
manual_close: 'YES'
value_maps:
-
name: 'Service state'
mappings:
-
value: '0'
newvalue: Down
-
value: '1'
newvalue: Up