mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
elastic
This commit is contained in:
parent
5cd2b71a85
commit
474770827c
@ -1,4 +1,5 @@
|
||||
# This source gets incoming logs over HTTP and sends them to elastic search
|
||||
|
||||
# incoming http --> elastic search
|
||||
<source>
|
||||
@type http
|
||||
port 9880
|
||||
@ -7,18 +8,49 @@
|
||||
keepalive_timeout 10s
|
||||
</source>
|
||||
|
||||
#container logs --> elastic search
|
||||
<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>
|
||||
|
||||
#local file --> elastic search
|
||||
<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>
|
||||
|
||||
# where to send http logs
|
||||
<match http-*.log>
|
||||
@type elasticsearch
|
||||
host elasticsearch
|
||||
port 9200
|
||||
index_name fluentd
|
||||
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
|
||||
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>
|
@ -1,6 +1,4 @@
|
||||
@include elastic-fluent.conf
|
||||
################################################################
|
||||
|
||||
# This source reads tail of a file
|
||||
<source>
|
||||
@type tail
|
||||
|
Loading…
x
Reference in New Issue
Block a user