Skip to main content

Query S3 Log Files

Project description

S3 Log Query

S3 Log Query is a Python library that takes one or more log files stored in S3, fetches and aggregates log messages from the files based on certain parameters, and returns the messages in order of occurrence. This library utilizes S3 Select and multithreading for performance.

Installation

Use the package manager pip to install S3 Log Query.

pip install s3-log-query

Usage

from s3_log_query import LogQuery

logs = LogQuery(log_paths={'server1': 'server1/server1.log', 'db server': 'db_server/db_server.log',
                                'server2': 'server2/server2.log', 'server3': 'server3/server3/log'},
                     s3_bucket='mikethoun-logs')

logs.query(start='02/28/2020 5:20:55', entries=100, keys=['server1', 'db server'], min_severity=logging.WARN)

Contributing

Pull requests are welcome.

License

Apache License 2.0

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

s3-log-query-1.0.0.tar.gz (8.6 kB view hashes)

Uploaded Source

Built Distribution

s3_log_query-1.0.0-py3-none-any.whl (9.3 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