mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
fix LOSS calc line
This commit is contained in:
@@ -18,7 +18,7 @@ if [ -f "$ZEEKLOG" ]; then
|
|||||||
if [ -f "$LASTCAPTURELOSSLOG" ]; then
|
if [ -f "$LASTCAPTURELOSSLOG" ]; then
|
||||||
LASTTS=$(cat $LASTCAPTURELOSSLOG)
|
LASTTS=$(cat $LASTCAPTURELOSSLOG)
|
||||||
if [[ "$LASTTS" != "$CURRENTTS" ]]; then
|
if [[ "$LASTTS" != "$CURRENTTS" ]]; then
|
||||||
LOSS=$(tail -$WORKERS $ZEEKLOG | awk -F, '{print $NF}' | sed 's/}//' | awk -F: '{LOSS += $2 / $WORKERS END { print LOSS}')
|
LOSS=$(tail -$WORKERS $ZEEKLOG | awk -F, '{print $NF}' | sed 's/}//' | awk -v WORKERS=$WORKERS -F: '{LOSS += $2 / WORKERS} END { print LOSS}')
|
||||||
echo "zeekcaptureloss loss=$LOSS"
|
echo "zeekcaptureloss loss=$LOSS"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user