From fc3dcd39add8defbe606c75b7c62236a3a17429c Mon Sep 17 00:00:00 2001 From: AlejandroF Date: Wed, 24 Apr 2013 23:33:08 -0300 Subject: [PATCH] Update import_logs.py Added support to Icecast2 HTTP logs format. NSCA_EXTENDED + SessionTime --- misc/log-analytics/import_logs.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py index b7012449e08..68ae819e5da 100755 --- a/misc/log-analytics/import_logs.py +++ b/misc/log-analytics/import_logs.py @@ -179,6 +179,9 @@ def check_format(self, file): '\S+ \S+ \S+ \S+ "\S+ (?P.*?) \S+" (?P\S+) \S+ (?P\S+) ' '\S+ \S+ \S+ "(?P.*?)" "(?P.*?)"' ) +_ICECAST2_LOG_FORMAT = ( _NCSA_EXTENDED_LOG_FORMAT + + ' (?P\S+)' +) FORMATS = { 'common': RegexFormat('common', _COMMON_LOG_FORMAT), @@ -187,6 +190,7 @@ def check_format(self, file): 'common_complete': RegexFormat('common_complete', _HOST_PREFIX + _NCSA_EXTENDED_LOG_FORMAT), 'iis': IisFormat(), 's3': RegexFormat('s3', _S3_LOG_FORMAT), + 'icecast2': RegexFormat('icecast2', _ICECAST2_LOG_FORMAT), }