mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-11-16 01:33:07 +01:00
fixed format
This commit is contained in:
parent
a3ee441193
commit
9666ec9296
1 changed files with 19 additions and 19 deletions
38
smartctl.go
38
smartctl.go
|
@ -289,26 +289,26 @@ func (smart *SMARTctl) mineNvmeSmartHealthInformationLog() {
|
|||
smart.device.model,
|
||||
smart.device.serial,
|
||||
)
|
||||
smart.ch <- prometheus.MustNewConstMetric(
|
||||
metricMediaErrors,
|
||||
prometheus.GaugeValue,
|
||||
iHealth.Get("media_errors").Float(),
|
||||
smart.device.device,
|
||||
smart.device.family,
|
||||
smart.device.model,
|
||||
smart.device.serial,
|
||||
)
|
||||
smart.ch <- prometheus.MustNewConstMetric(
|
||||
metricMediaErrors,
|
||||
prometheus.GaugeValue,
|
||||
iHealth.Get("media_errors").Float(),
|
||||
smart.device.device,
|
||||
smart.device.family,
|
||||
smart.device.model,
|
||||
smart.device.serial,
|
||||
)
|
||||
}
|
||||
|
||||
func (smart *SMARTctl) mineNvmeSmartStatus() {
|
||||
iStatus := smart.json.Get("smart_status")
|
||||
smart.ch <- prometheus.MustNewConstMetric(
|
||||
metricSmartStatus,
|
||||
prometheus.GaugeValue,
|
||||
iStatus.Get("passed").Float(),
|
||||
smart.device.device,
|
||||
smart.device.family,
|
||||
smart.device.model,
|
||||
smart.device.serial,
|
||||
)
|
||||
iStatus := smart.json.Get("smart_status")
|
||||
smart.ch <- prometheus.MustNewConstMetric(
|
||||
metricSmartStatus,
|
||||
prometheus.GaugeValue,
|
||||
iStatus.Get("passed").Float(),
|
||||
smart.device.device,
|
||||
smart.device.family,
|
||||
smart.device.model,
|
||||
smart.device.serial,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue