From 1e6fab4e6ea7382891a9b0328ec7acc08380a503 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Thu, 25 Jun 2020 13:54:01 -0400 Subject: [PATCH] Fix math for suri loss calulcations --- salt/telegraf/scripts/suriloss.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/telegraf/scripts/suriloss.sh b/salt/telegraf/scripts/suriloss.sh index acfb8c214..c9e9d478e 100644 --- a/salt/telegraf/scripts/suriloss.sh +++ b/salt/telegraf/scripts/suriloss.sh @@ -15,7 +15,7 @@ if [ $CHECKIT == 2 ]; then else CURRENTPACKETS=${RESULT[9]} PASTPACKETS=${RESULT[19]} - TOTAL=$(($CURRENTPACKETS - $PASTPACKETS)) + TOTAL=$(($CURRENTPACKETS - $PASTPACKETS + $DROPPED)) LOSS=$(echo $DROPPED $TOTAL / p | dc) echo "suridrop drop=$LOSS"