mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
ntp_pool_score: fix negative values
This commit is contained in:
parent
d885efee2d
commit
20a713f6c2
1 changed files with 1 additions and 1 deletions
|
@ -77,7 +77,7 @@ SCORE=$(wget "http://www.pool.ntp.org/scores/$target/log?limit=1" \
|
||||||
--timeout=30 -O - 2>/dev/null \
|
--timeout=30 -O - 2>/dev/null \
|
||||||
| tail -n 1 | awk -F ',' '{print $5}')
|
| 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"
|
echo "score.value $SCORE"
|
||||||
else
|
else
|
||||||
echo "score.value U"
|
echo "score.value U"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue