Skip to main content

Cli tool to parse stream of http access events into json formatted events.

Project description

http-log-parser

Package supports "nginx-combined" format for now.

usage: http-log-parser [-h] [--no-query] [--skip-errors] [files [files ...]]

positional arguments:
  files

optional arguments:
  -h, --help     show this help message and exit
  --no-query
  --skip-errors

Example

$ http-log-parser /var/log/http/access.log | jq .  # jq used for pretty printing 
{
  "ip": "1.2.3.4",
  "ts": 1592427669,
  "method": "GET",
  "path": "/path/",
  "status": 204,
  "size": 0,
  "referer": "https://example.com/",
  "user_agent": "Chrome/1 Firefox/2 IE/3 Edge/4",
  "query": {
    "greetings": "hello world"
  }
}
...

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

http-log-parser-0.2.0.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

http_log_parser-0.2.0-py3-none-any.whl (4.6 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