mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
just print the loss
This commit is contained in:
@@ -2,6 +2,6 @@
|
|||||||
{% set WORKERS = salt['pillar.get']('sensor:zeek_lbprocs', salt['pillar.get']('sensor:zeek_pins') | length) %}
|
{% set WORKERS = salt['pillar.get']('sensor:zeek_lbprocs', salt['pillar.get']('sensor:zeek_pins') | length) %}
|
||||||
ZEEKLOG=/host/nsm/zeek/spool/logger/capture_loss.log
|
ZEEKLOG=/host/nsm/zeek/spool/logger/capture_loss.log
|
||||||
if [ -f "$ZEEKLOG" ]; then
|
if [ -f "$ZEEKLOG" ]; then
|
||||||
LOSS=$(tail -{{WORKERS}} $ZEEKLOG | awk -F, '{print $NF}' | sed 's/}//' | awk -F: '{LOSS += $2 / {{WORKERS}}} END { print "loss: " LOSS}')
|
LOSS=$(tail -{{WORKERS}} $ZEEKLOG | awk -F, '{print $NF}' | sed 's/}//' | awk -F: '{LOSS += $2 / {{WORKERS}}} END { print LOSS}')
|
||||||
echo "zeekcaptureloss loss=$LOSS"
|
echo "zeekcaptureloss loss=$LOSS"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user