This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Apache Replay is a command line tool that reads Apache log files and replays it on a remote server in real time. It’s goal it’s to load test HTTP/HTTPS servers with the same traffic that is received on another server.

This tool is written in Python and it uses apache-log-parser, requests and gevent libraries.

Main Features

  • Real time replay load testing
  • Accept any Apache log format
  • Support Basic Authentication
  • URL match and ignore filters

Installation

On Linux, first install python development and libevent packages using system package manager:

# Debian-based distributions (eg Ubuntu, ...):
$ sudo apt-get install python-dev libevent-dev

# RPM-based distributions:
$ yum install python-devel libevent-*

Then it can be installed from PyPi using pip :

$ pip install areplay

Basic usage

$ areplay http://test.example.com /var/log/apache2/access.log

Synopsis:

$ areplay --help


usage: areplay [-h] [-v] [-a AUTH] [-w WORKERS] [-m MATCH] [-i IGNORE]
               [-d] [-f FORMAT] [-sv] [-iu IGNORE_URL]
               server log_file

 positional arguments:

  server                      Remote Server
  log_file                    Apache log file path

 optional arguments:

   -h, --help                           Show this help message and exit
   -v, --version                        Show program's version number and exit
   -a AUTH, --auth AUTH                 Basic authentication user:password
   -w NUM, --workers NUM                Workers pool size
   -d, --dry-run                        Only prints URLs
   -f FORMAT, --format FORMAT           Apache log format
   -i IGNORE, --ignore IGNORE           Ignore matching requests
   -iu URL, --ignore-url URL            URL to hit when URL from log is ignored
   -m MATCH, --match MATCH              Only process matching requests
   -sv, --skip-verify                   Skip SSL certificate verify

Examples

Basic auth:

$ areplay -a username:password http://test.example.com access.log

URL filtering - ignore js and css - use | (pipe) to separate keywords:

$ areplay -i '.css|.js' http://test.example.com access.log

URL filtering - process only js and css - use | (pipe) to separate keywords:

$ areplay -m '.css|.js' http://test.example.com access.log

Custom Apache Log format - get LogFormat for Apache configuration file:

$ cat /etc/apache2/apache2.conf | grep LogFormat | grep combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined

$ areplay -f "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" http://test.example.com access.log

Change Log

Please see CHANGELOG.

Licence

Please see LICENSE.

Acknowledgments

Thank you to the people from Boom! for inspiration and Dinko Korunic for snippet (GeventTail).

Release History

Release History

0.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
areplay-0.6.tar.gz (5.0 kB) Copy SHA256 Checksum SHA256 Source Mar 19, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting