Skip to main content

Facilitates replaying of Apache files in Common Log and Combined Log format

Project description

apache-replay python package

Summary

Many pieces of software exist that can take an existing Apache httpd (or other) logs in the Common Log format or Combined log format, parse them, and then do something with them. I find it convenient to be able to do this with pure Python, using a package that can be installed from pip.

Features

  • Replay requests against a new server
  • Count log entries
  • Filter based on start and end dates
  • Print logs with a new canonical server URL

Installation

Installation is normal:

pip install apache-replay

Usage

Generate usage with:

apache-replay --help

Examples

Count the number of requests in November of 2018:

apache-replay --player count https://site.com/ /var/logs/httpd/access_log.2018-11*

Replay those same logs (only GET, HEAD, OPTIONS) against qa-mysite.com:

apache-replay https://qasite.com/ /var/logs/httpd/access_log.2018-11*

Only replay 2000 log entries from that file

apache-replay --count 2000 https://qasite.com/ /var/logs/httpd/access_log.2018-11*

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apache-replay-0.0.3.tar.gz (7.1 kB view hashes)

Uploaded Source

Built Distribution

apache_replay-0.0.3-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page