Skip to main content

Nginx log parser and analyzer

Project description

Installation:

pip install nginxparser

Using log format:

log_format myformat '$remote_addr - [$time_local] "$host" "$request" '
                    '$status ($bytes_sent) "$http_referer" '
                    '"$uri $args" [$request_time] [$upstream_response_time]';

usage:

nginxparser [-h] [--uri] [--time] [--clients] [--grep GREP] [--dump DUMP]
            [--no_report] [--debug]
            log_file

optional arguments:

-h, --help            show this help message and exit
--uri, -u             Get uri-based report
--time, -t            Get time-based report
--clients, -c         Get client-based report
--grep GREP, -g GREP  Grep lines, where 'upstream_time' more than the
                      specified
--dump DUMP, -d DUMP  Export parsed data to the json.file
--no_report, -N       Don't print the report
--debug, -D           Print not parsed lines

examples:

nginxparser --uri /path/to/access_nginx.log
nginxparser --time /path/to/access_nginx.log
nginxparser --clients /path/to/access_nginx.log
nginxparser --grep 10 /path/to/access_nginx.log
nginxparser -utcN -d out.json /path/to/access_nginx.log

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

nginxparser-1.0.0.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file nginxparser-1.0.0.tar.gz.

File metadata

  • Download URL: nginxparser-1.0.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nginxparser-1.0.0.tar.gz
Algorithm Hash digest
SHA256 785b3bf23769c1a63bb3db074f34eef17357f4e5c20239e6123932da1b91b657
MD5 9c49ddfd173cd8bd60e5e02c652fd77d
BLAKE2b-256 c82fdcd1a289958c2779aa52da970c12efc65916065be6edebe8c702ae82ade1

See more details on using hashes here.

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