Re: [squid-users] Log rotation kills helpers
I had this problem, with kerberos authentication helpers. I configured logrotate to rotate squid logs, # cat /etc/logrotate.d/squid /var/log/squid/*.log { daily rotate 7 compress notifempty sharedscripts missingok postrotate /path/to/squid -k rotate endscript } and at squid.conf logfile_rotate 0 Then, no more troubles. On Mon, Sep 30, 2013 at 12:19 PM, Alex Rousskov rouss...@measurement-factory.com wrote: On 30/09/2013 7:26 p.m., Kris Glynn wrote: Shouldn't a squid -k rotate leave helpers alone when it's just instructing squid to rotate the logs? Yes, but nobody has implemented that functionality yet. Implementing it is not easy because of the complication that Amos has mentioned below: On 09/30/2013 01:16 AM, Amos Jeffries wrote: The helpers are logging to cache.log via stderr. They need to be restarted to connect to the new cache.log once it has been rotated. Ideally, Squid should proxy helper logging messages (instead of tying them to a specific cache.log descriptor) so that log rotation does not kill helpers. http://wiki.squid-cache.org/SquidFaq/AboutSquid#How_to_add_a_new_Squid_feature.2C_enhance.2C_of_fix_something.3F Alex.
Re: [squid-users] Log rotation kills helpers
If you use something like log helper and send the logs to another component like syslog or any other logs server you won't have any of these troubles in most cases. Eliezer On 10/01/2013 10:18 PM, Carlos Defoe wrote: I had this problem, with kerberos authentication helpers. I configured logrotate to rotate squid logs, # cat /etc/logrotate.d/squid /var/log/squid/*.log { daily rotate 7 compress notifempty sharedscripts missingok postrotate /path/to/squid -k rotate endscript } and at squid.conf logfile_rotate 0 Then, no more troubles. On Mon, Sep 30, 2013 at 12:19 PM, Alex Rousskov rouss...@measurement-factory.com wrote: On 30/09/2013 7:26 p.m., Kris Glynn wrote: Shouldn't a squid -k rotate leave helpers alone when it's just instructing squid to rotate the logs? Yes, but nobody has implemented that functionality yet. Implementing it is not easy because of the complication that Amos has mentioned below: On 09/30/2013 01:16 AM, Amos Jeffries wrote: The helpers are logging to cache.log via stderr. They need to be restarted to connect to the new cache.log once it has been rotated. Ideally, Squid should proxy helper logging messages (instead of tying them to a specific cache.log descriptor) so that log rotation does not kill helpers. http://wiki.squid-cache.org/SquidFaq/AboutSquid#How_to_add_a_new_Squid_feature.2C_enhance.2C_of_fix_something.3F Alex.
Re: [squid-users] Log rotation kills helpers
On 30/09/2013 7:26 p.m., Kris Glynn wrote: Shouldn't a squid -k rotate leave helpers alone when it's just instructing squid to rotate the logs? Yes, but nobody has implemented that functionality yet. Implementing it is not easy because of the complication that Amos has mentioned below: On 09/30/2013 01:16 AM, Amos Jeffries wrote: The helpers are logging to cache.log via stderr. They need to be restarted to connect to the new cache.log once it has been rotated. Ideally, Squid should proxy helper logging messages (instead of tying them to a specific cache.log descriptor) so that log rotation does not kill helpers. http://wiki.squid-cache.org/SquidFaq/AboutSquid#How_to_add_a_new_Squid_feature.2C_enhance.2C_of_fix_something.3F Alex.
[squid-users] log rotation
Hello, I have looked at wiki but cannot find information about log rotation (access store logs). How can I do this? Or is it simply a matter of defining log rotation in newsyslog.conf (I am on a FreeBSD system)? Thank you! -- Zbigniew Szalbot
Re: [squid-users] log rotation
Yo! On Wednesday 25 July 2007 10:20, Zbigniew Szalbot wrote: Hello, I have looked at wiki but cannot find information about log rotation (access store logs). How can I do this? Or is it simply a matter of defining log rotation in newsyslog.conf (I am on a FreeBSD system)? squid -k rotate will tell squid to rotate its own logs! Look in the well documented squid.conf.example file for this tag logfile_rotate and all will come clear. You do not normally need the store log so set it to none in squid.conf. Access and Cache logs are normally all you need! Cheers Ang -- Angela Williams Enterprise Outsourcing Unix/Linux Cisco spoken here! Bedfordview [EMAIL PROTECTED] Gauteng South Africa Smile!! Jesus Loves You!!
Re: [squid-users] log rotation
Zbigniew Szalbot wrote: Hello, I have looked at wiki but cannot find information about log rotation (access store logs). How can I do this? Or is it simply a matter of defining log rotation in newsyslog.conf (I am on a FreeBSD system)? Hi Zbigniew, Go to: (1.) cd /usr/ports/sysutils/logrotate (2.) make install clean (3.) cd /usr/local/etc (4.) vi /usr/local/etc/logrotate.conf Put the following in logrotate.conf # Start of logrotate.conf ### # rotate log files weekly #weekly daily # keep 4 weeks worth of backlogs rotate 7 # send errors to root #errors root # create new (empty) log files after rotating old ones create # uncomment this if you want your log files compressed compress # RPM packages drop log rotation information into this directory include /usr/local/etc/logrotate.d /var/log/lastlog { monthly rotate 12 } End of logrotate.conf ## (5.) mkdir -p /usr/local/etc/logrotate.d/ (6.) cd /usr/local/etc/logrotate.d/ (7.) vi /usr/local/etc/logrotate.d/squid Put the following: ###Start of squid# /var/log/squid/access.log { daily rotate 90 copytruncate compress notifempty missingok } /var/log/squid/cache.log { daily rotate 7 copytruncate compress notifempty missingok } (8.) /usr/local/sbin/logrotate -d /usr/local/etc/logrotate.conf (9.) /usr/local/sbin/logrotate -f /usr/local/etc/logrotate.conf If some errors are reported, it's normal, just create or touch the relevant files or directories. (10.) vi /etc/crontab Put the following: 0 1 * * * root/usr/local/sbin/logrotate /usr/local/etc/logrotate.conf /dev/null 21 (11.) If all works well, you are good to go!!! Of course, the other simple way of doing this is to run: squid -k rotate from /etc/crontab 0 1 * * * root squid -k rotate Thanking you... Thank you! -- With best regards and good wishes, Yours sincerely, Tek Bahadur Limbu (TAG/TDG Group) Jwl Systems Department Worldlink Communications Pvt. Ltd. Jawalakhel, Nepal http://www.wlink.com.np
Re: [squid-users] log rotation
Hello, On Wed, 25 Jul 2007 18:50:27 +0545, Tek Bahadur Limbu [EMAIL PROTECTED] wrote: Zbigniew Szalbot wrote: Hello, I have looked at wiki but cannot find information about log rotation (access store logs). How can I do this? Or is it simply a matter of defining log rotation in newsyslog.conf (I am on a FreeBSD system)? Hi Zbigniew, Go to: (1.) cd /usr/ports/sysutils/logrotate (2.) make install clean (3.) cd /usr/local/etc (4.) vi /usr/local/etc/logrotate.conf Put the following in logrotate.conf Thank you very much indeed! But I managed in a (I think) simpler way by adding /usr/local/squid/logs/access.log squid:squid 644 7 * @T00 J /usr/local/squid/logs/squid.pid 30 to newsyslog.conf. But I appreciate such a thorough description! Warm regards, Zbigniew Szalbot # Start of logrotate.conf ### # rotate log files weekly #weekly daily # keep 4 weeks worth of backlogs rotate 7 # send errors to root #errors root # create new (empty) log files after rotating old ones create # uncomment this if you want your log files compressed compress # RPM packages drop log rotation information into this directory include /usr/local/etc/logrotate.d /var/log/lastlog { monthly rotate 12 } End of logrotate.conf ## (5.) mkdir -p /usr/local/etc/logrotate.d/ (6.) cd /usr/local/etc/logrotate.d/ (7.) vi /usr/local/etc/logrotate.d/squid Put the following: ###Start of squid# /var/log/squid/access.log { daily rotate 90 copytruncate compress notifempty missingok } /var/log/squid/cache.log { daily rotate 7 copytruncate compress notifempty missingok } (8.) /usr/local/sbin/logrotate -d /usr/local/etc/logrotate.conf (9.) /usr/local/sbin/logrotate -f /usr/local/etc/logrotate.conf If some errors are reported, it's normal, just create or touch the relevant files or directories. (10.) vi /etc/crontab Put the following: 0 1 * * * root/usr/local/sbin/logrotate /usr/local/etc/logrotate.conf /dev/null 21 (11.) If all works well, you are good to go!!! Of course, the other simple way of doing this is to run: squid -k rotate from /etc/crontab 0 1 * * * root squid -k rotate Thanking you... Thank you! -- With best regards and good wishes, Yours sincerely, Tek Bahadur Limbu (TAG/TDG Group) Jwl Systems Department Worldlink Communications Pvt. Ltd. Jawalakhel, Nepal http://www.wlink.com.np -- Zbigniew Szalbot -- Zbigniew Szalbot