mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
configs
This commit is contained in:
parent
b0a6b7af40
commit
0a6f7ebad0
@ -0,0 +1,13 @@
|
|||||||
|
<source>
|
||||||
|
@type tail
|
||||||
|
format json
|
||||||
|
read_from_head true
|
||||||
|
tag docker.log
|
||||||
|
path /fluentd/log/containers/*/*-json.log
|
||||||
|
pos_file /tmp/container-logs.pos
|
||||||
|
</source>
|
||||||
|
|
||||||
|
# <match docker.log>
|
||||||
|
# @type file
|
||||||
|
# path /output/docker.log
|
||||||
|
# </match>
|
@ -0,0 +1,26 @@
|
|||||||
|
# where to send http logs
|
||||||
|
<match http-*.log>
|
||||||
|
@type elasticsearch
|
||||||
|
host elasticsearch
|
||||||
|
port 9200
|
||||||
|
index_name fluentd-http
|
||||||
|
type_name fluentd
|
||||||
|
</match>
|
||||||
|
|
||||||
|
#where to send file logs
|
||||||
|
<match file-myapp.log>
|
||||||
|
@type elasticsearch
|
||||||
|
host elasticsearch
|
||||||
|
port 9200
|
||||||
|
index_name fluentd-file
|
||||||
|
type_name fluentd
|
||||||
|
</match>
|
||||||
|
|
||||||
|
#where to send docker logs
|
||||||
|
<match docker.log>
|
||||||
|
@type elasticsearch
|
||||||
|
host elasticsearch
|
||||||
|
port 9200
|
||||||
|
index_name fluentd-docker
|
||||||
|
type_name fluentd
|
||||||
|
</match>
|
@ -0,0 +1,20 @@
|
|||||||
|
<source>
|
||||||
|
@type tail
|
||||||
|
format json
|
||||||
|
read_from_head true
|
||||||
|
tag file-myapp.log
|
||||||
|
path /fluentd/log/files/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>
|
@ -1,33 +1,16 @@
|
|||||||
################################################################
|
################################################################
|
||||||
# This source reads tail of a file
|
# This source reads tail of a file
|
||||||
<source>
|
@include file-fluent.conf
|
||||||
@type tail
|
|
||||||
format json
|
|
||||||
read_from_head true
|
|
||||||
tag file-myapp.log
|
|
||||||
path /fluentd/log/files/example-log.log
|
|
||||||
pos_file /tmp/example-log.log.pos
|
|
||||||
</source>
|
|
||||||
|
|
||||||
<match file-myapp.log>
|
|
||||||
@type file
|
|
||||||
path /output/file-myapp.log
|
|
||||||
</match>
|
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
|
|
||||||
# This source gets incoming logs over HTTP
|
# This source gets incoming logs over HTTP
|
||||||
<source>
|
@include http-fluent.conf
|
||||||
@type http
|
|
||||||
port 9880
|
|
||||||
bind 0.0.0.0
|
|
||||||
body_size_limit 32m
|
|
||||||
keepalive_timeout 10s
|
|
||||||
</source>
|
|
||||||
|
|
||||||
<match http-*.log>
|
|
||||||
@type file
|
|
||||||
path /output/http.log
|
|
||||||
</match>
|
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
|
# This source gets all logs from local docker host
|
||||||
|
@include containers-fluent.conf
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
# Send all logs to elastic search
|
||||||
|
@include elastic-fluent.conf
|
@ -0,0 +1,19 @@
|
|||||||
|
<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>
|
Loading…
x
Reference in New Issue
Block a user