Rename var

Signed-off-by: Deezzir <deezzir@gmail.com>
This commit is contained in:
Deezzir 2024-12-19 21:38:04 -05:00
parent 2c2b4aa970
commit b47737b0be
No known key found for this signature in database
GPG key ID: BC9F5289FAC4E96A

View file

@ -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,
) )
} }