@@ -114,6 +114,7 @@ func (smart *SMARTctl) Collect() {
114114 }
115115 // SCSI, SAS
116116 if smart .device .interface_ == "scsi" {
117+ smart .mineSCSIUsedEnduranceIndicator ()
117118 smart .mineSCSIGrownDefectList ()
118119 smart .mineSCSIErrorCounterLog ()
119120 smart .mineSCSIBytesRead ()
@@ -586,6 +587,18 @@ func (smart *SMARTctl) mineSCSIGrownDefectList() {
586587 }
587588}
588589
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+
589602func (smart * SMARTctl ) mineSCSIErrorCounterLog () {
590603 SCSIHealth := smart .json .Get ("scsi_error_counter_log" )
591604 if SCSIHealth .Exists () {
@@ -637,6 +650,29 @@ func (smart *SMARTctl) mineSCSIErrorCounterLog() {
637650 SCSIHealth .Get ("write.total_uncorrected_errors" ).Float (),
638651 smart .device .device ,
639652 )
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+ )
641677 }
642678}
0 commit comments