mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Bro - Add cron for checking PL
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
/usr/bin/docker exec -it so-bro /opt/bro/bin/broctl netstats | awk -F '[ =]' '{RCVD += $5;DRP += $7;TTL += $9} END { print "rcvd: " RCVD, "dropped: " DRP, "total: " TTL}' >> /nsm/bro/logs/packetloss.log
|
||||
/usr/bin/docker exec so-bro /opt/bro/bin/broctl netstats | awk -F '[ =]' '{RCVD += $5;DRP += $7;TTL += $9} END { print "rcvd: " RCVD, "dropped: " DRP, "total: " TTL}' >> /nsm/bro/logs/packetloss.log
|
||||
|
||||
@@ -74,7 +74,7 @@ plcronscript:
|
||||
/usr/local/bin/packetloss.sh:
|
||||
cron.present:
|
||||
- user: root
|
||||
- minute: '*/10'
|
||||
- minute: '*/2'
|
||||
- hour: '*'
|
||||
- daymonth: '*'
|
||||
- month: '*'
|
||||
|
||||
6
salt/common/telegraf/scripts/broloss.sh
Normal file
6
salt/common/telegraf/scripts/broloss.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get the data
|
||||
DROP=$(tac /var/log/stenographer/stenographer.log | grep -m1 drop | awk '{print $14}' | awk -F "=" '{print $2}')
|
||||
|
||||
echo "stenodrop drop=$DROP"
|
||||
Reference in New Issue
Block a user