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