Skip to main content

Push logs to S3

Project description


pip install s3logs


s3logs config.conf

Where config.conf can use that structure:

access_key = <S3_KEY>
secret_key = <S3_SECRET_KEY>
host = <>
bucket = <bucket_name>
chunk_size = <bytes, default=52428800>


suffix = .0.gz
directory = /var/log/nginx/

[map] = example/access = example/error = mysite/access

When it used with that config, script takes all files in directory /var/log/nginx/, filter only those, which ends with .0.gz and send it to S3, according to map.

For example, /var/log/nginx now consists of:

So, if today is 9 December 2015, on your S3 <bucket_name> would be those keys:

example/access/2015-12-09.gz example/error/2015-12-09.gz mysite/access/2015-12-09.gz

Because we have not explain how maps - it was skipped.

Project details

Download files

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

Files for s3logs, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size s3logs-1.0.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page