mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-15 21:52:47 +01:00
[feat] Move logrotate configuration settings to pillar
This commit is contained in:
11
pillar/logrotate/init.sls
Normal file
11
pillar/logrotate/init.sls
Normal file
@@ -0,0 +1,11 @@
|
||||
logrotate:
|
||||
conf: |
|
||||
daily
|
||||
rotate 14
|
||||
missingok
|
||||
copytruncate
|
||||
nocompress
|
||||
create
|
||||
extension .log
|
||||
dateext
|
||||
dateyesterday
|
||||
@@ -1,6 +1,7 @@
|
||||
base:
|
||||
'*':
|
||||
- patch.needs_restarting
|
||||
- logrotate
|
||||
|
||||
'*_eval or *_helix or *_heavynode or *_sensor or *_standalone or *_import':
|
||||
- match: compound
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
{%- set logrotate_conf = salt['pillar.get']['logrotate:conf'] %}
|
||||
|
||||
/opt/so/log/aptcacher-ng/*.log
|
||||
/opt/so/log/idstools/*.log
|
||||
/opt/so/log/nginx/*.log
|
||||
@@ -13,13 +15,5 @@
|
||||
/opt/so/log/telegraf/*.log
|
||||
/opt/so/log/redis/*.log
|
||||
{
|
||||
daily
|
||||
rotate 2
|
||||
missingok
|
||||
copytruncate
|
||||
nocompress
|
||||
create
|
||||
extension .log
|
||||
dateext
|
||||
dateyesterday
|
||||
{{ logrotate_conf }}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user