Skip to content
Tim edited this page Aug 20, 2013 · 7 revisions

1. Requirements

wtop requires Python 2.6 or higher to run.

logrep will use the MaxMind GeoIP library if it is installed. This enables the cc (country code) and country fields. They are pretty nifty so we recommend it.

2. Getting wtop

Get the latest version from the GitHub releases.

3. Installing

This will install the wtop and logrep programs to your executable path. See CookbookLogrep for lots of examples and useful queries, and HelpLogrep for a full explanation of the command-line options.

BSD, Mac OS X, Linux and Unix

From PyPI via pip

$ sudo pip install wtop

From Source

$ tar zxvf wtop-0.7.tar.gz
$ cd ./wtop-0.7
$ sudo python setup.py install

Debian/Ubuntu as a package

$ sudo aptitude install build-essential
$ tar zxvf wtop-0.7.tar.gz
$ cd ./wtop-0.7
$ dpkg-buildpackage -b -nc -uc -us
$ dpkg -i ../wtop_0.7_all.deb

Windows

Unzip the archive

   C:\wtop-0.7> python.exe setup.py install

4. Configuring Apache

Please Note: By default Apache LogFormats do not have the %D (microsecond response time) directive. You must have at least %s, %r, %t and %D in your LogFormat in order to use wtop. You can use logrep without %D, but you will not be able to use the msec field.

Example: before

LogFormat "%h %l %u %t \\"%r\\" %>s %b" common
CustomLog logs/access_log common

Example: after

LogFormat "%h %l %u %t \\"%r\\" %>s %b %D" common
CustomLog logs/access_log common

5. wtop.cfg

The configuration file is installed as /etc/wtop.cfg (Unix) or <PYTHON_HOME>\wtop.cfg (Windows). Take a look at it to configure the location of your log files, any URL classes you want, and so forth.

See wtop.cfg