RE: [squid-users] Squid log management questions

From: Gregori Parker <Gregori.Parker_at_theplatform.com>
Date: Tue, 10 Mar 2009 13:06:04 -0700

Adjust paths as necessary...

access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log

/etc/cron.hourly/rotatelogs.sh
        #!/bin/bash
        # this script rotates squid logs hourly and renames with a
timestamp
        /usr/local/squid/sbin/squid -k rotate
        sleep 10
        mv /var/log/squid/access.log.0
/var/log/squid/access.${NOW:=$(date +"%m-%d-%Y_%H")}.log
        mv /var/log/squid/cache.log.0 /var/log/squid/cache.${NOW:=$(date
+"%m-%d-%Y_%H")}.log
        chmod +r /var/log/squid/*

/etc/cron.daily/archivelogs.sh
        #!/bin/bash
        # this script archives and compresses logs daily to
/var/log/squid/store
        cd /var/log/squid/
        tar -C /var/log/squid -zcf
/var/log/squid/store/$(hostname)_$(date -d yesterday +"%m-%d-%Y").tgz
*.$(date -d yesterday +"%m-%d-%Y")_*.log
        chmod +r /var/log/squid/store/*
        rm /var/log/squid/*.$(date -d yesterday +"%m-%d-%Y")_*.log -f

-----Original Message-----
From: a bv [mailto:vbavbalist_at_gmail.com]
Sent: Tuesday, March 10, 2009 1:31 AM
To: squid-users_at_squid-cache.org
Subject: [squid-users] Squid log management questions

Hi list,

I need a bash script (which ill take it to the cron) for
archiving/storing the squid log files. At the enviroment there are
multiple squid running servers at which the log
files are at a different path then defaults. For now ill need this
script to compress , rename the access.log files to logdate.tar.gz
and copy it with ftp to an other server. I need to archive all the
files. Cause there are not so much disk space at the servers ill have
an external usb disk (hope to have soon) and go on archiving the all
files to there. (make this usb disk physically connected to a server
then
And also i have some questions:

How do you store, manage your squid files ? Which log files of squid
do you keep? How long do you keep this files? what is the source of
these choices, you,company or compliance issues?

Regards
Received on Tue Mar 10 2009 - 20:06:13 MDT

This archive was generated by hypermail 2.2.0 : Wed Mar 11 2009 - 12:00:02 MDT