mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-11-23 01:43:07 +01:00
Include SCSI error counters in smartctl JSON output
Signed-off-by: John Thiltges <jthiltges2@unl.edu>
This commit is contained in:
parent
179f37f05d
commit
b333d3f2f0
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ func readFakeSMARTctl(logger log.Logger, device string) gjson.Result {
|
||||||
// Get json from smartctl and parse it
|
// Get json from smartctl and parse it
|
||||||
func readSMARTctl(logger log.Logger, device string) (gjson.Result, bool) {
|
func readSMARTctl(logger log.Logger, device string) (gjson.Result, bool) {
|
||||||
level.Debug(logger).Log("msg", "Collecting S.M.A.R.T. counters", "device", device)
|
level.Debug(logger).Log("msg", "Collecting S.M.A.R.T. counters", "device", device)
|
||||||
out, err := exec.Command(*smartctlPath, "--json", "--info", "--health", "--attributes", "--tolerance=verypermissive", "--nocheck=standby", "--format=brief", device).Output()
|
out, err := exec.Command(*smartctlPath, "--json", "--info", "--health", "--attributes", "--tolerance=verypermissive", "--nocheck=standby", "--format=brief", "--log=error", device).Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
level.Warn(logger).Log("msg", "S.M.A.R.T. output reading", "err", err)
|
level.Warn(logger).Log("msg", "S.M.A.R.T. output reading", "err", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue