-
Notifications
You must be signed in to change notification settings - Fork 2
/
NBMiner.yaml
332 lines (332 loc) · 10.2 KB
/
NBMiner.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
zabbix_export:
version: '5.4'
date: '2024-02-23T18:05:03Z'
groups:
-
uuid: 5a3b4210defe473da9627b2ca03e360c
name: Templates/Mining
templates:
-
uuid: f613a40fcb6a4ba28d40aa35e993c670
template: NBMiner
name: NBMiner
groups:
-
name: Templates/Mining
items:
-
uuid: 0159756acd0b4da79915369f3e962f9b
name: 'ICMP ping'
type: SIMPLE
key: icmpping
history: 1w
valuemap:
name: 'Service state'
tags:
-
tag: Application
value: Status
triggers:
-
uuid: d964afc4938c46c594ea0da2d3cb2106
expression: 'max(/NBMiner/icmpping,#3)=0'
name: 'Unavailable by ICMP ping'
priority: HIGH
description: 'Last three attempts returned timeout. Please check device connectivity.'
-
uuid: 24ceda7a617a4b759a8a7072754581c5
name: 'ICMP loss'
type: SIMPLE
key: icmppingloss
history: 1w
value_type: FLOAT
units: '%'
tags:
-
tag: Application
value: Status
triggers:
-
uuid: d15ac5315d244d9c80505f3e31b5d6a6
expression: 'min(/NBMiner/icmppingloss,5m)>{$ICMP_LOSS_WARN} and min(/NBMiner/icmppingloss,5m)<100'
name: 'High ICMP ping loss'
opdata: 'Loss: {ITEM.LASTVALUE1}'
priority: WARNING
dependencies:
-
name: 'Unavailable by ICMP ping'
expression: 'max(/NBMiner/icmpping,#3)=0'
-
uuid: 1629d62aca8748f28cdf9f88f5e6529c
name: 'ICMP response time'
type: SIMPLE
key: icmppingsec
history: 1w
value_type: FLOAT
units: s
tags:
-
tag: Application
value: Status
triggers:
-
uuid: 68de5bf953944b738b738a82fd82bee0
expression: 'avg(/NBMiner/icmppingsec,5m)>{$ICMP_RESPONSE_TIME_WARN}'
name: 'High ICMP ping response time'
opdata: 'Value: {ITEM.LASTVALUE1}'
priority: WARNING
dependencies:
-
name: 'High ICMP ping loss'
expression: 'min(/NBMiner/icmppingloss,5m)>{$ICMP_LOSS_WARN} and min(/NBMiner/icmppingloss,5m)<100'
-
name: 'Unavailable by ICMP ping'
expression: 'max(/NBMiner/icmpping,#3)=0'
-
uuid: e99e8ecfd4da4f2c9989e3edbfad9602
name: 'Total hashrate'
type: DEPENDENT
key: miner.total_hashrate
delay: '0'
value_type: FLOAT
preprocessing:
-
type: JSONPATH
parameters:
- $.miner.total_hashrate_raw
master_item:
key: nbminer.json
triggers:
-
uuid: cb05d6b79f71477c857e32af824f7791
expression: 'avg(/NBMiner/miner.total_hashrate,1h)<{$HASHRATE}'
name: 'Hashrate too low (exp. {$HASHRATE})'
opdata: '{ITEM.LASTVALUE1}'
priority: AVERAGE
-
uuid: d5dd4a0f8b564fe7a1f30def25007630
expression: 'nodata(/NBMiner/miner.total_hashrate,10m)=1'
name: 'NBMiner is silent'
priority: AVERAGE
description: 'Триггер срабатывает в случае, если процесс NBMiner присутствует, но ничего не делает (подвис, полностью отвалился)'
-
uuid: b8a58a19a927415bb8dfd7eba9e97680
name: 'Total power consume'
type: DEPENDENT
key: miner.total_power_consume
delay: '0'
units: W
preprocessing:
-
type: JSONPATH
parameters:
- $.miner.total_power_consume
master_item:
key: nbminer.json
-
uuid: 9863335995224bfcacf9fa8fb37ac886
name: 'NBMiner stats'
type: ZABBIX_ACTIVE
key: nbminer.json
delay: 4m
history: '0'
trends: '0'
value_type: TEXT
-
uuid: 4d30de8f3ff04f25a6c6695de865853c
name: 'NBMiner version'
type: DEPENDENT
key: nbminer.version
delay: '0'
trends: '0'
value_type: CHAR
inventory_link: SOFTWARE
preprocessing:
-
type: JSONPATH
parameters:
- $.version
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 12h
master_item:
key: nbminer.json
triggers:
-
uuid: 4a597106b63c4253a033661b3aba04d8
expression: 'last(/NBMiner/nbminer.version,#1)<>last(/NBMiner/nbminer.version,#2)'
name: 'NBMiner version changed'
priority: INFO
manual_close: 'YES'
-
uuid: 7de4f4f2afec402898089a65460cc747
name: 'NBMiner process'
type: ZABBIX_ACTIVE
key: 'proc.num[nbminer]'
triggers:
-
uuid: c29603c3d52148ec8ee946e0c073b371
expression: 'last(/NBMiner/proc.num[nbminer])=0'
name: 'NBMiner lost'
priority: AVERAGE
description: 'Майнер не запущен (либо еще не стартовал, либо уже упал совсем)'
discovery_rules:
-
uuid: a94191716b7049bbaec91fe703f13b8c
name: 'Devices discovery'
type: DEPENDENT
key: miner.devices.discovery
delay: '0'
item_prototypes:
-
uuid: bf3ab254f203404cb9d33b192deb00a5
name: 'Device "{#DEVID}" fan speed'
type: DEPENDENT
key: 'miner.device.fan[{#DEVID}]'
delay: '0'
units: '%'
preprocessing:
-
type: JSONPATH
parameters:
- '$..[{#DEVID}].fan.first()'
master_item:
key: nbminer.json
-
uuid: 7a3a717938f043eab514b4fd4d79c5b0
name: 'Device "{#DEVID}" hashrate'
type: DEPENDENT
key: 'miner.device.hashrate_raw[{#DEVID}]'
delay: '0'
value_type: FLOAT
units: h
preprocessing:
-
type: JSONPATH
parameters:
- '$..[{#DEVID}].hashrate_raw.first()'
master_item:
key: nbminer.json
-
uuid: 1500f22dac3c41dba608b2fd71ada5d2
name: 'Device "{#DEVID}" name'
type: DEPENDENT
key: 'miner.device.info[{#DEVID}]'
delay: '0'
trends: '0'
value_type: CHAR
preprocessing:
-
type: JSONPATH
parameters:
- '$..[{#DEVID}].info.first()'
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 1d
master_item:
key: nbminer.json
-
uuid: fa4928c64f754091ade4efbb976e0190
name: 'Device "{#DEVID}" power'
type: DEPENDENT
key: 'miner.device.power[{#DEVID}]'
delay: '0'
units: W
preprocessing:
-
type: JSONPATH
parameters:
- '$.miner.devices.[{#DEVID}].power'
master_item:
key: nbminer.json
-
uuid: dc6ec49d370a4c20b474e91550ca965a
name: 'Device "{#DEVID}" temperature'
type: DEPENDENT
key: 'miner.device.temperature[{#DEVID}]'
delay: '0'
units: C
preprocessing:
-
type: JSONPATH
parameters:
- '$.miner.devices.[{#DEVID}].temperature'
master_item:
key: nbminer.json
graph_prototypes:
-
uuid: b07c234aab34493c9907797ca25ab006
name: Hashrate
graph_items:
-
sortorder: '1'
color: 1A7C11
item:
host: NBMiner
key: 'miner.device.hashrate_raw[{#DEVID}]'
master_item:
key: nbminer.json
lld_macro_paths:
-
lld_macro: '{#DEVID}'
path: $.id
preprocessing:
-
type: JSONPATH
parameters:
- '$.miner.devices.[*]'
macros:
-
macro: '{$HASHRATE}'
value: '350000000'
-
macro: '{$ICMP_LOSS_WARN}'
value: '20'
-
macro: '{$ICMP_RESPONSE_TIME_WARN}'
value: '0.15'
valuemaps:
-
uuid: e8ac1e8243cd4a1596de559f6cd8bc72
name: 'Service state'
mappings:
-
value: '0'
newvalue: Down
-
value: '1'
newvalue: Up
graphs:
-
uuid: e8f5db6db41e404e94a9c67e9cbd2e38
name: 'ICMP ping'
graph_items:
-
sortorder: '1'
drawtype: BOLD_LINE
color: 1A7C11
item:
host: NBMiner
key: icmppingsec
-
uuid: 91b184884c284723b9103edea0475d1b
name: 'Total hashrate'
graph_items:
-
sortorder: '1'
color: 1A7C11
item:
host: NBMiner
key: miner.total_hashrate
-
uuid: 7e95bd16225242e7bc0ff58372065daa
name: 'Total power consume'
graph_items:
-
sortorder: '1'
color: FF7043
item:
host: NBMiner
key: miner.total_power_consume