diff options
author | lesensei <alain.perry@gmail.com> | 2013-02-26 17:45:38 +0400 |
---|---|---|
committer | lesensei <alain.perry@gmail.com> | 2013-02-26 17:45:38 +0400 |
commit | 9abe7bc9a2ca30aa3804cfe4ff9ccc1e784ac5a8 (patch) | |
tree | 465abcd3d010d4c7f86bfe594ffff527be6ee7cf /misc | |
parent | fc6d6db25d44de574b390bc6a7a0c46a2407fef6 (diff) |
Add Amazon S3 log format to import_logs.py
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/log-analytics/import_logs.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py index 265a068551..5d174499d0 100755 --- a/misc/log-analytics/import_logs.py +++ b/misc/log-analytics/import_logs.py @@ -160,6 +160,11 @@ _COMMON_LOG_FORMAT = ( _NCSA_EXTENDED_LOG_FORMAT = (_COMMON_LOG_FORMAT + ' "(?P<referrer>.*?)" "(?P<user_agent>.*?)"' ) +_S3_LOG_FORMAT = ( + '\S+ (?P<host>\S+) \[(?P<date>.*?) (?P<timezone>.*?)\] (?P<ip>\S+) ' + '\S+ \S+ \S+ \S+ "\S+ (?P<path>.*?) \S+" (?P<status>\S+) \S+ (?P<length>\S+) ' + '\S+ \S+ \S+ "(?P<referrer>.*?)" "(?P<user_agent>.*?)" \S+' +) FORMATS = { 'common': RegexFormat('common', _COMMON_LOG_FORMAT), @@ -167,6 +172,7 @@ FORMATS = { 'ncsa_extended': RegexFormat('ncsa_extended', _NCSA_EXTENDED_LOG_FORMAT), 'common_complete': RegexFormat('common_complete', _HOST_PREFIX + _NCSA_EXTENDED_LOG_FORMAT), 'iis': IisFormat(), + 's3': RegexFormat('s3', _S3_LOG_FORMAT), } |