diff --git a/plugins/docker/docker_volumesize b/plugins/docker/docker_volumesize index 3be53b5d..d1f598b4 100644 --- a/plugins/docker/docker_volumesize +++ b/plugins/docker/docker_volumesize @@ -50,6 +50,8 @@ if [ "$1" = "config" ]; then echo "graph_args -l 0 --base 1024" echo "graph_info This graph shows the size per volume." while IFS= read -r line; do + # ignore empty lines + [ -n "$line" ] || continue echo "$line" | awk 'BEGIN { FS = ":" } { label = substr($1, 1, 30); print $1 ".label " label }' # display info only when labels are set if [ -n "$(echo "$line" | awk 'BEGIN { FS = ":" } { print $3 }')" ]; then @@ -62,6 +64,8 @@ fi echo "multigraph volumesize" while IFS= read -r line; do + # ignore empty lines + [ -n "$line" ] || continue name=$(echo "$line" | awk 'BEGIN { FS = ":" } { print $1 }') value=$(echo "$line" | awk 'BEGIN { FS = ":" } { print $2 }')