2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

ntp_pool_score: fix negative values

This commit is contained in:
tochev 2014-05-30 15:26:43 +03:00
parent d885efee2d
commit 20a713f6c2

View File

@ -77,7 +77,7 @@ SCORE=$(wget "http://www.pool.ntp.org/scores/$target/log?limit=1" \
--timeout=30 -O - 2>/dev/null \
| tail -n 1 | awk -F ',' '{print $5}')
if echo "$SCORE" | grep -q '^[0-9.]\+$'; then
if echo "$SCORE" | grep -q '^-\?[0-9.]\+$'; then
echo "score.value $SCORE"
else
echo "score.value U"