mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-12-21 02:21:55 +01:00
Return the entire input string if cannot extract device name
This commit is contained in:
parent
fdfec20273
commit
5257762954
1 changed files with 3 additions and 1 deletions
|
@ -63,7 +63,9 @@ func extractDiskName(input string) string {
|
||||||
|
|
||||||
return strings.Join(name, "_")
|
return strings.Join(name, "_")
|
||||||
}
|
}
|
||||||
return ""
|
|
||||||
|
// If the regex doesn't match, return the entire input string
|
||||||
|
return input
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSMARTctl is smartctl constructor
|
// NewSMARTctl is smartctl constructor
|
||||||
|
|
Loading…
Reference in a new issue