-
Notifications
You must be signed in to change notification settings - Fork 12
Install
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.
Get the latest version from the GitHub releases.
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.
From PyPI via pip
$ sudo pip install wtop
$ tar zxvf wtop-0.7.tar.gz
$ cd ./wtop-0.7
$ sudo python setup.py install
$ 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
Unzip the archive
C:\wtop-0.7> python.exe setup.py install
Please Note: By default Apache LogFormat
s 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
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