mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-11 03:32:53 +01:00
ADding Suricata log compression
This commit is contained in:
6
salt/suricata/cron/surilogcompress
Normal file
6
salt/suricata/cron/surilogcompress
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/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
|
||||||
@@ -68,6 +68,21 @@ surirulesync:
|
|||||||
- user: 940
|
- user: 940
|
||||||
- group: 940
|
- group: 940
|
||||||
|
|
||||||
|
surilogscript:
|
||||||
|
file.managed:
|
||||||
|
- name: /usr/local/bin/surilogcompress
|
||||||
|
- source: salt://suricata/cron/surilogcompress
|
||||||
|
- mode: 755
|
||||||
|
|
||||||
|
/usr/local/bin/surilogcompress:
|
||||||
|
cron.present:
|
||||||
|
- user: suricata
|
||||||
|
- minute: '17'
|
||||||
|
- hour: '*'
|
||||||
|
- daymonth: '*'
|
||||||
|
- month: '*'
|
||||||
|
- dayweek: '*'
|
||||||
|
|
||||||
suriconfigsync:
|
suriconfigsync:
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: /opt/so/conf/suricata/suricata.yaml
|
- name: /opt/so/conf/suricata/suricata.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user