[Pkg-awstats-devel] Bug#275491: awstats: logresolvemerge.pl

Matt Taggart taggart at debian.org
Mon Jan 28 19:19:50 UTC 2008


The bug #275491 "Install useful tools as executables instead of examples" 
is tagged "wontfix" because the tools are considered to be generic purpose 
examples that are not necessarily appropropriate to Debian. While that's 
probably true for most of them, what about logresolvemerge.pl?

logresolvemerge.pl is a good stand alone tool for sorting log files 
according to date and merging them. This is particularly useful in setting 
up awstats on Debian as our default apache logrotate config splits the logs.

Here is some useful info from the upstream FAQ:
http://awstats.sourceforge.net/docs/awstats_faq.html#MULTILOG
http://awstats.sourceforge.net/docs/awstats_tools.html#logresolvemerge

Here is what I did to setup a new awstats on an existing webserver:

apt-get install awstats
edit /etc/awstats/awstats.conf
created a new system group for web logs
add www-data to the new group
edit /etc/logrotate.d/apache2 and change log ownership to the new group
edit apache config and add the example stuff
/usr/share/doc/awstats/examples/logresolvemerge.pl -dnslookup \
    /var/log/apache2/access.log* >/tmp/alllogs
as www-data run
  /usr/lib/cgi-bin/awstats.pl --config=awstats -LogFile=/tmp/alllogs

One issue I had with logresolvemerge.pl is that it appears to be using DOS 
end-of-line characters, and so isn't executable by default until you strip 
those.

-- 
Matt Taggart
taggart at debian.org







More information about the Pkg-awstats-devel mailing list