@@ -114,6 +114,7 @@ func (smart *SMARTctl) Collect() {
114
114
}
115
115
// SCSI, SAS
116
116
if smart .device .interface_ == "scsi" {
117
+ smart .mineSCSIUsedEnduranceIndicator ()
117
118
smart .mineSCSIGrownDefectList ()
118
119
smart .mineSCSIErrorCounterLog ()
119
120
smart .mineSCSIBytesRead ()
@@ -586,6 +587,18 @@ func (smart *SMARTctl) mineSCSIGrownDefectList() {
586
587
}
587
588
}
588
589
590
+ func (smart * SMARTctl ) mineSCSIUsedEnduranceIndicator () {
591
+ scsi_percentage_used_endurance_indicator := smart .json .Get ("scsi_percentage_used_endurance_indicator" )
592
+ if scsi_percentage_used_endurance_indicator .Exists () {
593
+ smart .ch <- prometheus .MustNewConstMetric (
594
+ metricSCSIUsedEnduranceIndicator ,
595
+ prometheus .GaugeValue ,
596
+ scsi_percentage_used_endurance_indicator .Float (),
597
+ smart .device .device ,
598
+ )
599
+ }
600
+ }
601
+
589
602
func (smart * SMARTctl ) mineSCSIErrorCounterLog () {
590
603
SCSIHealth := smart .json .Get ("scsi_error_counter_log" )
591
604
if SCSIHealth .Exists () {
@@ -637,6 +650,29 @@ func (smart *SMARTctl) mineSCSIErrorCounterLog() {
637
650
SCSIHealth .Get ("write.total_uncorrected_errors" ).Float (),
638
651
smart .device .device ,
639
652
)
640
- // TODO: Should we also export the verify category?
653
+ smart .ch <- prometheus .MustNewConstMetric (
654
+ metricVerifyErrorsCorrectedByRereadsRewrites ,
655
+ prometheus .GaugeValue ,
656
+ SCSIHealth .Get ("verify.errors_corrected_by_rereads_rewrites" ).Float (),
657
+ smart .device .device ,
658
+ )
659
+ smart .ch <- prometheus .MustNewConstMetric (
660
+ metricVerifyErrorsCorrectedByEccFast ,
661
+ prometheus .GaugeValue ,
662
+ SCSIHealth .Get ("verify.errors_corrected_by_eccfast" ).Float (),
663
+ smart .device .device ,
664
+ )
665
+ smart .ch <- prometheus .MustNewConstMetric (
666
+ metricVerifyErrorsCorrectedByEccDelayed ,
667
+ prometheus .GaugeValue ,
668
+ SCSIHealth .Get ("verify.errors_corrected_by_eccdelayed" ).Float (),
669
+ smart .device .device ,
670
+ )
671
+ smart .ch <- prometheus .MustNewConstMetric (
672
+ metricVerifyTotalUncorrectedErrors ,
673
+ prometheus .GaugeValue ,
674
+ SCSIHealth .Get ("verify.total_uncorrected_errors" ).Float (),
675
+ smart .device .device ,
676
+ )
641
677
}
642
678
}
0 commit comments