It is necessary to change the /etc/logrotate.d/squid3 file to rotate
from daily to monthly so the /var/log/squid3/access.log file be present
for a longer period of time and sarg can have more information to work
with. In Ubuntu 14.04 LTS, /etc/logrotate.d/squid3 looks like the
following:

/var/log/squid3/*.log {
        monthly
        compress
        delaycompress
        rotate 2
        missingok
        nocreate
        sharedscripts
        prerotate
                test ! -x /usr/sbin/sarg-reports || /usr/sbin/sarg-reports 
monthly
        endscript
        postrotate
                test ! -e /var/run/squid3.pid || test ! -x /usr/sbin/squid3 || 
/usr/sbin/squid3 -k rotate
        endscript
}

Note here that the rotation frequency (monthly in this case) must be
provided as argument to sarg-reports command (it by default isn't and
generates an issue) so logrotate and sarg be both consequent one
another.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/590342

Title:
  logrotate rotates logs before analysers can parse them

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/590342/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to