44 lines
903 B
Plaintext
44 lines
903 B
Plaintext
# Fluentd configuration for BCards test environment
|
|
|
|
<source>
|
|
@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
|
|
</source>
|
|
|
|
<source>
|
|
@type tail
|
|
path /var/log/nginx/error.log
|
|
pos_file /fluentd/log/error.log.pos
|
|
tag nginx.error
|
|
format /^(?<time>\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2}) \[(?<level>\w+)\] (?<message>.*)/
|
|
time_format %Y/%m/%d %H:%M:%S
|
|
</source>
|
|
|
|
<filter nginx.**>
|
|
@type record_transformer
|
|
<record>
|
|
hostname "#{Socket.gethostname}"
|
|
service nginx
|
|
environment test
|
|
</record>
|
|
</filter>
|
|
|
|
<match nginx.**>
|
|
@type file
|
|
path /fluentd/log/nginx-test
|
|
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
|
|
</match>
|
|
|
|
<match **>
|
|
@type stdout
|
|
</match> |