2020-09-27 15:29:14 +10:00

49 lines
998 B
Plaintext

@include elastic-fluent.conf
################################################################
# This source reads tail of a file
<source>
@type tail
format json
read_from_head true
tag file-myapp.log
path /app/example-log.log
pos_file /tmp/example-log.log.pos
</source>
<filter file-myapp.log>
@type record_transformer
<record>
host_param "#{Socket.gethostname}"
</record>
</filter>
<match file-myapp.log>
@type file
path /output/file-myapp.log
</match>
################################################################
# This source gets incoming logs over HTTP
<source>
@type http
port 9880
bind 0.0.0.0
body_size_limit 32m
keepalive_timeout 10s
</source>
<filter http-*.log>
@type record_transformer
<record>
host_param "#{Socket.gethostname}"
</record>
</filter>
<match http-*.log>
@type file
path /output/http.log
</match>
################################################################