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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
|
zabbix_export:
version: '6.2'
date: '2022-04-06T19:59:52Z'
groups:
-
uuid: 57b7ae836ca64446ba2c296389c009b7
name: Templates/Modules
templates:
-
uuid: e518b1340ce44d7389d2cc7c304a97b4
template: 'SMART by Zabbix agent 2 active'
name: 'SMART by Zabbix agent 2 active'
description: |
The template for monitoring S.M.A.R.T. attributes of physical disk that works without any external scripts. It collects metrics by Zabbix agent 2 version 5.0 and later with Smartmontools version 7.1 and later. Disk discovery LLD rule finds all HDD, SSD, NVMe disks with S.M.A.R.T. enabled. Attribute discovery LLD rule have pre-defined Vendor Specific Attributes for each disk, and will be discovered if attribute is present.
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/415662-discussion-thread-for-official-zabbix-smart-disk-monitoring
Template tooling version used: 0.41
groups:
-
name: Templates/Modules
discovery_rules:
-
uuid: 0a56a348d4a446938beae1eae5ec8993
name: 'Disk discovery'
type: ZABBIX_ACTIVE
key: smart.disk.discovery
delay: 1h
filter:
evaltype: AND
conditions:
-
macro: '{#NAME}'
value: '{$SMART.DISK.NAME.MATCHES}'
formulaid: A
-
macro: '{#NAME}'
value: '{$SMART.DISK.NAME.NOT_MATCHES}'
operator: NOT_MATCHES_REGEX
formulaid: B
description: 'Discovery SMART disks.'
item_prototypes:
-
uuid: b3891b80915c4e2488f2f87cb173474a
name: 'SMART [{#NAME}]: Bad_Block_Rate'
type: DEPENDENT
key: 'smart.disk.attribute.bad_block_rate[{#NAME}]'
delay: '0'
history: 7d
discover: NO_DISCOVER
description: 'Percentage of used reserve blocks divided by total reserve blocks.'
preprocessing:
-
type: JSONPATH
parameters:
- $.bad_block_rate.value
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: attribute
-
tag: component
value: storage
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
-
uuid: 512c44706bff48fda2ef444713d93b29
name: 'SMART [{#NAME}]: Power_Cycle_Count'
type: DEPENDENT
key: 'smart.disk.attribute.power_cycle_count[{#NAME}]'
delay: '0'
history: 7d
discover: NO_DISCOVER
description: 'This attribute indicates the count of full hard disk power on/off cycles.'
preprocessing:
-
type: JSONPATH
parameters:
- $.power_cycle_count.value
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: attribute
-
tag: component
value: storage
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
-
uuid: 0ab9412116924ca2a9561b44e4c9d6da
name: 'SMART [{#NAME}]: Program_Fail_Count_Chip'
type: DEPENDENT
key: 'smart.disk.attribute.program_fail_count_chip[{#NAME}]'
delay: '0'
history: 7d
discover: NO_DISCOVER
description: 'The total number of flash program operation failures since the drive was deployed.'
preprocessing:
-
type: JSONPATH
parameters:
- $.program_fail_count_chip.value
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: attribute
-
tag: component
value: storage
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
-
uuid: f794dc07c88a4690be8512e029f0b50c
name: 'SMART [{#NAME}]: Raw_Read_Error_Rate'
type: DEPENDENT
key: 'smart.disk.attribute.raw_read_error_rate[{#NAME}]'
delay: '0'
history: 7d
discover: NO_DISCOVER
description: 'Stores data related to the rate of hardware read errors that occurred when reading data from a disk surface. The raw value has different structure for different vendors and is often not meaningful as a decimal number. For some drives, this number may increase during normal operation without necessarily signifying errors.'
preprocessing:
-
type: JSONPATH
parameters:
- $.raw_read_error_rate.value
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: attribute
-
tag: component
value: storage
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
-
uuid: 643276ac0dab47b8974e849a1574ac2a
name: 'SMART [{#NAME}]: Reallocated_Sector_Ct'
type: DEPENDENT
key: 'smart.disk.attribute.reallocated_sector_ct[{#NAME}]'
delay: '0'
history: 7d
discover: NO_DISCOVER
description: 'Disk discovered attribute.'
preprocessing:
-
type: JSONPATH
parameters:
- $.reallocated_sector_ct.value
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: attribute
-
tag: component
value: storage
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
-
uuid: fa253069f1c74a0b9ee3dca5eafef17a
name: 'SMART [{#NAME}]: Reported_Uncorrect'
type: DEPENDENT
key: 'smart.disk.attribute.reported_uncorrect[{#NAME}]'
delay: '0'
history: 7d
discover: NO_DISCOVER
description: 'The count of errors that could not be recovered using hardware ECC.'
preprocessing:
-
type: JSONPATH
parameters:
- $.reported_uncorrect.value
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: attribute
-
tag: component
value: storage
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
-
uuid: 99df8858bc6d4fb4a9fb4abd29b6c852
name: 'SMART [{#NAME}]: Seek_Error_Rate'
type: DEPENDENT
key: 'smart.disk.attribute.seek_error_rate[{#NAME}]'
delay: '0'
history: 7d
discover: NO_DISCOVER
description: 'Rate of seek errors of the magnetic heads. If there is a partial failure in the mechanical positioning system, then seek errors will arise. Such a failure may be due to numerous factors, such as damage to a servo, or thermal widening of the hard disk. The raw value has different structure for different vendors and is often not meaningful as a decimal number. For some drives, this number may increase during normal operation without necessarily signifying errors.'
preprocessing:
-
type: JSONPATH
parameters:
- $.seek_error_rate.value
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: attribute
-
tag: component
value: storage
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
-
uuid: 422ba65b87444329b5a23d03ce89dda7
name: 'SMART [{#NAME}]: Spin_Up_Time'
type: DEPENDENT
key: 'smart.disk.attribute.spin_up_time[{#NAME}]'
delay: '0'
history: 7d
discover: NO_DISCOVER
description: 'Average time of spindle spin up (from zero RPM to fully operational [milliseconds]).'
preprocessing:
-
type: JSONPATH
parameters:
- $.spin_up_time.value
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: attribute
-
tag: component
value: storage
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
-
uuid: eee36c13fc6248f6894188102d215638
name: 'SMART [{#NAME}]: Start_Stop_Count'
type: DEPENDENT
key: 'smart.disk.attribute.start_stop_count[{#NAME}]'
delay: '0'
history: 7d
discover: NO_DISCOVER
description: 'A tally of spindle start/stop cycles. The spindle turns on, and hence the count is increased, both when the hard disk is turned on after having before been turned entirely off (disconnected from power source) and when the hard disk returns from having previously been put to sleep mode.'
preprocessing:
-
type: JSONPATH
parameters:
- $.start_stop_count.value
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: attribute
-
tag: component
value: storage
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
-
uuid: ad6a9f6f7293495c916bb0aac0bc9729
name: 'SMART [{#NAME}]: Critical warning'
type: DEPENDENT
key: 'smart.disk.critical_warning[{#NAME}]'
delay: '0'
history: 7d
description: 'This field indicates critical warnings for the state of the controller.'
preprocessing:
-
type: JSONPATH
parameters:
- $.critical_warning
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: storage
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
-
uuid: b96b496a854f4165a44662bd93400b27
name: 'SMART [{#NAME}]: Smartctl error'
type: DEPENDENT
key: 'smart.disk.error[{#NAME}]'
delay: '0'
history: 7d
trends: '0'
value_type: TEXT
description: 'This metric will contain smartctl errors.'
preprocessing:
-
type: JSONPATH
parameters:
- $.error
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 1h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: storage
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
-
uuid: 952376ecd47a498cab40ec6872d20454
name: 'SMART [{#NAME}]: Exit status'
type: DEPENDENT
key: 'smart.disk.es[{#NAME}]'
delay: '0'
history: 7d
description: |
The exit statuses of smartctl are defined by a bitmask but in decimal value. The eight different bits in the exit status have the following meanings for ATA disks; some of these values may also be returned for SCSI disks.
Bit 0: Command line did not parse.
Bit 1: Device open failed, device did not return an IDENTIFY DEVICE structure, or device is in a low-power mode (see '-n' option above).
Bit 2: Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure (see '-b' option above).
Bit 3: SMART status check returned "DISK FAILING".
Bit 4: We found prefail Attributes <= threshold.
Bit 5: SMART status check returned "DISK OK" but we found that some (usage or prefail) Attributes have been <= threshold at some time in the past.
Bit 6: The device error log contains records of errors.
Bit 7: The device self-test log contains records of errors. [ATA only] Failed self-tests outdated by a newer successful extended self-test are ignored.
preprocessing:
-
type: JSONPATH
parameters:
- $.exit_status
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: storage
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
trigger_prototypes:
-
uuid: ec00e4aa70fa4bea92c559e145ca2e18
expression: |
( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),8) = 8 )
or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),8) = 8
and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),8) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),8) )
recovery_mode: NONE
name: 'SMART [{#NAME}]: Check returned "DISK FAILING"'
priority: HIGH
description: 'SMART status check returned "DISK FAILING".'
manual_close: 'YES'
tags:
-
tag: scope
value: notice
-
uuid: 612c964798d74ab2af23cc6ec5a1d754
expression: |
( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),1) = 1 )
or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),1) = 1
and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),1) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),1) )
recovery_mode: NONE
name: 'SMART [{#NAME}]: Command line did not parse'
priority: HIGH
description: 'Command line did not parse.'
manual_close: 'YES'
tags:
-
tag: scope
value: notice
-
uuid: 3591c8077a894f6b8deaaf8055ca940e
expression: |
( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),2) = 2 )
or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),2) = 2
and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),2) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),2) )
recovery_mode: NONE
name: 'SMART [{#NAME}]: Device open failed'
priority: HIGH
description: 'Device open failed, device did not return an IDENTIFY DEVICE structure, or device is in a low-power mode.'
manual_close: 'YES'
tags:
-
tag: scope
value: notice
-
uuid: b524364e077a4f898a93af34ef4e6e7f
expression: |
( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),64) = 64 )
or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),64) = 64
and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),64) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),64) )
recovery_mode: NONE
name: 'SMART [{#NAME}]: Error log contains records'
priority: HIGH
description: 'The device error log contains records of errors.'
manual_close: 'YES'
tags:
-
tag: scope
value: notice
-
uuid: 5e56f837d39b49a89d1f6ca3c45b5737
expression: |
( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),128) = 128 )
or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),128) = 128
and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),128) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),128) )
recovery_mode: NONE
name: 'SMART [{#NAME}]: Self-test log contains records'
priority: HIGH
description: 'The device self-test log contains records of errors. [ATA only] Failed self-tests outdated by a newer successful extended self-test are ignored.'
manual_close: 'YES'
tags:
-
tag: scope
value: notice
-
uuid: 541318ea2fd14fb4a6f8e8a8df1e4d36
expression: |
( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),32) = 32 )
or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),32) = 32
and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),32) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),32) )
recovery_mode: NONE
name: 'SMART [{#NAME}]: Some Attributes have been <= threshold'
priority: HIGH
description: 'SMART status check returned "DISK OK" but we found that some (usage or prefail) Attributes have been <= threshold at some time in the past.'
manual_close: 'YES'
tags:
-
tag: scope
value: notice
-
uuid: 00eba731f9ae495f9fe38020897c9aef
expression: |
( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),4) = 4 )
or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),4) = 4
and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),4) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),4) )
recovery_mode: NONE
name: 'SMART [{#NAME}]: Some command to the disk failed'
priority: HIGH
description: 'Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure.'
manual_close: 'YES'
tags:
-
tag: scope
value: notice
-
uuid: 04dc576b815e432a9cf6d8fee6b08bae
expression: |
( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),16) = 16 )
or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),16) = 16
and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),16) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),16) )
recovery_mode: NONE
name: 'SMART [{#NAME}]: Some prefail Attributes <= threshold'
priority: HIGH
description: 'We found prefail Attributes <= threshold.'
manual_close: 'YES'
tags:
-
tag: scope
value: notice
-
uuid: b26489a8ba12495dbb9687ef52ab1396
name: 'SMART [{#NAME}]: Get disk attributes'
type: ZABBIX_ACTIVE
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
history: '0'
trends: '0'
value_type: TEXT
tags:
-
tag: component
value: raw
-
tag: component
value: storage
-
uuid: e5bbd606e330469389bf081588b88d17
name: 'SMART [{#NAME}]: Power on hours'
type: DEPENDENT
key: 'smart.disk.hours[{#NAME}]'
delay: '0'
history: 7d
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'
preprocessing:
-
type: JSONPATH
parameters:
- $.power_on_time
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: storage
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
-
uuid: 0861b008b09a41799978e085625aaa4a
name: 'SMART [{#NAME}]: Media errors'
type: DEPENDENT
key: 'smart.disk.media_errors[{#NAME}]'
delay: '0'
history: 7d
description: 'Contains the number of occurrences where the controller detected an unrecovered data integrity error. Errors such as uncorrectable ECC, CRC checksum failure, or LBA tag mismatch are included in this field.'
preprocessing:
-
type: JSONPATH
parameters:
- $.media_errors
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: storage
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
-
uuid: f48fe3366b194eb4942411cc776c8633
name: 'SMART [{#NAME}]: Device model'
type: DEPENDENT
key: 'smart.disk.model[{#NAME}]'
delay: '0'
history: 7d
trends: '0'
value_type: CHAR
preprocessing:
-
type: JSONPATH
parameters:
- $.model_name
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: inventory
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
-
uuid: d5cef21c49994c3e8e12ef6471d7cdcd
name: 'SMART [{#NAME}]: Percentage used'
type: DEPENDENT
key: 'smart.disk.percentage_used[{#NAME}]'
delay: '0'
history: 7d
units: '%'
description: 'Contains a vendor specific estimate of the percentage of NVM subsystem life used based on the actual usage and the manufacturer''s prediction of NVM life. A value of 100 indicates that the estimated endurance of the NVM in the NVM subsystem has been consumed, but may not indicate an NVM subsystem failure. The value is allowed to exceed 100. Percentages greater than 254 shall be represented as 255. This value shall be updated once per power-on hour (when the controller is not in a sleep state).'
preprocessing:
-
type: JSONPATH
parameters:
- $.percentage_used
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: storage
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
trigger_prototypes:
-
uuid: 68f373252bee4f9e8f3b33d04fc1adbd
expression: 'last(/SMART by Zabbix agent 2 active/smart.disk.percentage_used[{#NAME}])>90'
name: 'SMART [{#NAME}]: NVMe disk percentage using is over 90% of estimated endurance'
priority: AVERAGE
tags:
-
tag: scope
value: notice
-
uuid: 189d8e8d16ed40229ba3ca52b75d2dc4
name: 'SMART [{#NAME}]: Serial number'
type: DEPENDENT
key: 'smart.disk.sn[{#NAME}]'
delay: '0'
history: 7d
trends: '0'
value_type: CHAR
preprocessing:
-
type: JSONPATH
parameters:
- $.serial_number
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: inventory
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
trigger_prototypes:
-
uuid: 2d5cf100fe094c819d725ee598d37de8
expression: 'last(/SMART by Zabbix agent 2 active/smart.disk.sn[{#NAME}],#1)<>last(/SMART by Zabbix agent 2 active/smart.disk.sn[{#NAME}],#2) and length(last(/SMART by Zabbix agent 2 active/smart.disk.sn[{#NAME}]))>0'
name: 'SMART [{#NAME}]: Disk has been replaced'
event_name: 'SMART [{#NAME}]: Disk has been replaced (new serial number received)'
priority: INFO
description: 'Device serial number has changed. Ack to close.'
manual_close: 'YES'
tags:
-
tag: scope
value: notice
-
uuid: e79eaaf7ee0d40e7b91fc019f5edb19e
name: 'SMART [{#NAME}]: Temperature'
type: DEPENDENT
key: 'smart.disk.temperature[{#NAME}]'
delay: '0'
history: 7d
units: °C
description: 'Current drive temperature.'
preprocessing:
-
type: JSONPATH
parameters:
- $.temperature
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: temperature
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
trigger_prototypes:
-
uuid: 7f46b24934854866849dd758cb5999d5
expression: 'avg(/SMART by Zabbix agent 2 active/smart.disk.temperature[{#NAME}],5m)>{$SMART.TEMPERATURE.MAX.CRIT}'
name: 'SMART [{#NAME}]: Average disk temperature is critical'
event_name: 'SMART [{#NAME}]: Average disk temperature is critical (over {$SMART.TEMPERATURE.MAX.CRIT}°C for 5m)'
priority: AVERAGE
tags:
-
tag: scope
value: notice
-
uuid: c903a37f4b004e1593ef85ac893c3f6c
expression: 'avg(/SMART by Zabbix agent 2 active/smart.disk.temperature[{#NAME}],5m)>{$SMART.TEMPERATURE.MAX.WARN}'
name: 'SMART [{#NAME}]: Average disk temperature is too high'
event_name: 'SMART [{#NAME}]: Average disk temperature is too high (over {$SMART.TEMPERATURE.MAX.WARN}°C for 5m)'
priority: WARNING
dependencies:
-
name: 'SMART [{#NAME}]: Average disk temperature is critical'
expression: 'avg(/SMART by Zabbix agent 2 active/smart.disk.temperature[{#NAME}],5m)>{$SMART.TEMPERATURE.MAX.CRIT}'
tags:
-
tag: scope
value: notice
-
uuid: 2475415cc95b4103b2933f921e62dd36
name: 'SMART [{#NAME}]: Self-test passed'
type: DEPENDENT
key: 'smart.disk.test[{#NAME}]'
delay: '0'
history: 7d
trends: '0'
value_type: CHAR
description: 'The disk is passed the SMART self-test or not.'
preprocessing:
-
type: JSONPATH
parameters:
- $.self_test_passed
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
value: health
-
tag: diskname
value: '{#NAME}'
-
tag: disktype
value: '{#DISKTYPE}'
trigger_prototypes:
-
uuid: 304bd042b7644a31bb74a1e71808d196
expression: 'last(/SMART by Zabbix agent 2 active/smart.disk.test[{#NAME}])="false"'
name: 'SMART [{#NAME}]: Disk self-test is not passed'
priority: HIGH
tags:
-
tag: scope
value: notice
overrides:
-
name: Bad_Block_Rate
step: '9'
filter:
conditions:
-
macro: '{#ATTRIBUTES}'
value: Bad_Block_Rate
formulaid: A
operations:
-
operationobject: ITEM_PROTOTYPE
operator: REGEXP
value: Bad_Block_Rate
status: ENABLED
discover: DISCOVER
-
name: 'Not NVMe'
step: '2'
filter:
conditions:
-
macro: '{#DISKTYPE}'
value: nvme
operator: NOT_MATCHES_REGEX
formulaid: A
operations:
-
operationobject: ITEM_PROTOTYPE
operator: REGEXP
value: Media|Percentage|Critical
status: ENABLED
discover: NO_DISCOVER
-
name: Power_Cycle_Count
step: '6'
filter:
conditions:
-
macro: '{#ATTRIBUTES}'
value: Power_Cycle_Count
formulaid: A
operations:
-
operationobject: ITEM_PROTOTYPE
operator: REGEXP
value: Power_Cycle_Count
status: ENABLED
discover: DISCOVER
-
name: Program_Fail_Count_Chip
step: '10'
filter:
conditions:
-
macro: '{#ATTRIBUTES}'
value: Program_Fail_Count_Chip
formulaid: A
operations:
-
operationobject: ITEM_PROTOTYPE
operator: REGEXP
value: Program_Fail_Count_Chip
status: ENABLED
discover: DISCOVER
-
name: Raw_Read_Error_Rate
step: '3'
filter:
conditions:
-
macro: '{#ATTRIBUTES}'
value: Raw_Read_Error_Rate
formulaid: A
operations:
-
operationobject: ITEM_PROTOTYPE
operator: REGEXP
value: Raw_Read_Error_Rate
status: ENABLED
discover: DISCOVER
-
name: Reallocated_Sector_Ct
step: '11'
filter:
conditions:
-
macro: '{#ATTRIBUTES}'
value: Reallocated_Sector_Ct
formulaid: A
operations:
-
operationobject: ITEM_PROTOTYPE
operator: REGEXP
value: Reallocated_Sector_Ct
status: ENABLED
discover: DISCOVER
-
name: Reported_Uncorrect
step: '7'
filter:
conditions:
-
macro: '{#ATTRIBUTES}'
value: Reported_Uncorrect
formulaid: A
operations:
-
operationobject: ITEM_PROTOTYPE
operator: REGEXP
value: Reported_Uncorrect
status: ENABLED
discover: DISCOVER
-
name: Seek_Error_Rate
step: '8'
filter:
conditions:
-
macro: '{#ATTRIBUTES}'
value: Seek_Error_Rate
formulaid: A
operations:
-
operationobject: ITEM_PROTOTYPE
operator: REGEXP
value: Seek_Error_Rate
status: ENABLED
discover: DISCOVER
-
name: Self-test
step: '1'
filter:
conditions:
-
macro: '{#DISKTYPE}'
value: nvme
formulaid: A
operations:
-
operationobject: ITEM_PROTOTYPE
operator: LIKE
value: Self-test
status: ENABLED
discover: NO_DISCOVER
-
name: Spin_Up_Time
step: '4'
filter:
conditions:
-
macro: '{#ATTRIBUTES}'
value: Spin_Up_Time
formulaid: A
operations:
-
operationobject: ITEM_PROTOTYPE
operator: REGEXP
value: Spin_Up_Time
status: ENABLED
discover: DISCOVER
-
name: Start_Stop_Count
step: '5'
filter:
conditions:
-
macro: '{#ATTRIBUTES}'
value: Start_Stop_Count
formulaid: A
operations:
-
operationobject: ITEM_PROTOTYPE
operator: REGEXP
value: Start_Stop_Count
status: ENABLED
discover: DISCOVER
macros:
-
macro: '{$SMART.DISK.NAME.MATCHES}'
value: '^.*$'
description: 'This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.'
-
macro: '{$SMART.DISK.NAME.NOT_MATCHES}'
value: CHANGE_IF_NEEDED
description: 'This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.'
-
macro: '{$SMART.TEMPERATURE.MAX.CRIT}'
value: '65'
description: 'This macro is used for trigger expression. It can be overridden on the host or linked on the template level.'
-
macro: '{$SMART.TEMPERATURE.MAX.WARN}'
value: '50'
description: 'This macro is used for trigger expression. It can be overridden on the host or linked on the template level.'
|