Telegraf - Fix Suri script so it requires 2 drops in a row

This commit is contained in:
Mike Reeves
2018-11-29 13:21:00 -05:00
parent bb1ee0ead5
commit 2f804335da

View File

@@ -1,7 +1,7 @@
#!/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) CHECKIT=$(echo $SURILOG | grep -o 'drop' | wc -l)
if [ $CHECKIT == 2 ]; then if [ $CHECKIT == 2 ]; then
declare RESULT=($SURILOG) declare RESULT=($SURILOG)