Remove duplicate fixes #136

Signed-off-by: tekert <tekert@gmail.com>
This commit is contained in:
tekert 2023-07-23 19:23:11 -03:00
parent 895bf1eeb3
commit 9698c581b3

View file

@ -68,7 +68,6 @@ func (smart *SMARTctl) Collect() {
smart.minePowerCycleCount()
smart.mineDeviceSCTStatus()
smart.mineDeviceStatistics()
smart.mineDeviceStatus()
smart.mineDeviceErrorLog()
smart.mineDeviceSelfTestLog()
smart.mineDeviceERC()
@ -383,16 +382,6 @@ func (smart *SMARTctl) mineLongFlags(json gjson.Result, flags []string) string {
return strings.Join(result, ",")
}
func (smart *SMARTctl) mineDeviceStatus() {
status := smart.json.Get("smart_status")
smart.ch <- prometheus.MustNewConstMetric(
metricDeviceStatus,
prometheus.GaugeValue,
status.Get("passed").Float(),
smart.device.device,
)
}
func (smart *SMARTctl) mineDeviceErrorLog() {
for logType, status := range smart.json.Get("ata_smart_error_log").Map() {
smart.ch <- prometheus.MustNewConstMetric(