mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-12-21 02:21:55 +01:00
Rename var
Signed-off-by: Deezzir <deezzir@gmail.com>
This commit is contained in:
parent
2c2b4aa970
commit
b47737b0be
1 changed files with 3 additions and 4 deletions
|
@ -468,13 +468,12 @@ func (smart *SMARTctl) mineSCSIBytesWritten() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (smart *SMARTctl) mineSmartStatus() {
|
func (smart *SMARTctl) mineSmartStatus() {
|
||||||
passed_raw := smart.json.Get("smart_status.passed")
|
smartStatus := smart.json.Get("smart_status.passed")
|
||||||
|
if smartStatus.Exists() {
|
||||||
if passed_raw.Exists() {
|
|
||||||
smart.ch <- prometheus.MustNewConstMetric(
|
smart.ch <- prometheus.MustNewConstMetric(
|
||||||
metricDeviceSmartStatus,
|
metricDeviceSmartStatus,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
passed_raw.Float(),
|
smartStatus.Float(),
|
||||||
smart.device.device,
|
smart.device.device,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue