Debian Bug report logs - #369693
Sarg should re-configure (or warn about) squid log rotation

version graph

Package: sarg; Maintainer for sarg is Luigi Gangitano <luigi@debian.org>; Source for sarg is src:sarg.

Reported by: "David Purdy" <david@radioretail.co.za>

Date: Wed, 31 May 2006 20:48:12 UTC

Severity: normal

Found in versions sarg/2.1-4, sarg/2.2.2-1, sarg/2.2.5-1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Luigi Gangitano <luigi@debian.org>:
Bug#369693; Package sarg. Full text and rfc822 format available.

Acknowledgement sent to "David Purdy" <david@radioretail.co.za>:
New Bug report received and forwarded. Copy sent to Luigi Gangitano <luigi@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "David Purdy" <david@radioretail.co.za>
To: submit@bugs.debian.org
Subject: Sarg should re-configure (or warn about) squid log rotation
Date: Wed, 31 May 2006 14:52:15 +0200
Package: sarg
Version: 2.1-4

With default cron, logrotate & squid settings under Debian, Squid's log is 
rotated every morning at 6:25, truncating /var/log/squid/access.log. This is 
acceptable default behaviour for a squid installation without sarg, but with 
sarg there are problems. eg, sarg daily reports lose 6 hours and 25 minutes 
worth of data. Weekly and Monthly reports will not work at all.

If a user is interested in daily sarge reports, then the squid log rotation 
should ideally take place at 12 AM each evening.

If a user is interested in weekly or monthy reports, sarge should run at 12 
AM (once a week or month) and then the squid log rotated immediately 
afterwards

A default sarg installation should not by default behave badly (losing 6+ 
hours data every day). It should have an option to re-configure squid log 
rotation, or at least tell the user that a manual logrotate configuration is 
necessary.




Information forwarded to debian-bugs-dist@lists.debian.org, francyci@gmail.com, Luigi Gangitano <luigi@debian.org>:
Bug#369693; Package sarg. Full text and rfc822 format available.

Acknowledgement sent to Chris Francy <francyci@gmail.com>:
Extra info received and forwarded to list. Copy sent to francyci@gmail.com, Luigi Gangitano <luigi@debian.org>. Full text and rfc822 format available.

Message #10 received at 369693@bugs.debian.org (full text, mbox):

From: Chris Francy <francyci@gmail.com>
To: Debian Bug Tracking System <369693@bugs.debian.org>
Subject: sarg: Default settings seems to do nothing
Date: Wed, 07 Mar 2007 14:34:16 -0800
Package: sarg
Version: 2.2.2-1
Followup-For: Bug #369693


The squid access.log is rotated by cron.daily/logrotate.  Because of how run-parts work 
cron.daily/sarg is started after logrotate.  The default sarg.conf file looks at the access log 
/var/log/squid/access.log.  It seems to me that this means that the default is to report on a log
file that will probably have almost nothing in it because all the access logs would have been just
rotated out.

Wouldn't it be better to remove /etc/cron.{daily,weekly,monthly}/sarg and instead create something 
in /etc/cron.d like this.
---
5 0  * * *  root test -x /usr/sbin/sarg-reports && /usr/sbin/sarg-reports daily
15 0 * * 7  root test -x /usr/sbin/sarg-reports && /usr/sbin/sarg-reports weekly
30 0 1 * *  root test -x /usr/sbin/sarg-reports && /usr/sbin/sarg-reports monthly
---

Or perhaps there should be no cron entries at all, and just provide a notice with debconf
telling users that they need to configure sarg and provide some sample scripts in the docs folder.


-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages sarg depends on:
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libgd2-noxpm                2.0.33-5.2   GD Graphics Library version 2 (wit

sarg recommends no packages.

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Luigi Gangitano <luigi@debian.org>:
Bug#369693; Package sarg. (Thu, 27 Nov 2008 19:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michal Klempa <michal.klempa@gmail.com>:
Extra info received and forwarded to list. Copy sent to Luigi Gangitano <luigi@debian.org>. (Thu, 27 Nov 2008 19:48:03 GMT) Full text and rfc822 format available.

Message #15 received at 369693@bugs.debian.org (full text, mbox):

From: Michal Klempa <michal.klempa@gmail.com>
To: Debian Bug Tracking System <369693@bugs.debian.org>
Subject: sarg-reports script modification to ensure all proper logs get to the sarg (those rotated too)
Date: Thu, 27 Nov 2008 20:44:50 +0100
Package: sarg
Version: 2.2.5-1
Followup-For: Bug #369693

I've used a simple modification of sarg-reports script to overcome this bug.
It first searches log files with mtime lower than time period we want to generate 
reports for, cats (or zcats) it to /tmp/... file and aftewards runs sarg with 
-l /tmp/... wich overrides access_log defined in configuration file
/etc/squid/sarg.conf
in default configuration it works. for using sarg-reports in manual mode, someone
else can provide patch (i think who can use manual mode, can use sarg itself... we
all need just default config get to work)


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (999, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages sarg depends on:
ii  bash                   3.2-4             The GNU Bourne Again SHell
ii  libc6                  2.7-16            GNU C Library: Shared libraries
ii  libgd2-noxpm           2.0.36~rc1~dfsg-3 GD Graphics Library version 2 (wit

sarg recommends no packages.

Versions of packages sarg suggests:
ii  apache2                       2.2.9-10   Apache HTTP Server metapackage
ii  apache2-mpm-prefork [httpd]   2.2.9-10   Apache HTTP Server - traditional n
ii  libapache2-mod-php5           5.2.6-5    server-side, HTML-embedded scripti
pn  squid                         <none>     (no description available)
pn  squidguard                    <none>     (no description available)

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Luigi Gangitano <luigi@debian.org>:
Bug#369693; Package sarg. (Thu, 27 Nov 2008 19:51:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michal Klempa <michal.klempa@gmail.com>:
Extra info received and forwarded to list. Copy sent to Luigi Gangitano <luigi@debian.org>. (Thu, 27 Nov 2008 19:51:06 GMT) Full text and rfc822 format available.

Message #20 received at 369693@bugs.debian.org (full text, mbox):

From: Michal Klempa <michal.klempa@gmail.com>
To: 369693@bugs.debian.org
Subject: sarg-reports script modification
Date: Thu, 27 Nov 2008 20:48:24 +0100
[Message part 1 (text/plain, inline)]
My sarg-reports is here.
[sarg-reports (application/octet-stream, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Luigi Gangitano <luigi@debian.org>:
Bug#369693; Package sarg. (Tue, 29 Jun 2010 14:27:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jose Carlos <benfati@etica.net>:
Extra info received and forwarded to list. Copy sent to Luigi Gangitano <luigi@debian.org>. (Tue, 29 Jun 2010 14:27:12 GMT) Full text and rfc822 format available.

Message #25 received at 369693@bugs.debian.org (full text, mbox):

From: Jose Carlos <benfati@etica.net>
To: 369693@bugs.debian.org
Subject: bug in script intended to fix this bug
Date: Tue, 29 Jun 2010 11:06:06 -0300
Hi,

I tried using the script but there are a few  bugs.

the newly inserted "find" commands have some -iname arguments without 
the -, just look for "iname" and change to "-iname" where appropriate.






Information forwarded to debian-bugs-dist@lists.debian.org, Luigi Gangitano <luigi@debian.org>:
Bug#369693; Package sarg. (Fri, 14 Dec 2012 20:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to bep@whack.org:
Extra info received and forwarded to list. Copy sent to Luigi Gangitano <luigi@debian.org>. (Fri, 14 Dec 2012 20:39:03 GMT) Full text and rfc822 format available.

Message #30 received at 369693@bugs.debian.org (full text, mbox):

From: Bruce Pinsky <bep@whack.org>
To: 369693@bugs.debian.org
Subject: Log rotation modification suggestion
Date: Fri, 14 Dec 2012 12:21:34 -0800
To fix the issue of squid log rotation being out of sync with sarg
reporting, it might be better to change the squid log rotation to monthly.
 This article
http://jamesmcdonald.id.au/it-tips/ubuntu-9-04-sarg-squid-no-reports
documents the changes.

Perhaps this could be part of the install package for sarg or at least ask
the op if they would like the changes made.

-- 
=========
bep




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 19:59:56 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.