Report SATA PHY stats to smartctl_device_statistics.

This commit is contained in:
Octavian Cerna 2020-07-26 23:35:22 +03:00
parent 3feff84fbb
commit e8d95208d7

View file

@ -271,6 +271,22 @@ func (smart *SMARTctl) mineDeviceStatistics() {
)
}
}
for _, statistic := range smart.json.Get("sata_phy_event_counters.table").Array() {
smart.ch <- prometheus.MustNewConstMetric(
metricDeviceStatistics,
prometheus.GaugeValue,
statistic.Get("value").Float(),
smart.device.device,
smart.device.family,
smart.device.model,
smart.device.serial,
"SATA PHY Event Counters",
strings.TrimSpace(statistic.Get("name").String()),
"",
"",
)
}
}
func (smart *SMARTctl) mineLongFlags(json gjson.Result, flags []string) string {