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

555 lines
17 KiB
YAML
Raw Normal View History

2022-04-17 07:21:16 +08:00
zabbix_export:
version: '5.2'
date: '2022-04-16T23:18:06Z'
groups:
-
name: 'Antminer T17'
templates:
-
template: 'AntMiner T17'
name: 'AntMiner T17'
groups:
-
name: 'Antminer T17'
applications:
-
name: AntMinerT17
-
name: AntMinerT17All
-
name: AntMinerT17Pool
items:
-
name: CompileTime
type: DEPENDENT
key: AntMinerT17.CompileTime
delay: '0'
history: 1d
trends: '0'
status: DISABLED
value_type: TEXT
applications:
-
name: AntMinerT17
preprocessing:
-
type: JSONPATH
parameters:
- '$[0][''CompileTime'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Elapsed
type: DEPENDENT
key: AntMinerT17.Elapsed
delay: '0'
history: 1d
trends: 1d
units: s
applications:
-
name: AntMinerT17
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''Elapsed'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Fan1
type: DEPENDENT
key: AntMinerT17.Fan1
delay: '0'
history: 1d
trends: 1d
units: RPM
applications:
-
name: AntMinerT17
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''fan1'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Fan2
type: DEPENDENT
key: AntMinerT17.Fan2
delay: '0'
history: 1d
trends: 1d
units: RPM
applications:
-
name: AntMinerT17
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''fan2'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Fan3
type: DEPENDENT
key: AntMinerT17.Fan3
delay: '0'
history: 1d
trends: 1d
units: RPM
applications:
-
name: AntMinerT17
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''fan3'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Fan4
type: DEPENDENT
key: AntMinerT17.Fan4
delay: '0'
history: 1d
trends: 1d
units: RPM
applications:
-
name: AntMinerT17
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''fan4'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Fan_num
type: DEPENDENT
key: AntMinerT17.Fan_num
delay: '0'
history: 1d
trends: 1d
applications:
-
name: AntMinerT17
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''fan_num'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Hashrate
type: DEPENDENT
key: AntMinerT17.Hashrate
delay: '0'
history: 1d
trends: 1d
value_type: FLOAT
units: TH/s
applications:
-
name: AntMinerT17
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''GHS 5s'']'
-
type: MULTIPLIER
parameters:
- '0.001'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Hashrate5
type: DEPENDENT
key: AntMinerT17.Hashrate5
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: Hashrate6
type: DEPENDENT
key: AntMinerT17.Hashrate6
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: Hashrate7
type: DEPENDENT
key: AntMinerT17.Hashrate7
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
key: AntMinerT17.LS_online_pool1
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
applications:
-
name: AntMinerT17Pool
preprocessing:
-
type: JSONPATH
parameters:
- '$[0][''Stratum Active'']'
master_item:
key: 'Miner["pools", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: LastOnline_pool2
type: DEPENDENT
key: AntMinerT17.LS_online_pool2
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
applications:
-
name: AntMinerT17Pool
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''Stratum Active'']'
master_item:
key: 'Miner["pools", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: LastOnline_pool3
type: DEPENDENT
key: AntMinerT17.LS_online_pool3
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
applications:
-
name: AntMinerT17Pool
preprocessing:
-
type: JSONPATH
parameters:
- '$[2][''Stratum Active'']'
master_item:
key: 'Miner["pools", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: LastTime_pool1
type: DEPENDENT
key: AntMinerT17.LS_pool1
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
applications:
-
name: AntMinerT17Pool
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: AntMinerT17.LS_pool2
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
applications:
-
name: AntMinerT17Pool
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: AntMinerT17.LS_pool3
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
applications:
-
name: AntMinerT17Pool
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: Temp1
type: DEPENDENT
key: AntMinerT17.Temp1
delay: '0'
history: 1d
trends: 1d
units: C
applications:
-
name: AntMinerT17
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''temp2_1'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Temp2
type: DEPENDENT
key: AntMinerT17.Temp2
delay: '0'
history: 1d
trends: 1d
units: C
applications:
-
name: AntMinerT17
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''temp2_2'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Temp3
type: DEPENDENT
key: AntMinerT17.Temp3
delay: '0'
history: 1d
trends: 1d
units: C
applications:
-
name: AntMinerT17
preprocessing:
-
type: JSONPATH
parameters:
- '$[1][''temp2_3'']'
master_item:
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
-
name: Type
type: DEPENDENT
key: AntMinerT17.Type
delay: '0'
history: 1d
trends: '0'
value_type: TEXT
inventory_link: TYPE
applications:
-
name: AntMinerT17
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: AntMinerT17
valuemap:
name: 'Service state'
-
name: AntMinerGetAllpool
type: EXTERNAL
key: 'Miner["pools", "{HOST.CONN}", "{$HOST.PORT}"]'
delay: 300s
history: 0d
trends: '0'
value_type: TEXT
applications:
-
name: AntMinerT17Pool
-
name: AntMinerGetAllstats
type: EXTERNAL
key: 'Miner["stats", "{HOST.CONN}", "{$HOST.PORT}"]'
delay: 300s
history: 0d
trends: '0'
value_type: TEXT
applications:
-
name: AntMinerT17All
-
name: Asic
type: SIMPLE
key: 'net.tcp.service[tcp,,4028]'
delay: 60s
history: 1d
trends: 1d
applications:
-
name: AntMinerT17
valuemap:
name: 'Service state'
macros:
-
macro: '{$FAN_LOW}'
value: '500'
-
macro: '{$HASH_LOW}'
value: '27'
-
macro: '{$HOST.PORT}'
value: '4028'
-
macro: '{$LS_TIME}'
value: '1000'
-
macro: '{$TEMP_LOW}'
value: '90'
-
macro: '{$UNAME}'
value: root
-
macro: '{$UPASS}'
type: SECRET_TEXT
triggers:
-
expression: '({AntMiner T17:AntMinerT17.Hashrate.nodata(15m)}=1 or {AntMiner T17:AntMinerT17.Hashrate.last(5m)}=0) and {AntMiner T17:icmpping.last()}=1'
name: 'AntMiner T17 Hashrate information not available on {HOST.NAME}'
priority: HIGH
manual_close: 'YES'
-
expression: '({AntMiner T17:AntMinerT17.Temp1.min(15m)}>{$TEMP_LOW} or {AntMiner T17:AntMinerT17.Temp2.min(15m)}>{$TEMP_LOW} or {AntMiner T17:AntMinerT17.Temp3.min(15m)}>{$TEMP_LOW}) and {AntMiner T17:icmpping.last()}=1'
recovery_mode: RECOVERY_EXPRESSION
recovery_expression: '({AntMiner T17:AntMinerT17.Temp1.last()}<{$TEMP_LOW} or {AntMiner T17:AntMinerT17.Temp2.last()}<{$TEMP_LOW} or {AntMiner T17:AntMinerT17.Temp3.last()}<{$TEMP_LOW}) and {AntMiner T17:icmpping.last()}=1'
name: 'AntMiner T17 High temp on {HOST.NAME}'
priority: AVERAGE
manual_close: 'YES'
-
expression: '{AntMiner T17:icmpping.max(#3)}=0 and {AntMiner T17:net.tcp.service[tcp,,4028].last(#3)}=0'
recovery_mode: RECOVERY_EXPRESSION
recovery_expression: '{AntMiner T17:icmpping.last()}=1 or {AntMiner T17:net.tcp.service[tcp,,4028].last()}=1'
name: 'AntMiner T17 Host DOWN {HOST.NAME}'
priority: DISASTER
manual_close: 'YES'
-
expression: '(({AntMiner T17:AntMinerT17.Fan1.last()}<{$FAN_LOW} and {AntMiner T17:AntMinerT17.Fan1.last(#2)}<{$FAN_LOW} and {AntMiner T17:AntMinerT17.Fan1.last(#3)}<{$FAN_LOW}) or ({AntMiner T17:AntMinerT17.Fan2.last()}<{$FAN_LOW} and {AntMiner T17:AntMinerT17.Fan2.last(#2)}<{$FAN_LOW} and {AntMiner T17:AntMinerT17.Fan2.last(#3)}<{$FAN_LOW}) or ({AntMiner T17:AntMinerT17.Fan3.last()}<{$FAN_LOW} and {AntMiner T17:AntMinerT17.Fan3.last(#2)}<{$FAN_LOW} and {AntMiner T17:AntMinerT17.Fan3.last(#3)}<{$FAN_LOW}) or ({AntMiner T17:AntMinerT17.Fan4.last()}<{$FAN_LOW} and {AntMiner T17:AntMinerT17.Fan4.last(#2)}<{$FAN_LOW} and {AntMiner T17:AntMinerT17.Fan4.last(#3)}<{$FAN_LOW})) and {AntMiner T17:icmpping.last()}=1'
name: 'AntMiner T17 low fan speed {HOST.NAME}'
manual_close: 'YES'
-
expression: '(({AntMiner T17:AntMinerT17.Hashrate.last()}<{$HASH_LOW} and {AntMiner T17:AntMinerT17.Hashrate.last()} > 0) and {AntMiner T17:AntMinerT17.Elapsed.last()}>600) and ({AntMiner T17:icmpping.last()}=1 and {AntMiner T17:net.tcp.service[tcp,,4028].last()}=1)'
recovery_mode: RECOVERY_EXPRESSION
recovery_expression: '{AntMiner T17:AntMinerT17.Hashrate.last()}>{$HASH_LOW} or {AntMiner T17:AntMinerT17.Hashrate.nodata(15m)}=1'
name: 'AntMiner T17 Low hashrate on {HOST.NAME}'
priority: WARNING
manual_close: 'YES'
-
expression: '({AntMiner T17:icmpping.max(#1)}=1 and {AntMiner T17:net.tcp.service[tcp,,4028].last()}=1) and ({AntMiner T17:AntMinerT17.LS_online_pool1.str(true, #3)}=1 and {AntMiner T17:AntMinerT17.LS_pool1.last()}>{$LS_TIME}) or ({AntMiner T17:AntMinerT17.LS_online_pool2.str(true, #3)}=1 and {AntMiner T17:AntMinerT17.LS_pool2.last()}>{$LS_TIME}) or ({AntMiner T17:AntMinerT17.LS_online_pool3.str(true, #3)}=1 and {AntMiner T17:AntMinerT17.LS_pool3.last()}>{$LS_TIME})'
recovery_mode: RECOVERY_EXPRESSION
recovery_expression: '({AntMiner T17:AntMinerT17.LS_online_pool1.str(true, #3)}=1 and {AntMiner T17:AntMinerT17.LS_pool1.last()}<{$LS_TIME}) or ({AntMiner T17:AntMinerT17.LS_online_pool2.str(true, #3)}=1 and {AntMiner T17:AntMinerT17.LS_pool2.last()}<{$LS_TIME}) or ({AntMiner T17:AntMinerT17.LS_online_pool3.str(true, #3)}=1 and {AntMiner T17:AntMinerT17.LS_pool3.last()}<{$LS_TIME})'
name: 'AntMiner T17 превышено время шары {HOST.NAME}'
priority: INFO
manual_close: 'YES'
value_maps:
-
name: 'Service state'
mappings:
-
value: '0'
newvalue: Down
-
value: '1'
newvalue: Up