Rotate suri stats log hourly

This commit is contained in:
Mike Reeves
2020-08-23 16:08:17 -04:00
parent ebd8105cb5
commit a97ca94354
2 changed files with 2 additions and 4 deletions

View File

@@ -1,6 +1,4 @@
#!/bin/bash
# Gzip the eve logs
find /nsm/suricata/eve*.json -type f -printf '%T@\t%p\n' | sort -t $'\t' -g | head -n -1 | cut -d $'\t' -f 2- | xargs nice gzip
# TODO Add stats log
/usr/sbin/logrotate -f /opt/so/conf/suricata/suri-rotate.conf > /dev/null 2>&1

View File

@@ -168,7 +168,7 @@ surilogrotate:
/usr/local/bin/surirotate:
cron.present:
- user: root
- minute: '6'
- minute: '11'
- hour: '*'
- daymonth: '*'
- month: '*'