Apache-DBILogger

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

NAME
    Apache::DBILogger - Tracks what's being transferred in a DBI
    database

SYNOPSIS
      # Place this in your Apache's httpd.conf file
      PerlLogHandler Apache::DBILogger

      PerlSetVar DBILogger_data_source    DBI:mysql:httpdlog
      PerlSetVar DBILogger_username       httpduser
      PerlSetVar DBILogger_password       secret
      
    Create a database with a table named B<requests> like this:

    CREATE TABLE requests ( id mediumint(9) DEFAULT '0' NOT NULL
    auto_increment, server varchar(127) DEFAULT '' NOT NULL, bytes
    mediumint(9) DEFAULT '0' NOT NULL, user varchar(15), filename
    varchar(200), remotehost varchar(150), remoteip varchar(15)
    DEFAULT '' NOT NULL, status smallint(6) DEFAULT '0' NOT NULL,
    timeserved datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
    urlpath varchar(200) DEFAULT '' NOT NULL, referer varchar(250),
    useragent varchar(250), PRIMARY KEY (id), KEY server_idx
    (server) );

    Its recommended that you include

    use Apache::DBI; use DBI; use Apache::DBILogger;

    in your startup.pl script. Please read the Apache::DBI
    documentation for further information.

DESCRIPTION
    This module tracks what's being transfered by the Apache web
    server in a SQL database (everything with a DBI/DBD driver).
    This allows to get statistics (of almost everything) without
    having to parse the log files (like the Apache::Traffic module,
    just in a "real" database, and with a lot more logged
    information).

    After installation, follow the instructions in the synopsis and
    restart the server. The statistics are then available in the
    database. See the section VIEWING STATISTICS for more details.

PREREQUISITES
    You need to have compiled mod_perl with the LogHandler hook in
    order to use this module. Additionally, the following modules
    are required:

            o DBI
            o Date::Format

INSTALLATION
    To install this module, move into the directory where this file
    is located and type the following:

            perl Makefile.PL
            make
            make test
            make install

    This will install the module into the Perl library directory.

    Once installed, you will need to modify your web server's
    configuration file so it knows to use Apache::DBILogger during
    the logging phase.

VIEWING STATISTICS
    I haven't made any pretty scripts og web interfaces to the log-
    database yet, so you're on your own. :-)

    For a start try:



( run in 1.288 second using v1.01-cache-2.11-cpan-99c4e6809bf )