mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Bro - Add cron for checking PL
This commit is contained in:
@@ -5,8 +5,13 @@ declare RESULT=($BROLOG)
|
|||||||
CURRENTDROP=${RESULT[3]}
|
CURRENTDROP=${RESULT[3]}
|
||||||
PASTDROP=${RESULT[9]}
|
PASTDROP=${RESULT[9]}
|
||||||
DROPPED=$(($CURRENTDROP - $PASTDROP))
|
DROPPED=$(($CURRENTDROP - $PASTDROP))
|
||||||
CURRENTPACKETS=${RESULT[5]}
|
if [ $DROPPED == 0 ]; then
|
||||||
PASTPACKETS=${RESULT[11]}
|
LOSS=0
|
||||||
TOTAL=$(($CURRENTPACKETS - $PASTPACKETS))
|
echo "brodrop drop=0"
|
||||||
LOSS=$(echo $DROPPED $TOTAL / p | dc)
|
else
|
||||||
echo "brodrop drop=$LOSS"
|
CURRENTPACKETS=${RESULT[5]}
|
||||||
|
PASTPACKETS=${RESULT[11]}
|
||||||
|
TOTAL=$(($CURRENTPACKETS - $PASTPACKETS))
|
||||||
|
LOSS=$(echo $DROPPED $TOTAL / p | dc)
|
||||||
|
echo "brodrop drop=$LOSS"
|
||||||
|
fi
|
||||||
|
|||||||
@@ -9,13 +9,17 @@ if [ $CHECKIT == 2 ]; then
|
|||||||
CURRENTDROP=${RESULT[4]}
|
CURRENTDROP=${RESULT[4]}
|
||||||
PASTDROP=${RESULT[14]}
|
PASTDROP=${RESULT[14]}
|
||||||
DROPPED=$(($CURRENTDROP - $PASTDROP))
|
DROPPED=$(($CURRENTDROP - $PASTDROP))
|
||||||
|
if [ $DROPPED == 0 ]; then
|
||||||
|
LOSS=0
|
||||||
|
echo "suridrop drop=0"
|
||||||
|
else
|
||||||
|
CURRENTPACKETS=${RESULT[9]}
|
||||||
|
PASTPACKETS=${RESULT[19]}
|
||||||
|
TOTAL=$(($CURRENTPACKETS - $PASTPACKETS))
|
||||||
|
|
||||||
CURRENTPACKETS=${RESULT[9]}
|
LOSS=$(echo $DROPPED $TOTAL / p | dc)
|
||||||
PASTPACKETS=${RESULT[19]}
|
echo "suridrop drop=$LOSS"
|
||||||
TOTAL=$(($CURRENTPACKETS - $PASTPACKETS))
|
fi
|
||||||
|
|
||||||
LOSS=$(echo $DROPPED $TOTAL / p | dc)
|
|
||||||
echo "suridrop drop=$LOSS"
|
|
||||||
else
|
else
|
||||||
echo "suridrop drop=0"
|
echo "suridrop drop=0"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user