[Bug 1414754] Re: /etc/logrotate.d/squid3 fails to execute sarg-reports
Todd Bradshaw
snooptodd at gmail.com
Sun Mar 6 14:34:40 UTC 2016
Sarg installs its own cron.daily,weekly,monthly scripts.
If this line executes then... well it probably wont be what is wanted.
The way it is now, you know it is there and it doesn't cause problems.
--
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