-
Notifications
You must be signed in to change notification settings - Fork 127
/
Template_3.4_HDD_SMARTMONTOOLS_2_WITH_LLD.xml
1689 lines (1689 loc) · 98 KB
/
Template_3.4_HDD_SMARTMONTOOLS_2_WITH_LLD.xml
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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>3.4</version>
<date>2019-04-23T12:27:05Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
<template>
<template>Template_HDD_SMARTMONTOOLS_2_WITH_LLD</template>
<name>Template_HDD_SMARTMONTOOLS_2_WITH_LLD</name>
<description>https://github.com/v-zhuravlev/zbx-smartctl
3.4 version with dependent items. Please check your UserParameters.
Template version: v1.5</description>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<applications>
<application>
<name>SMART monitoring (smartctl)</name>
</application>
</applications>
<items/>
<discovery_rules>
<discovery_rule>
<name>smartctl-disks-discovery (HDD)</name>
<type>0</type>
<snmp_community/>
<snmp_oid/>
<key>uHDD.discovery["{$SMARTCTL_STATIC_DISKS}"]</key>
<delay>1h</delay>
<status>0</status>
<allowed_hosts/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<filter>
<evaltype>0</evaltype>
<formula/>
<conditions>
<condition>
<macro>{#SMART_ENABLED}</macro>
<value>1</value>
<operator>8</operator>
<formulaid>B</formulaid>
</condition>
<condition>
<macro>{#DISKTYPE}</macro>
<value>0</value>
<operator>8</operator>
<formulaid>A</formulaid>
</condition>
</conditions>
</filter>
<lifetime>30d</lifetime>
<description>SMARTCTL_STATIC_DISKS - add additional disks in this macro with -d option. Replace all spaces with '_' inside each disk command. Separate multiple disks with space.
For example, to discover 2 drives behind hardware RAID, set this macro on the host level:
SMARTCTL_STATIC_DISKS = /dev/sda_-d_sat+megaraid,00 /dev/sda_-d_sat+megaraid,01
Useful for disks that cannot be easily discovered such as disks hidden behind RAID or when agent is installed on Windows or Mac where automatic discovery is not so powerful.
Setting this macro doesn't prevent any automatic attempts to discover disks using smartctl --scan-open and so on.</description>
<item_prototypes>
<item_prototype>
<name>{#DISKNAME}: smartctl</name>
<type>0</type>
<snmp_community/>
<snmp_oid/>
<key>uHDD.get["{#DISKCMD}"]</key>
<delay>5m</delay>
<history>1d</history>
<trends>0</trends>
<status>0</status>
<value_type>4</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SMART monitoring (smartctl)</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<application_prototypes/>
<master_item_prototype/>
</item_prototype>
<item_prototype>
<name>{#DISKNAME}: Test result</name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>uHDD.health["{#DISKCMD}"]</key>
<delay>0</delay>
<history>7d</history>
<trends>0</trends>
<status>0</status>
<value_type>1</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SMART monitoring (smartctl)</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>(?:SMART overall-health self-assessment test result:|SMART Health Status:) +\b([\S ]+)
\1</params>
</step>
</preprocessing>
<jmx_endpoint/>
<application_prototypes/>
<master_item_prototype>
<key>uHDD.get["{#DISKCMD}"]</key>
</master_item_prototype>
</item_prototype>
<item_prototype>
<name>{#DISKNAME}: Device model</name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>uHDD.model.["{#DISKCMD}"]</key>
<delay>0</delay>
<history>7d</history>
<trends>0</trends>
<status>0</status>
<value_type>1</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SMART monitoring (smartctl)</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>(?:Vendor: +(.+)\nProduct:|[Dd]evice [Mm]odel:|[Mm]odel [Nn]umber:) +(.+)
\1 \2</params>
</step>
<step>
<type>3</type>
<params><![CDATA[ ]]></params>
</step>
</preprocessing>
<jmx_endpoint/>
<application_prototypes/>
<master_item_prototype>
<key>uHDD.get["{#DISKCMD}"]</key>
</master_item_prototype>
</item_prototype>
<item_prototype>
<name>{#DISKNAME}: Serial number</name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>uHDD.sn.["{#DISKCMD}"]</key>
<delay>0</delay>
<history>7d</history>
<trends>0</trends>
<status>0</status>
<value_type>1</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SMART monitoring (smartctl)</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>[Ss]erial [Nn]umber: +(.+)
\1</params>
</step>
</preprocessing>
<jmx_endpoint/>
<application_prototypes/>
<master_item_prototype>
<key>uHDD.get["{#DISKCMD}"]</key>
</master_item_prototype>
</item_prototype>
<item_prototype>
<name>{#DISKNAME}: ID 5 Reallocated sectors count</name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>uHDD["{#DISKCMD}",5 Reallocated]</key>
<delay>0</delay>
<history>7d</history>
<trends>0</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>Count of reallocated sectors. The raw value represents a count of the bad sectors that have been found and remapped.Thus, the higher the attribute value, the more sectors the drive has had to reallocate. This value is primarily used as a metric of the life expectancy of the drive; a drive which has had any reallocations at all is significantly more likely to fail in the immediate months.
https://en.wikipedia.org/wiki/S.M.A.R.T.#Known_ATA_S.M.A.R.T._attributes
For SATA disks, mapped to 'ID 5 Reallocated Sectors Count'
For Kingston disks, mapped to 'ID 5 Retired Block Count'
For SAS disks, number of 'Elements in grown defect list' is used.</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SMART monitoring (smartctl)</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>(?:5 Reallocate.+|5 Retired_Block_Count.+|Elements in grown defect list:)(?:[\t ]+)([0-9]+)
\1</params>
</step>
</preprocessing>
<jmx_endpoint/>
<application_prototypes/>
<master_item_prototype>
<key>uHDD.get["{#DISKCMD}"]</key>
</master_item_prototype>
</item_prototype>
<item_prototype>
<name>{#DISKNAME}: ID 197 Current pending sector count</name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>uHDD["{#DISKCMD}",Current_Pending_Sector]</key>
<delay>0</delay>
<history>7d</history>
<trends>0</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>SATA: ID 197 Current Pending Sector Count. Count of "unstable" sectors (waiting to be remapped, because of unrecoverable read errors). If an unstable sector is subsequently read successfully, the sector is remapped and this value is decreased. Read errors on a sector will not remap the sector immediately (since the correct value cannot be read and so the value to remap is not known, and also it might become readable later); instead, the drive firmware remembers that the sector needs to be remapped, and will remap it the next time it's written.
However, some drives will not immediately remap such sectors when written; instead the drive will first attempt to write to the problem sector and if the write operation is successful then the sector will be marked good (in this case, the "Reallocation Event Count" (0xC4) will not be increased). This is a serious shortcoming, for if such a drive contains marginal sectors that consistently fail only after some time has passed following a successful write operation, then the drive will never remap these problem sectors.
https://en.wikipedia.org/wiki/S.M.A.R.T.#Known_ATA_S.M.A.R.T._attributes
SAS: Not supported.</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SMART monitoring (smartctl)</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>197 Current_Pending_Sector.+ ([0-9]+)
\1</params>
</step>
</preprocessing>
<jmx_endpoint/>
<application_prototypes/>
<master_item_prototype>
<key>uHDD.get["{#DISKCMD}"]</key>
</master_item_prototype>
</item_prototype>
<item_prototype>
<name>{#DISKNAME}: ID 198 Uncorrectable errors count</name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>uHDD["{#DISKCMD}",Offline_Uncorrectable]</key>
<delay>0</delay>
<history>7d</history>
<trends>0</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>SATA: ID 198 (Offline) Uncorrectable Sector Count. The total count of uncorrectable errors when reading/writing a sector. A rise in the value of this attribute indicates defects of the disk surface and/or problems in the mechanical subsystem.
https://en.wikipedia.org/wiki/S.M.A.R.T.#Known_ATA_S.M.A.R.T._attributes
SAS: error counter log should be parsed with JS in Zabbix 4.2: read+write
"Error counter log
Errors Corrected by Total Correction Gigabytes Total
ECC rereads/ errors algorithm processed uncorrected
fast | delayed rewrites corrected invocations [10^9 bytes] errors
read: 2242530 24029 1718309 2266559 30372 409777.659 0
write: 1685701 2629 5464 1688330 2636 35228.365 0
verify: 4400 2 2 4402 2 432.531 0". Should be added to SSD as well.</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SMART monitoring (smartctl)</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>Offline_Uncorrectable.+ ([0-9]+)
\1</params>
</step>
</preprocessing>
<jmx_endpoint/>
<application_prototypes/>
<master_item_prototype>
<key>uHDD.get["{#DISKCMD}"]</key>
</master_item_prototype>
</item_prototype>
<item_prototype>
<name>{#DISKNAME}: ID 9 Power on hours</name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>uHDD["{#DISKCMD}",Power_On]</key>
<delay>0</delay>
<history>7d</history>
<trends>0</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units>s</units>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>Count of hours in power-on state. The raw value of this attribute shows total count of hours (or minutes, or seconds, depending on manufacturer) in power-on state.
"By default, the total expected lifetime of a hard disk in perfect condition is defined as 5 years (running every day and night on all days). This is equal to 1825 days in 24/7 mode or 43800 hours."
On some pre-2005 drives, this raw value may advance erratically and/or "wrap around" (reset to zero periodically).
https://en.wikipedia.org/wiki/S.M.A.R.T.#Known_ATA_S.M.A.R.T._attributes</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SMART monitoring (smartctl)</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>(?:Power_On_Hours.+ |Accumulated power on time, hours:minutes |Power On Hours:.+ )([0-9]+)
\1</params>
</step>
<step>
<type>1</type>
<params>3600</params>
</step>
</preprocessing>
<jmx_endpoint/>
<application_prototypes/>
<master_item_prototype>
<key>uHDD.get["{#DISKCMD}"]</key>
</master_item_prototype>
</item_prototype>
<item_prototype>
<name>{#DISKNAME}: ID 10 Spin retry count</name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>uHDD["{#DISKCMD}",Spin_Retry_Count]</key>
<delay>0</delay>
<history>7d</history>
<trends>0</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>SATA: ID 10 Spin_Retry_Count. Count of retry of spin start attempts. This attribute stores a total count of the spin start attempts to reach the fully operational speed (under the condition that the first attempt was unsuccessful). An increase of this attribute value is a sign of problems in the hard disk mechanical subsystem.</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SMART monitoring (smartctl)</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>10 Spin_Retry_Count.+ ([0-9]+)
\1</params>
</step>
</preprocessing>
<jmx_endpoint/>
<application_prototypes/>
<master_item_prototype>
<key>uHDD.get["{#DISKCMD}"]</key>
</master_item_prototype>
</item_prototype>
<item_prototype>
<name>{#DISKNAME}: ID 190/194 Temperature</name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>uHDD["{#DISKCMD}",Temperature_Celsius]</key>
<delay>0</delay>
<history>7d</history>
<trends>90d</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units>°C</units>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>Current drive temperature.
SATA: Parses value from attribute ID 194 or ID 190.
SAS: Supported
NVMe: Supported</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SMART monitoring (smartctl)</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>(?:194 Temperature[^\(\n]+|Airflow_Temperature[^\(\n]+|Drive Temperature:|Temperature:) +([0-9]+)
\1</params>
</step>
</preprocessing>
<jmx_endpoint/>
<application_prototypes/>
<master_item_prototype>
<key>uHDD.get["{#DISKCMD}"]</key>
</master_item_prototype>
</item_prototype>
<item_prototype>
<name>{#DISKNAME}: ID 199 CRC error count</name>
<type>18</type>
<snmp_community/>
<snmp_oid/>
<key>uHDD["{#DISKCMD}",UDMA_CRC_Error]</key>
<delay>0</delay>
<history>7d</history>
<trends>0</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>SATA: ID 199 CRC Error Count. The count of errors in data transfer via the interface cable as determined by ICRC (Interface Cyclic Redundancy Check).
SAS: mapped to 'Non-medium error count'
NVMe: mapped to 'Media and Data Integrity Errors'</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>SMART monitoring (smartctl)</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type>5</type>
<params>(?:UDMA_CRC_Error|CRC_Error_Count|Non-medium error count:|Media and Data Integrity Errors:).+ ([0-9]+)
\1</params>
</step>
</preprocessing>
<jmx_endpoint/>
<application_prototypes/>
<master_item_prototype>
<key>uHDD.get["{#DISKCMD}"]</key>
</master_item_prototype>
</item_prototype>
</item_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.sn.["{#DISKCMD}"].diff()}=1 and {Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.sn.["{#DISKCMD}"].strlen()}>0</expression>
<recovery_mode>2</recovery_mode>
<recovery_expression/>
<name>{#DISKNAME}: Disk has been replaced (new serial number received)</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>1</priority>
<description>Last value: {ITEM.LASTVALUE1}.
Device serial number has changed. Ack to close</description>
<type>0</type>
<manual_close>1</manual_close>
<dependencies/>
<tags/>
</trigger_prototype>
<trigger_prototype>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD["{#DISKCMD}",Temperature_Celsius].avg(5m)}>{$TEMP_CRIT:"HDD"} and
{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD["{#DISKCMD}",Temperature_Celsius].last()}<100</expression>
<recovery_mode>1</recovery_mode>
<recovery_expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD["{#DISKCMD}",Temperature_Celsius].avg(5m)}<{$TEMP_CRIT:"HDD"}-3</recovery_expression>
<name>{#DISKNAME}: Disk temperature: {ITEM.LASTVALUE}</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>3</priority>
<description/>
<type>0</type>
<manual_close>1</manual_close>
<dependencies/>
<tags/>
</trigger_prototype>
<trigger_prototype>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD["{#DISKCMD}",Temperature_Celsius].avg(5m)}>{$TEMP_WARN:"HDD"}</expression>
<recovery_mode>1</recovery_mode>
<recovery_expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD["{#DISKCMD}",Temperature_Celsius].avg(5m)}<{$TEMP_WARN:"HDD"}-3</recovery_expression>
<name>{#DISKNAME}: Disk temperature: {ITEM.LASTVALUE}</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>2</priority>
<description/>
<type>0</type>
<manual_close>1</manual_close>
<dependencies>
<dependency>
<name>{#DISKNAME}: Disk temperature: {ITEM.LASTVALUE}</name>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD["{#DISKCMD}",Temperature_Celsius].avg(5m)}>{$TEMP_CRIT:"HDD"} and
{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD["{#DISKCMD}",Temperature_Celsius].last()}<100</expression>
<recovery_expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD["{#DISKCMD}",Temperature_Celsius].avg(5m)}<{$TEMP_CRIT:"HDD"}-3</recovery_expression>
</dependency>
</dependencies>
<tags/>
</trigger_prototype>
<trigger_prototype>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.get["{#DISKCMD}"].str("FAILING_NOW")}=1</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name>{#DISKNAME}: one or more SMART attributes are FAILING_NOW</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>3</priority>
<description>Check test result output for details.</description>
<type>0</type>
<manual_close>0</manual_close>
<dependencies>
<dependency>
<name>{#DISKNAME}: SMART status is not OK</name>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health["{#DISKCMD}"].count(#1,{$SMARTCTL_OK_STATUS:"SATA"},ne)}=1 and
{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health["{#DISKCMD}"].count(#1,{$SMARTCTL_OK_STATUS:"SAS"},ne)}=1</expression>
<recovery_expression/>
</dependency>
<dependency>
<name>{#DISKNAME}: SMART test status: FAILED!</name>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health["{#DISKCMD}"].str("FAILED!")}=1</expression>
<recovery_expression/>
</dependency>
</dependencies>
<tags/>
</trigger_prototype>
<trigger_prototype>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD["{#DISKCMD}",Offline_Uncorrectable].delta(7d)}>0</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name>{#DISKNAME}: SMART (Offline) Uncorrectable Sector Count has been registered</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>3</priority>
<description>The total count of uncorrectable errors when reading/writing a sector. A rise in the value of this attribute indicates defects of the disk surface and/or problems in the mechanical subsystem.
Trigger: Timeouts in 7 days if there are no new reallocated sectors.</description>
<type>0</type>
<manual_close>1</manual_close>
<dependencies>
<dependency>
<name>{#DISKNAME}: SMART status is not OK</name>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health["{#DISKCMD}"].count(#1,{$SMARTCTL_OK_STATUS:"SATA"},ne)}=1 and
{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health["{#DISKCMD}"].count(#1,{$SMARTCTL_OK_STATUS:"SAS"},ne)}=1</expression>
<recovery_expression/>
</dependency>
<dependency>
<name>{#DISKNAME}: SMART test status: FAILED!</name>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health["{#DISKCMD}"].str("FAILED!")}=1</expression>
<recovery_expression/>
</dependency>
</dependencies>
<tags/>
</trigger_prototype>
<trigger_prototype>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD["{#DISKCMD}",Current_Pending_Sector].delta(3d)}>0</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name>{#DISKNAME}: SMART Current Pending Sector counter incremented</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>2</priority>
<description>Count of "unstable" sectors (waiting to be remapped, because of unrecoverable read errors). If an unstable sector is subsequently read successfully, the sector is remapped and this value is decreased. Read errors on a sector will not remap the sector immediately (since the correct value cannot be read and so the value to remap is not known, and also it might become readable later); instead, the drive firmware remembers that the sector needs to be remapped, and will remap it the next time it's written.
However, some drives will not immediately remap such sectors when written; instead the drive will first attempt to write to the problem sector and if the write operation is successful then the sector will be marked good (in this case, the "Reallocation Event Count" (0xC4) will not be increased). This is a serious shortcoming, for if such a drive contains marginal sectors that consistently fail only after some time has passed following a successful write operation, then the drive will never remap these problem sectors.
Triiger: Timeouts in 3 days if ther are no new sectors</description>
<type>0</type>
<manual_close>1</manual_close>
<dependencies>
<dependency>
<name>{#DISKNAME}: SMART Reallocated Sectors Count has been registered</name>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD["{#DISKCMD}",5 Reallocated].delta(7d)}>0</expression>
<recovery_expression/>
</dependency>
<dependency>
<name>{#DISKNAME}: SMART status is not OK</name>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health["{#DISKCMD}"].count(#1,{$SMARTCTL_OK_STATUS:"SATA"},ne)}=1 and
{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health["{#DISKCMD}"].count(#1,{$SMARTCTL_OK_STATUS:"SAS"},ne)}=1</expression>
<recovery_expression/>
</dependency>
<dependency>
<name>{#DISKNAME}: SMART test status: FAILED!</name>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health["{#DISKCMD}"].str("FAILED!")}=1</expression>
<recovery_expression/>
</dependency>
</dependencies>
<tags/>
</trigger_prototype>
<trigger_prototype>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD["{#DISKCMD}",5 Reallocated].delta(7d)}>0</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name>{#DISKNAME}: SMART Reallocated Sectors Count has been registered</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>3</priority>
<description>Count of reallocated sectors. The raw value represents a count of the bad sectors that have been found and remapped.Thus, the higher the attribute value, the more sectors the drive has had to reallocate. This value is primarily used as a metric of the life expectancy of the drive; a drive which has had any reallocations at all is significantly more likely to fail in the immediate months.
Trigger: Timeouts in 7 days if there are no new reallocated sectors.</description>
<type>0</type>
<manual_close>1</manual_close>
<dependencies>
<dependency>
<name>{#DISKNAME}: SMART status is not OK</name>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health["{#DISKCMD}"].count(#1,{$SMARTCTL_OK_STATUS:"SATA"},ne)}=1 and
{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health["{#DISKCMD}"].count(#1,{$SMARTCTL_OK_STATUS:"SAS"},ne)}=1</expression>
<recovery_expression/>
</dependency>
<dependency>
<name>{#DISKNAME}: SMART test status: FAILED!</name>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health["{#DISKCMD}"].str("FAILED!")}=1</expression>
<recovery_expression/>
</dependency>
</dependencies>
<tags/>
</trigger_prototype>
<trigger_prototype>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD["{#DISKCMD}",Spin_Retry_Count].delta(7d)}>0</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name>{#DISKNAME}: SMART Spin Retry Count has been registered</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url>https://kb.acronis.com/content/9110</url>
<status>0</status>
<priority>3</priority>
<description>Spin retry event is logged each time the drive was unable to spin its platters up to the rated rotation speed in the due time. Spin-up attempt was aborted and retried. This typically indicates severe controller or bearing problem, but may be sometimes caused by power supply problems.
Trigger: Timeouts in 7 days if there are no spin retry events.</description>
<type>0</type>
<manual_close>1</manual_close>
<dependencies/>
<tags/>
</trigger_prototype>
<trigger_prototype>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health["{#DISKCMD}"].count(#1,{$SMARTCTL_OK_STATUS:"SATA"},ne)}=1 and
{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health["{#DISKCMD}"].count(#1,{$SMARTCTL_OK_STATUS:"SAS"},ne)}=1</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name>{#DISKNAME}: SMART status is not OK</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>2</priority>
<description/>
<type>0</type>
<manual_close>1</manual_close>
<dependencies>
<dependency>
<name>{#DISKNAME}: SMART test status: FAILED!</name>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health["{#DISKCMD}"].str("FAILED!")}=1</expression>
<recovery_expression/>
</dependency>
</dependencies>
<tags/>
</trigger_prototype>
<trigger_prototype>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD.health["{#DISKCMD}"].str("FAILED!")}=1</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name>{#DISKNAME}: SMART test status: FAILED!</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>3</priority>
<description/>
<type>0</type>
<manual_close>0</manual_close>
<dependencies/>
<tags/>
</trigger_prototype>
<trigger_prototype>
<expression>{Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD["{#DISKCMD}",UDMA_CRC_Error].last()}>100 and {Template_HDD_SMARTMONTOOLS_2_WITH_LLD:uHDD["{#DISKCMD}",UDMA_CRC_Error].delta(1d)}>0</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name>{#DISKNAME}: SMART UltraDMA CRC Error Count too high: {ITEM.LASTVALUE}. Check cable!</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url>http://www.z-a-recovery.com/man-smart.htm</url>
<status>0</status>
<priority>3</priority>
<description>Low value of this attribute typically indicates that something is wrong with the connectors and/or cables. Disk-to-host transfers are protected by CRC error detection code when Ultra-DMA 66 or 100 is used. So if the data gets garbled between the disk and the host machine, the receiving controller senses this and the retransmission is initiated. Such a situation is called "UDMA CRC error". Once the problem is rectified (typically by replacing a cable), the attribute value returns to the normal levels pretty quick.
Triger: Timeouts in 1 day if there are no new errors.</description>
<type>0</type>
<manual_close>1</manual_close>
<dependencies/>
<tags/>
</trigger_prototype>
</trigger_prototypes>
<graph_prototypes/>
<host_prototypes/>
<jmx_endpoint/>
</discovery_rule>
<discovery_rule>
<name>smartctl-disks-discovery (SSD)</name>
<type>0</type>
<snmp_community/>
<snmp_oid/>
<key>uSSD.discovery["{$SMARTCTL_STATIC_DISKS}"]</key>
<delay>1h</delay>
<status>0</status>
<allowed_hosts/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<filter>
<evaltype>0</evaltype>
<formula/>
<conditions>
<condition>
<macro>{#SMART_ENABLED}</macro>
<value>1</value>
<operator>8</operator>
<formulaid>B</formulaid>
</condition>
<condition>
<macro>{#DISKTYPE}</macro>
<value>1</value>
<operator>8</operator>
<formulaid>A</formulaid>
</condition>
</conditions>
</filter>
<lifetime>30d</lifetime>
<description>SMARTCTL_STATIC_DISKS - add additional disks in this macro with -d option. Replace all spaces with '_' inside each disk command. Separate multiple disks with space.
For example, to discover 2 drives behind hardware RAID, set this macro on the host level:
SMARTCTL_STATIC_DISKS = /dev/sda_-d_sat+megaraid,00 /dev/sda_-d_sat+megaraid,01
Useful for disks that cannot be easily discovered such as disks hidden behind RAID or when agent is installed on Windows or Mac where automatic discovery is not so powerful.
Setting this macro doesn't prevent any automatic attempts to discover disks using smartctl --scan-open and so on.</description>
<item_prototypes>
<item_prototype>
<name>{#DISKNAME}: smartctl</name>
<type>0</type>
<snmp_community/>
<snmp_oid/>
<key>uSSD.get["{#DISKCMD}"]</key>
<delay>5m</delay>
<history>1d</history>
<trends>0</trends>
<status>0</status>
<value_type>4</value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>