Merge pull request #2379 from Security-Onion-Solutions/fix/telegraf-suriloss

tell dc to use 4 decimal spot for suriloss calc
This commit is contained in:
Josh Patterson
2020-12-17 18:08:35 -05:00
committed by GitHub

View File

@@ -44,7 +44,7 @@ if [ $CHECKIT == 2 ]; then
TOTALPAST=$(($PASTPACKETS + $PASTDROP)) TOTALPAST=$(($PASTPACKETS + $PASTDROP))
TOTAL=$(($TOTALCURRENT - $TOTALPAST)) TOTAL=$(($TOTALCURRENT - $TOTALPAST))
LOSS=$(echo $DROPPED $TOTAL / p | dc) LOSS=$(echo 4 k $DROPPED $TOTAL / p | dc)
echo "suridrop drop=$LOSS" echo "suridrop drop=$LOSS"
fi fi
else else