From af2df2c7d1da2fe38b45d85d914429488e6d5d82 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Tue, 6 Oct 2020 18:44:22 -0400 Subject: [PATCH] just print the loss --- salt/telegraf/scripts/zeekcaptureloss.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/telegraf/scripts/zeekcaptureloss.sh b/salt/telegraf/scripts/zeekcaptureloss.sh index bd1c39277..365a3a71e 100644 --- a/salt/telegraf/scripts/zeekcaptureloss.sh +++ b/salt/telegraf/scripts/zeekcaptureloss.sh @@ -2,6 +2,6 @@ {% set WORKERS = salt['pillar.get']('sensor:zeek_lbprocs', salt['pillar.get']('sensor:zeek_pins') | length) %} ZEEKLOG=/host/nsm/zeek/spool/logger/capture_loss.log 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" fi