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:
parent
d885efee2d
commit
20a713f6c2
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user