[Bug 1414754] Re: /etc/logrotate.d/squid3 fails to execute sarg-reports
Alain Reguera Delgado
alain.reguera at gmail.com
Sun Mar 6 22:15:54 UTC 2016
Well, I reported the issue because the sarg monthly report was never
made in a pristine installation. In the research I found that the
access.log file was truncated in a period of time (daily) which is not
appropriate for a monthly report, nor even weekly reports. Even though
sarg scripts are correctly installed and execute, the problem isn't in
them a.f.a I can see, but in the amount of information available in the
access.log file. If it is truncated daily, it is not possible for sarg
to have enough information to make a monthly report.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/1414754
Title:
/etc/logrotate.d/squid3 fails to execute sarg-reports
Status in logrotate package in Ubuntu:
Confirmed
Status in squid3 package in Ubuntu:
New
Bug description:
In Edubuntu 14.04 LTS, by default, the /etc/logrotate.d/squid3 file is
set to rotate the logs in a daily basis but it doesn't specifies that
to sarg-reports command.
/var/log/squid3/*.log {
daily
compress
delaycompress
rotate 2
missingok
nocreate
sharedscripts
prerotate
test ! -x /usr/sbin/sarg-reports || /usr/sbin/sarg-reports
endscript
postrotate
test ! -e /var/run/squid3.pid || test ! -x /usr/sbin/squid3 || /usr/sbin/squid3 -k rotate
endscript
}
As consequence, sarg-reports fails to do its job and anacron reports
the following message:
/etc/cron.daily/logrotate:
SARG - Daily / Weekly / Monthly - Squid proxy usage reports creation tool
Written by Ugo Viti <ugo.viti at initzero.it>
Version: 20050202
Usage: /usr/sbin/sarg-reports [OPTIONS]
Allowed options:
manual, Create Manual report
today, Create Today report
daily, Create Daily report
weekly, Create Weekly report
monthly, Create Monthly report
A possible solution would be to add the rotation frequency required by
sarg-reports command as argument to it.
/var/log/squid3/*.log {
daily
compress
delaycompress
rotate 2
missingok
nocreate
sharedscripts
prerotate
test ! -x /usr/sbin/sarg-reports || /usr/sbin/sarg-reports daily
endscript
postrotate
test ! -e /var/run/squid3.pid || test ! -x /usr/sbin/squid3 || /usr/sbin/squid3 -k rotate
endscript
}
In a Squid3+Sarg configuration, it may be convenient to change the log
rotation frequency from daily to monthly, so sarg has more information
to work with in a single /var/log/squid3/access.log file.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1414754/+subscriptions
More information about the foundations-bugs
mailing list