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