diff --git a/files/inet_stat.sh b/files/inet_stat.sh index aad6535..6acbb89 100755 --- a/files/inet_stat.sh +++ b/files/inet_stat.sh @@ -82,13 +82,16 @@ function ping_server() satistic="$(echo "${ping_output[1]}" | cut -d' ' -f4 | sed -E 's/\//,/g')" # Name or service not known - if [ "${#packet_loss}" -eq 0 ]; then - packet_loss="-1" + if [ "${#packet_loss}" -eq 0 ]; then + # make this Error visually apparent in the plot + packet_loss="100%" + satistic="-100,-100,-100,-100" fi # 100% package loss - if [ "${#satistic}" -eq 0 ]; then - satistic="-1,-1,-1,-1" + if [ "${#satistic}" -eq 0 ]; then + # don't need to plot this data as package loss is displayed + satistic="NaN,NaN,NaN,NaN" fi echo "$(date $DATE_FORMAT),$server,$packet_loss,$satistic"