Sarg cron scripts don't generate logs correctly
Bug #239384 reported by
Mensi
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sarg (Ubuntu) |
Confirmed
|
Low
|
Andrea Colangelo |
Bug Description
Binary package hint: sarg
Description: Ubuntu 8.04
Release: 8.04
Version: 2.2.5-1
What I expected to happen:
Weekly + monthly usage stats would be generated from the Squid logs for the full week/month.
What happened instead:
Weekly reports only contained usage for last day, monthly reports contain usage for last week of month.
Solution:
Including the log file parameter in the weekly+monthly cron scripts so that Sarg looks at all the relevant log files.
Changed in sarg (Ubuntu): | |
assignee: | nobody → Andrea Colangelo (warp10) |
importance: | Undecided → Low |
status: | Confirmed → In Progress |
To post a comment you must log in.
always present in Lucid
way to solve :
rm /etc/cron. daily/sarg weekly/ sarg monthly/ sarg
rm /etc/cron.
rm /etc/cron.
echo "PATH=/ bin:/sbin: /usr/bin: /usr/sbin: /usr/local/ bin:/usr/ local/sbin
00 08-18/1 * * * sarg-reports today
00 00 * * * sarg-reports daily
00 01 * * 1 sarg-reports weekly
30 02 1 * * sarg-reports monthly" > /etc/cron.d/sarg
After we must change log rotatation for squid to monthly
and remove the obsolete and broken prerotate line :
(/etc/logrotate .d/squid)
prerotate sarg-reports || /usr/sbin/ sarg-reports
# test ! -x /usr/sbin/
endscript