From e485c98a92859fa5f833abd871d4a2771097f0b0 Mon Sep 17 00:00:00 2001 From: tekert-dev Date: Sun, 23 Jul 2023 11:57:08 -0300 Subject: [PATCH] Fix https://github.com/prometheus-community/smartctl_exporter/issues/92 --- readjson.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readjson.go b/readjson.go index e163dcb..cc0218f 100644 --- a/readjson.go +++ b/readjson.go @@ -63,7 +63,7 @@ func readFakeSMARTctl(logger *slog.Logger, device Device) gjson.Result { // Get json from smartctl and parse it func readSMARTctl(logger *slog.Logger, device Device) (gjson.Result, bool) { start := time.Now() - out, err := exec.Command(*smartctlPath, "--json", "--info", "--health", "--attributes", "--tolerance=verypermissive", "--nocheck=standby", "--format=brief", "--log=error", "--device="+device.Type, device.Name).Output() + out, err := exec.Command(*smartctlPath, "--json", "--info", "--health", "--attributes", "--tolerance=verypermissive", "--nocheck=standby", "--format=brief", "--log=error", "--log=selftest", "--device="+device.Type, device.Name).Output() if err != nil { logger.Warn("S.M.A.R.T. output reading", "err", err, "device", device.Info_Name) }