add logrotate

This commit is contained in:
Mike Reeves
2020-08-20 16:46:32 -04:00
parent 44093e7484
commit b7da768dc7
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
/opt/so/log/suricata/stats.log
{
daily
rotate 2
missingok
nocompress
create
sharedscripts
postrotate
docker exec -d so-suricata sh -c 'kill -HUP 6'
endscript
}

View File

@@ -152,3 +152,9 @@ so-suricata:
- file: surithresholding - file: surithresholding
- file: /opt/so/conf/suricata/rules/ - file: /opt/so/conf/suricata/rules/
- file: /opt/so/conf/suricata/bpf - file: /opt/so/conf/suricata/bpf
surilogrotate:
file.managed:
- name: /etc/logrotate.d/suristats
- source: salt://suricata/files/suri-rotate.conf
- mode: 644