mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-11-16 01:33:07 +01:00
Report SATA PHY stats to smartctl_device_statistics.
This commit is contained in:
parent
3feff84fbb
commit
e8d95208d7
1 changed files with 16 additions and 0 deletions
16
smartctl.go
16
smartctl.go
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue