Sarg cron scripts don't generate logs correctly

Bug #239384 reported by Mensi
16
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.

Tags: sarg
Revision history for this message
mmaura (mmaura66) wrote :

always present in Lucid

way to solve :

rm /etc/cron.daily/sarg
rm /etc/cron.weekly/sarg
rm /etc/cron.monthly/sarg

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
# test ! -x /usr/sbin/sarg-reports || /usr/sbin/sarg-reports
        endscript

Revision history for this message
mmaura (mmaura66) wrote :

this bug is present since 2 years

Changed in sarg (Ubuntu):
status: New → Confirmed
Changed in sarg (Ubuntu):
assignee: nobody → Andrea Colangelo (warp10)
importance: Undecided → Low
status: Confirmed → In Progress
Revision history for this message
Peter Meiser (meiser79) wrote :

From my POV, the user argument is missing. It should look like this:

SHELL=/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin

00 08-18/1 * * * root sarg-reports today
00 00 * * * root sarg-reports daily
00 01 * * 1 root sarg-reports weekly
30 02 1 * * root sarg-reports monthly

Revision history for this message
Thomas (t.c) wrote :

still no fix on the package?

Revision history for this message
Thomas (t.c) wrote :

And why is Importance only low?

A logfile analyzer which not runs to the right time is not really useful.

So can please somebody change the Importance to more than low or still fix it (it is not so mush to do).

Changed in sarg (Ubuntu):
status: In Progress → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.