Hi All,
<div><br></div><div>I have come up with a solution for the HTTP log file growing too large. This could easily be adapted to the other files as well. I have been using it for a few hours now, and it starts and stops correctly when I use my own suricata start script (I've never been able to make an init.d script work to save my life, lol, to all of my scripts included are just bare shell scripts that can be run at any time.</div>
<div><br></div><div>Anyhow, please find attached the following files:</div><div><br></div><div>surilog.txt -- the start script for the logging functions. This one must be run BEFORE starting suricata!!!</div><div>startsuricata -- the start script for suricata, it starts barnyard2 and surilog</div>
<div>suricata_http.logrotate.txt -- text file for logrotate, place in /etc/logrotate.d with as suricata_http</div><div><br></div><div>I had a discussion with some folks a while (okay a long while) back about my HTTP log file filling up and when it was rotate, Suri would stop logging URLs.</div>
<div><br></div><div>My workaround to that is the surilog.txt script... </div><div><br></div><div>It checks for a FIFO / PIPE buffer, whatever you wanna call it, in /var/log/suricata/http.log -- if is not there, or if it is not a FIFO, then a buffer is created with MKFIFO.</div>
<div><br></div><div>The script simply reads from the http.log file and outputs it to http_log.log (redundant, I know, but it was what went in there, lol). The logrotate script should rotate the logs when it reaches 300M.</div>
<div><br></div><div>If you want to test this in your environment, then you can rename the http.log file to something else while suricata is running, and suricata will continue to update the new file name. Then Run the surilog script with a &, and it will create the FIFO, etc. Then restart Suricata, and away you go.</div>
<div><br></div><div>I am open to suggestions, etc. Please feel free... I did not post this to the OISF-Users list just yet.</div><div><br></div><div>Thanks!<br>~Brant</div><div><br></div><div><br></div>