mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-12-21 02:21:55 +01:00
Ignore GetLogPage error message
This commit is contained in:
parent
bd02064d99
commit
fdfec20273
1 changed files with 6 additions and 0 deletions
|
@ -154,6 +154,12 @@ func jsonIsOk(logger *slog.Logger, json gjson.Result) bool {
|
||||||
if messages.Exists() {
|
if messages.Exists() {
|
||||||
for _, message := range messages.Array() {
|
for _, message := range messages.Array() {
|
||||||
if message.Get("severity").String() == "error" {
|
if message.Get("severity").String() == "error" {
|
||||||
|
// if the string contains "GetLogPage failed", then ignore it
|
||||||
|
// this is a known issue with Apple internal SSDs
|
||||||
|
if strings.Contains(message.Get("string").String(), "GetLogPage failed") {
|
||||||
|
logger.Warn("Ignoring GetLogPage failed error", "device", json.Get("device.name").String(), "message", message.Get("string").String())
|
||||||
|
continue
|
||||||
|
}
|
||||||
logger.Error(message.Get("string").String())
|
logger.Error(message.Get("string").String())
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue