NAME

ALF: Apache Log Filter. Or alf.pl if you want to be picky.


SYNOPSIS

 ./alf.pl [-l /path/to/access.log] [-cv]


DESCRIPTION

ALF is a filter for people using Apache logging to plain text logs, who still want the flexibility of being able to search their logs like a database. It relies heavily on Jeff Zucker's DBD::AnyData to do the clever stuff, and overlays that with a simple GTK2 interface.

You can run SQL queries and see the results in horizontal or vertical formats; open different logs; run a few everyday queries from buttons; append column names to your SQL from a dropdown box; switch between parser formats; and export your filtered results in vertical or horizontal formats.

You'll need to copy WeblogCombined.pm and WeblogVhost.pm into /path/to/AnyData/Format before ALF will play with you. AFAICS WeblogVhost.pm ought to work on all three types of logs but I don't have common format logs available to test on. This is very much a learning project so all comments are welcome.


OPTIONS

Commandline options

-? Print usage and exit
-l /path/to/access.log A valid apache log
-c Use common format parser
-v Use vhost parser

Set in script body

$TABLE The name which you wish to give the table you'll search. Default: 'log'.
$SEPERATOR Field seperator for use when viewing records in horizontal format. Default: ' | '.
$QUERY_FONT Font used in the query box. Default: 'FreeSans 12'.
$RESULTS_FONT Font used to display your results. Default: 'FreeMono 12'.
$LOG_DEFAULT Log that gets filtered if you don't specify one on the commandline. Default: '/home/charlie/access_log_test'


REQUIREMENTS

 perl 5.8.8
 DBD::AnyData
 AnyData::Format::WeblogVhost
 AnyData::Format::WeblogCombined
 Gtk2
 Gtk2::Ex::Simple::Menu
 Getopt::Std


LICENSE

               Copyright (C)2007  Charlie Harvey
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version
 2 of the License, or (at your option) any later version.
 This program is distributed in the hope that it will be
 useful, but WITHOUT ANY WARRANTY; without even the implied
 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 PURPOSE.  See the GNU General Public License for more
 details.
 You should have received a copy of the GNU General Public
 License along with this program; if not, write to the Free
 Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA  02111-1307, USA.
 Also available on line: http://www.gnu.org/copyleft/gpl.html