Combined virtual apache logs - Debian

This is a discussion on Combined virtual apache logs - Debian ; Somebody on this list knows this answer, I'm sure. I host a few domains (around 60) and each has their logs stored in an individual directory. I am looking for a way to get a combined output for each server, ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Combined virtual apache logs

  1. Combined virtual apache logs

    Somebody on this list knows this answer, I'm sure.

    I host a few domains (around 60) and each has their logs stored in
    an individual directory. I am looking for a way to get a combined
    output for each server, ie for server A, I would also like to see
    the amount of overall traffic.

    Is it possible to put two transferlog entries in a virtualhost. If
    so, is this the most effective. Doubling the size of my logs does
    not seem like that great an idea.

    I have webalizer set up to calculate each site's stats for them, and
    it would be nice if I could also use the pretty graphs, etc... with
    them.

    If necessary, I could just write a Perl script that parsed all log
    files and gave me the numbers via e-mail, but I do not want to
    re-invent the wheel if there is already a solution to this.

    Thanks,

    Rod


    --
    Meddle not in the Affairs of Dragons
    for thou art crunchy, and good with catsup.



    --
    To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  2. Re: Combined virtual apache logs

    Op 6-okt-2005, om 6:42 heeft R. W. Rodolico het volgende geschreven:

    > I host a few domains (around 60) and each has their logs stored in
    > an individual directory. I am looking for a way to get a combined
    > output for each server, ie for server A, I would also like to see
    > the amount of overall traffic.
    >
    > Is it possible to put two transferlog entries in a virtualhost.


    I have two CustomLog directives for each vhost I host, one pointing
    to the per-host logfile, one pointing to Debian's default logfile.

    > If necessary, I could just write a Perl script that parsed all log
    > files and gave me the numbers via e-mail, but I do not want to
    > re-invent the wheel if there is already a solution to this.


    If necessary, that script already exists. Dunno the exact name, but
    it's there. It might even be distributed with Apache.

    Max


    --
    To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  3. Re: Combined virtual apache logs

    Hello,

    Thursday, October 6, 2005, 6:42:02, R. W. Rodolico wrote:

    > I have webalizer set up to calculate each site's stats for them, and
    > it would be nice if I could also use the pretty graphs, etc... with
    > them.


    I also have different combined log for every virtualhost in Apache
    (more than 500). I run both webalizer and awstats and have a script
    that parses awstats "cache" files and write bandwidth usage per
    vhost to mysql. Then I have php script which provides me info about
    which vhost transferred most GB and monthly total over all vhosts.

    --
    bYE, Marki


    --
    To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  4. Re: Combined virtual apache logs

    Hello Andy,

    Thursday, October 6, 2005, 12:04:26, Andy Smith wrote:

    AS> On Thu, Oct 06, 2005 at 11:32:39AM +0200, Marek Podmaka wrote:
    >> I also have different combined log for every virtualhost in Apache
    >> (more than 500). I run both webalizer and awstats and have a script
    >> that parses awstats "cache" files and write bandwidth usage per
    >> vhost to mysql. Then I have php script which provides me info about
    >> which vhost transferred most GB and monthly total over all vhosts.


    AS> Hi Marek, are you willing to share those scripts?

    Of course, but you will need to alter them to suit your config. I
    have all awstats files in /var/cache/vhost/, so for example awstats
    cache files for every month of www2.domain.com is in dir
    /var/cache/awstats/www2.domain.com

    I run awstats few times a day and after it is run for every vhost, I
    run awstats-db.pl which makes list of all files in
    /var/cache/awstats and processes only those for current month. I
    fact it is heavily modified version of script I found on
    awstats.org. In file sql.in there is CREATE statement for mysql
    table. One row per vhost+month containing total traffic (I sum
    "Viewed traffic" with "Not viewed traffic", because for awstats also
    HTTP 206 is not viewed traffic).

    awstats-all.php displayes 3 tables - one with total traffic per
    vhost, second with this month's traffic per vhost and third is
    summary of total traffic of all vhosts per month.

    You can download it here:
    http://www.marki-online.net/awstats-scripts/


    --
    bYE, Marki


    --
    To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

+ Reply to Thread