Re: [SQU] Access.log

From: Jens-S. Voeckler <voeckler@dont-contact.us>
Date: Wed, 20 Sep 2000 10:29:29 +0200 (CEST)

On Wed, 20 Sep 2000, Andrew Lowe wrote:

]> I am using squid on Red Hat 6.2, and a log analyser but would also like
]> the system to email the access.log file on a daily basis.
]
]try setting up a cron job that emails it...
]log in as root
]crontab -e
]and add the line
]0 1 * * * /bin/sendmail email@domain.com < /usr/local/squid/logs/access.log

Hmm, look as if you forgot to rotate logs first. I'd reckon, you'd want
only fresh logs, so try this:

- make sure your logfile_rotate is at least 1
- do the steps above, except use something akin to the following as job

0 0 * * * /usr/local/squid/bin/squid -k rotate
1 4 * * * /usr/lib/sendmail a@b.c.d < /usr/local/squid/logs/access.log.0

Or, instead of this push principle, use a pull principle. Rotate the logs
at midnight, and from a host of your option, scp the log file at a time
with low traffic (e.g. early morning hours). Some issues are also covered
in the FAQ (section 6 deals with log files).

Le deagh dhùrachd,
Dipl.-Ing. Jens-S. Vöckler (voeckler@rvs.uni-hannover.de)
Institute for Computer Networks and Distributed Systems
University of Hanover, Germany; +49 511 762 4726

--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Wed Sep 20 2000 - 02:32:36 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:55:25 MST