Put parsed Nginx access.log to Elasticsearch
Project description
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.
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
Built Distributions
File details
Details for the file nginx2es-0.3.0.tar.gz
.
File metadata
- Download URL: nginx2es-0.3.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61d96423da9534110c60e7865cd3893822ca42135b05e16244810b8395c8598c |
|
MD5 | 593fba19e3882afee26d6eada657a7b1 |
|
BLAKE2b-256 | c112e9b0a34840d6137e00c3564408b625cd48a6178b466328c7db8499b6379f |
File details
Details for the file nginx2es-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: nginx2es-0.3.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42bc74fa197f037d665ff89c0857ac0164f35cfb2226c764098a05c43c2eb192 |
|
MD5 | 8c5cc495f7fe395c54e737954e9a6520 |
|
BLAKE2b-256 | 6999beb52387993f3397ebb8404691cdf4cba7baf189695a11d73fa40fa81aa5 |
File details
Details for the file nginx2es-0.3.0-py2-none-any.whl
.
File metadata
- Download URL: nginx2es-0.3.0-py2-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ec7c1aed97350394a5c09b8dfc9177df4a3779e9652dca8094b418fdf9bc357 |
|
MD5 | 708668d9375973d105d519f6f591d511 |
|
BLAKE2b-256 | b40066fdd7c7182bbf413e701c709a61234673c0960e62ba918ec51f11d0b201 |