<div dir="ltr">Yasha,<div> I've used the following with success. The 'copytruncate' directive is what you want to allow suricata to continue writing to the same file handle while rotating off old stats.</div>
<div><br></div><div><div>"/var/log/suricata/stats.log" {</div><div> daily</div><div> compress</div><div> copytruncate</div><div> rotate 7</div><div> missingok</div><div>}</div></div><div><br></div><div>-david vasil</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 7, 2014 at 10:02 AM, Yasha Zislin <span dir="ltr"><<a href="mailto:coolyasha@hotmail.com" target="_blank">coolyasha@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">I am trying to logrotate stats.log file<br><br>My logrotate config for that file is <br>/var/log/suricata/stats.log {<br> missingok<br> notifempty<br> size 20k<br> weekly<br>
create 0640 suricata suricata<br>}<br><br>I am not an expert on logrotate but this was working for other system files like syslog.<br><br>So stats.log rotated this past friday but Suricata is still writting to old file.<br>
-rw-r----- 1 suricata suricata 0 Jul 6 03:12 stats.log<br>-rw-r----- 1 root root 1019158188 Jul 7 11:01 stats.log-20140706<br><br>Does anybody know how to get logrotation configured with Suricata for stats.log file?<br>
<br>Thanks.<br> </div></div>
<br>_______________________________________________<br>
Suricata IDS Users mailing list: <a href="mailto:oisf-users@openinfosecfoundation.org">oisf-users@openinfosecfoundation.org</a><br>
Site: <a href="http://suricata-ids.org" target="_blank">http://suricata-ids.org</a> | Support: <a href="http://suricata-ids.org/support/" target="_blank">http://suricata-ids.org/support/</a><br>
List: <a href="https://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users" target="_blank">https://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users</a><br>
OISF: <a href="http://www.openinfosecfoundation.org/" target="_blank">http://www.openinfosecfoundation.org/</a><br></blockquote></div><br></div>