Re: [squid-users] How to set /etc/logrotate.d/squid to have good sarg reports?
Hallo, Bartosz, you wrote in How to set /etc/logrotate.d/squid to have good sarg reports?: How to set /etc/logrotate.d/squid to have good sarg reports? My system runs the sarg reports at the end of the day, as a separate cronjob, and logrotate runs in the very early morning, as part of cron.daily. Viele Gruesse! Helmut
Re: [squid-users] How to set /etc/logrotate.d/squid to have good sarg reports?
My system runs the sarg reports at the end of the day, as a separate cronjob, and logrotate runs in the very early morning, as part of cron.daily. Helmut So how can you create weekly and monthly reports if you create every day new log file? /etc/sarg/sarg.conf # TAG: access_log file # Where is the access.log file # sarg -l file # access_log /var/log/squid/access.log And after rotating you are having only one day in log file, dont you? Bartosz.
Re: [squid-users] How to set /etc/logrotate.d/squid to have good sarg reports?
Hallo, Bartosz, you wrote to [squid-users] How to set /etc/logrotate.d/squid to have good sarg reports?: My system runs the sarg reports at the end of the day, as a separate cronjob, and logrotate runs in the very early morning, as part of cron.daily. Helmut So how can you create weekly and monthly reports if you create every day new log file? I create only daily reports. For quota etc. I use squish. And after rotating you are having only one day in log file, dont you? That's another problem; I've just seen that rotating doesn't work as expected ... Viele Gruesse! Helmut
Re: [squid-users] How to set /etc/logrotate.d/squid to have good sarg reports?
Hi, I also only do daily around 6h30, all from /etc/logrotate.d/squid: /var/log/squid/*.log { daily prerotate sarg 21 | logger /usr/lib/calamaris/calamaris-cron-script | logger endscript postrotate /etc/init.d/squid restart | logger endscript Sean On 29 November 2012 14:26, Helmut Hullen hul...@t-online.de wrote: Hallo, Bartosz, you wrote to [squid-users] How to set /etc/logrotate.d/squid to have good sarg reports?: My system runs the sarg reports at the end of the day, as a separate cronjob, and logrotate runs in the very early morning, as part of cron.daily. Helmut So how can you create weekly and monthly reports if you create every day new log file? I create only daily reports. For quota etc. I use squish. And after rotating you are having only one day in log file, dont you? That's another problem; I've just seen that rotating doesn't work as expected ... Viele Gruesse! Helmut
Re: [squid-users] How to set /etc/logrotate.d/squid to have good sarg reports?
On 29 November 2012 14:42, Sean Boran s...@boran.com wrote: Hi, I also only do daily around 6h30, all from /etc/logrotate.d/squid: /var/log/squid/*.log { daily prerotate sarg 21 | logger /usr/lib/calamaris/calamaris-cron-script | logger endscript postrotate /etc/init.d/squid restart | logger endscript Sean Do you have weekly and monthly reports by sarg? Bartosz.
Re: [squid-users] How to set /etc/logrotate.d/squid to have good sarg reports?
Hallo, Bartosz, bartos...@gmail.com meinte am 29.11.12 in squid zum Thema Re: [squid-users] How to set /etc/logrotate.d/squid to have good sarg reports?: My system runs the sarg reports at the end of the day, as a separate cronjob, and logrotate runs in the very early morning, as part of cron.daily. [...] And after rotating you are having only one day in log file, dont you? Yes, that may happen. I've just written a quick and dirty script which deletes all sarg directories which are older than 3 months. It's invoked from the /etc/ cron.monthly directory, it could be invoked from a simple cron job instead. The only thing you should change is DocRoot. #! /bin/bash # loescht alte sarg-Verzeichnisse # Helmut Hullen DocRoot=/home/www/squid-reports sargRef=/tmp/sarg$$ touch -d 'now - 3 months' $sargRef || exit 1 for Verz in $DocRoot/* do test -d $Verz || continue test -s $Verz/sarg-date || continue test $Verz/sarg-date -nt $sargRef continue rm -rf $Verz done rm -f $sargRef # # == # $Id: sarg-alt,v 1.1 2012-11-29 15:39:53+01 HHullen Exp $ # $Log: sarg-alt,v $ # Revision 1.1 2012-11-29 15:39:53+01 HHullen # Start # This script is independent from every logrotate mechanism. Viele Gruesse! Helmut