Fix in NTP plugins

This commit is contained in:
Patrick Van der Veken
2018-11-19 09:32:44 +01:00
parent 2069863dd6
commit 2b87e0dd6c
2 changed files with 18 additions and 0 deletions
@@ -115,6 +115,12 @@ fi
# evaluate ntpq results
# 1) active server
_NTP_PEER="$(grep -E -e '^\*' 2>/dev/null ${HC_STDOUT_LOG} | awk '{ print $1 }')"
if [[ -z "${_NTP_PEER}" ]]
then
_MSG="NTP is not synchronizing"
log_hc "$0" 1 "${_MSG}"
return 0
fi
case ${_NTP_PEER} in
\*127.127.1.0*)
_MSG="NTP is synchronizing against its internal clock"