1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
# Transform apache log to records
[etl]
chains = input_apache_log|to_record_array|output_std
# Transform apache log to records
[input_apache_log]
class = inputs.fileinput.ApacheLogFileInput
log_format = %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D
key_map = {'%>s': 'status', '%D': 'deltat', '%{User-agent}i': 'agent', '%b': 'bytes', '%{Referer}i': 'referer', '%t': 'time', "'%h": 'host', '%r': 'request'}
file_path = input
filename_pattern = *.log
# The GML must be a simple features collection
[to_record_array]
class = filters.formatconverter.FormatConverter
input_format = record
output_format = record_array
converter_args = {
'max_len': 10
}
[output_std]
class = outputs.standardoutput.StandardOutput
|