# Fluentd configuration for BCards log aggregation
@type tail
path /var/log/nginx/access.log
pos_file /fluentd/log/access.log.pos
tag nginx.access
format nginx
time_format %d/%b/%Y:%H:%M:%S %z
@type tail
path /var/log/nginx/error.log
pos_file /fluentd/log/error.log.pos
tag nginx.error
format /^(?
@type record_transformer
hostname "#{Socket.gethostname}"
service nginx
environment production
@type file
path /fluentd/log/nginx
append true
time_slice_format %Y%m%d
time_slice_wait 10m
time_format %Y%m%dT%H%M%S%z
buffer_type file
buffer_path /fluentd/log/nginx.buffer
flush_interval 30s