mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Plugin multibandwidth: proper handling of invalid values
This commit is contained in:
parent
49aecf4e0e
commit
ade6f5f228
1 changed files with 1 additions and 0 deletions
|
@ -109,6 +109,7 @@ for host in $hosts; do
|
||||||
elif echo "$SPEED" | grep -q "G"; then
|
elif echo "$SPEED" | grep -q "G"; then
|
||||||
RATE=$(echo "$SPEED" | awk '{ print int($1 * 1024 * 1024 * 1024); }')
|
RATE=$(echo "$SPEED" | awk '{ print int($1 * 1024 * 1024 * 1024); }')
|
||||||
else
|
else
|
||||||
|
RATE="U"
|
||||||
echo "Error: no data (timeout)" >&2
|
echo "Error: no data (timeout)" >&2
|
||||||
fi
|
fi
|
||||||
if [ "$RATE" -gt "$max_mbps" ]; then
|
if [ "$RATE" -gt "$max_mbps" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue