]> git.ipfire.org Git - ipfire-2.x.git/blob - config/etc/logrotate.conf
logrotate: Rotate suricata logs instead of snort ones
[ipfire-2.x.git] / config / etc / logrotate.conf
1 # rotate log files weekly
2 weekly
3
4 # keep 52 weeks worth of backlogs
5 rotate 52
6
7 # create new (empty) log files after rotating old ones
8 create
9
10 # uncomment this if you want your log files compressed
11 compress
12
13 # packages drop log rotation information into this directory
14 include /etc/logrotate.d
15
16 # wtmp
17 /var/log/wtmp {
18 weekly
19 create 0664 root utmp
20 rotate 1
21 }
22
23 /var/log/httpd/access_log /var/log/httpd/error_log /var/log/httpd/ssl_request_log /var/log/httpd/ssl_engine_log {
24 missingok
25 sharedscripts
26 postrotate
27 /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
28 endscript
29 }
30
31 /var/log/suricata/*.log {
32 weekly
33 copytruncate
34 compress
35 ifempty
36 missingok
37 postrotate
38 /bin/find /var/log/suricata -path '/var/log/suricata/[0-9]*' -prune -exec /bin/rm -rf {} \;
39 /bin/find /var/log/suricata -name 'fast.log.*' -mtime +28 -exec /bin/rm -rf {} \;
40 /bin/kill -HUP `cat /var/run/suricata.pid 2> /dev/null` 2> /dev/null || true
41 endscript
42 }
43
44 /var/log/squid/access.log /var/log/squid/user_agent.log /var/log/squid/referer.log {
45 weekly
46 copytruncate
47 ifempty
48 missingok
49 }
50
51 /var/log/squid/cache.log {
52 weekly
53 rotate 3
54 copytruncate
55 compress
56 missingok
57 }
58
59 /var/log/squid/store.log {
60 weekly
61 rotate 3
62 copytruncate
63 compress
64 missingok
65 postrotate
66 /bin/chmod -R ugo+rX /var/log/squid
67 /usr/sbin/squid -k rotate
68 endscript
69 }
70
71 /var/log/messages /var/log/bootlog /var/log/dhcpcd.log {
72 create 664 root syslogd
73 sharedscripts
74 ifempty
75 postrotate
76 /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
77 endscript
78 }
79
80 /var/log/squidGuard/*.log {
81 weekly
82 rotate 4
83 copytruncate
84 compress
85 notifempty
86 missingok
87 }
88
89 /var/log/updatexlrator/*.log {
90 weekly
91 rotate 4
92 copytruncate
93 compress
94 notifempty
95 missingok
96 }