mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Telegraf - Fix Suri script so it requires 2 drops in a row
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
SURILOG=$(tac /var/log/suricata/stats.log | grep kernel | head -4)
|
SURILOG=$(tac /var/log/suricata/stats.log | grep kernel | head -4)
|
||||||
|
CHECKIT=$(echo $SURILOG | grep drop | wc -l)
|
||||||
|
|
||||||
|
if [ $CHECKIT == 2 ]; then
|
||||||
declare RESULT=($SURILOG)
|
declare RESULT=($SURILOG)
|
||||||
|
|
||||||
CURRENTDROP=${RESULT[4]}
|
CURRENTDROP=${RESULT[4]}
|
||||||
@@ -13,3 +16,6 @@ TOTAL=$(($CURRENTPACKETS - $PASTPACKETS))
|
|||||||
|
|
||||||
LOSS=$(echo $DROPPED $TOTAL / p | dc)
|
LOSS=$(echo $DROPPED $TOTAL / p | dc)
|
||||||
echo "suridrop drop=$LOSS"
|
echo "suridrop drop=$LOSS"
|
||||||
|
else
|
||||||
|
echo "suridrop drop=0"
|
||||||
|
fi
|
||||||
|
|||||||
0
salt/common/tools/brostatus.sh
Normal file
0
salt/common/tools/brostatus.sh
Normal file
@@ -77,7 +77,7 @@ stats:
|
|||||||
enabled: yes
|
enabled: yes
|
||||||
# The interval field (in seconds) controls at what interval
|
# The interval field (in seconds) controls at what interval
|
||||||
# the loggers are invoked.
|
# the loggers are invoked.
|
||||||
interval: 8
|
interval: 30
|
||||||
|
|
||||||
# Configure the type of alert (and other) logging you would like.
|
# Configure the type of alert (and other) logging you would like.
|
||||||
outputs:
|
outputs:
|
||||||
|
|||||||
Reference in New Issue
Block a user