Skip to main content

Put parsed Nginx access.log to Elasticsearch

Nginx access.log have to be formatted with this format:

log_format main_ext
    '$remote_addr $http_host $remote_user [$time_local] "$request" '
    '$status $body_bytes_sent "$http_referer" '
    '"$http_user_agent" "$http_x_forwarded_for" '
    'rt=$request_time ua="$upstream_addr" '
    'us="$upstream_status" ut="$upstream_response_time" '
    'ul="$upstream_response_length" '
    'cs=$upstream_cache_status';

Install

Install with pip:

pip install nginx2es

Features

  • Stable log record ID (hostname + file inode number + timestamp + file position). It makes possible to import log file more than once (adding some additional processing to nginx2es, or dropping a daily index containing only a half of records, etc) without creating a duplicate records.

  • Parse query params and split request uri path components to separate fields for complex log filtering / aggregations.

  • Optional use of the GeoIP database (requires the geoip module and the GeoIPCity.dat database file) - adds city and region_name fields.

  • Correctly parse log records containing information about multiple upstream responses.

  • The tail -F-like mode implemented with inotify.

Metadata

Release files for nginx2es 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nginx2es 0.3.0
File Size Uploaded
nginx2es-0.3.0.tar.gz 7.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for nginx2es 0.3.0
File Interpreter ABI Platform
nginx2es-0.3.0-py3-none-any.whl Python 3 none any Details
nginx2es-0.3.0-py2-none-any.whl Python 2 none any Details

Total release size: 28.6 kB

Release files / nginx2es-0.3.0.tar.gz

Download URL nginx2es-0.3.0.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
61d96423da9534110c60e7865cd3893822ca42135b05e16244810b8395c8598c
BLAKE2b-256 checksum
How to use checksums
c112e9b0a34840d6137e00c3564408b625cd48a6178b466328c7db8499b6379f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / nginx2es-0.3.0-py3-none-any.whl

Download URL nginx2es-0.3.0-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42bc74fa197f037d665ff89c0857ac0164f35cfb2226c764098a05c43c2eb192
BLAKE2b-256 checksum
How to use checksums
6999beb52387993f3397ebb8404691cdf4cba7baf189695a11d73fa40fa81aa5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / nginx2es-0.3.0-py2-none-any.whl

Download URL nginx2es-0.3.0-py2-none-any.whl
Size 10.3 kB
Tags Python 2
SHA-256 checksum
How to use checksums
1ec7c1aed97350394a5c09b8dfc9177df4a3779e9652dca8094b418fdf9bc357
BLAKE2b-256 checksum
How to use checksums
b40066fdd7c7182bbf413e701c709a61234673c0960e62ba918ec51f11d0b201
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3.0 This release

3 release files

0.2.2

3 release files

0.2.1

3 release files

0.2.0

3 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page