From 4bca7327b5f505368ff7527da1601af28b3e4d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Wed, 26 Feb 2020 11:43:15 +0100 Subject: [PATCH] Add state and message if logging aren't supported --- xymon/plugins/client/ext/smartoverall | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xymon/plugins/client/ext/smartoverall b/xymon/plugins/client/ext/smartoverall index c0d227d..0e41ab9 100755 --- a/xymon/plugins/client/ext/smartoverall +++ b/xymon/plugins/client/ext/smartoverall @@ -155,6 +155,9 @@ https://www.smartmontools.org/wiki/FAQ#SmartmontoolsDatabase" if smartctl -d "${TYPE}" -l selftest "${DISK}" | grep -qi -- "No self-tests"; then DSELFTEST_MSG="&red No self-tests recorded:" DCODE="8" + ## If the device doesn't support test logging + elif smartctl -d "${TYPE}" -l selftest "${DISK}" | grep -qEi -- "does not support.*logging"; then + DSELFTEST_MSG="&clear Test logging are not supported:" else DSELFTEST_MSG="" fi