Fix in NTP plugins
This commit is contained in:
parent
2069863dd6
commit
2b87e0dd6c
@ -115,6 +115,12 @@ fi
|
|||||||
# evaluate ntpq results
|
# evaluate ntpq results
|
||||||
# 1) active server
|
# 1) active server
|
||||||
_NTP_PEER="$(grep -E -e '^\*' 2>/dev/null ${HC_STDOUT_LOG} | awk '{ print $1 }')"
|
_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
|
case ${_NTP_PEER} in
|
||||||
\*127.127.1.0*)
|
\*127.127.1.0*)
|
||||||
_MSG="NTP is synchronizing against its internal clock"
|
_MSG="NTP is synchronizing against its internal clock"
|
||||||
|
@ -249,6 +249,12 @@ then
|
|||||||
|
|
||||||
# 1) active server
|
# 1) active server
|
||||||
_CHRONY_PEER="$(grep -E -e '^\^,\*' 2>/dev/null ${HC_STDOUT_LOG} | cut -f3 -d',' 2>/dev/null)"
|
_CHRONY_PEER="$(grep -E -e '^\^,\*' 2>/dev/null ${HC_STDOUT_LOG} | cut -f3 -d',' 2>/dev/null)"
|
||||||
|
if [[ -z "${_CHRONY_PEER}" ]]
|
||||||
|
then
|
||||||
|
_MSG="chrony is not synchronizing"
|
||||||
|
log_hc "$0" 1 "${_MSG}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
case ${_CHRONY_PEER} in
|
case ${_CHRONY_PEER} in
|
||||||
\*127.127.1.0*)
|
\*127.127.1.0*)
|
||||||
_MSG="chrony is synchronizing against its internal clock"
|
_MSG="chrony is synchronizing against its internal clock"
|
||||||
@ -298,6 +304,12 @@ else
|
|||||||
|
|
||||||
# 1) active server
|
# 1) active server
|
||||||
_NTP_PEER="$(grep -E -e '^\*' 2>/dev/null ${HC_STDOUT_LOG} | awk '{ print $1 }' 2>/dev/null)"
|
_NTP_PEER="$(grep -E -e '^\*' 2>/dev/null ${HC_STDOUT_LOG} | awk '{ print $1 }' 2>/dev/null)"
|
||||||
|
if [[ -z "${_NTP_PEER}" ]]
|
||||||
|
then
|
||||||
|
_MSG="NTP is not synchronizing"
|
||||||
|
log_hc "$0" 1 "${_MSG}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
case ${_NTP_PEER} in
|
case ${_NTP_PEER} in
|
||||||
\*127.127.1.0*)
|
\*127.127.1.0*)
|
||||||
_MSG="NTP is synchronizing against its internal clock"
|
_MSG="NTP is synchronizing against its internal clock"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user