From 474770827c56bb80902b93b90e2353afdc36470d Mon Sep 17 00:00:00 2001 From: marcel-dempers Date: Tue, 22 Sep 2020 22:12:49 +1000 Subject: [PATCH] elastic --- .../configurations/elastic-fluent.conf | 38 +++++++++++++++++-- .../introduction/configurations/fluent.conf | 2 - 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/monitoring/logging/fluentd/introduction/configurations/elastic-fluent.conf b/monitoring/logging/fluentd/introduction/configurations/elastic-fluent.conf index 1a453f0..89a61b4 100644 --- a/monitoring/logging/fluentd/introduction/configurations/elastic-fluent.conf +++ b/monitoring/logging/fluentd/introduction/configurations/elastic-fluent.conf @@ -1,4 +1,5 @@ -# This source gets incoming logs over HTTP and sends them to elastic search + +# incoming http --> elastic search @type http port 9880 @@ -7,18 +8,49 @@ keepalive_timeout 10s +#container logs --> elastic search + + @type tail + format json + read_from_head true + tag docker.log + path /fluentd/log/containers/*/*-json.log + pos_file /tmp/container-logs.pos + + +#local file --> elastic search + + @type tail + format json + read_from_head true + tag file-myapp.log + path /app/example-log.log + pos_file /tmp/example-log.log.pos + + +# where to send http logs @type elasticsearch host elasticsearch port 9200 - index_name fluentd + index_name fluentd-http type_name fluentd +#where to send file logs @type elasticsearch host elasticsearch port 9200 - index_name fluentd + index_name fluentd-file + type_name fluentd + + +#where to send docker logs + + @type elasticsearch + host elasticsearch + port 9200 + index_name fluentd-docker type_name fluentd \ No newline at end of file diff --git a/monitoring/logging/fluentd/introduction/configurations/fluent.conf b/monitoring/logging/fluentd/introduction/configurations/fluent.conf index 8920e06..6ecbf2a 100644 --- a/monitoring/logging/fluentd/introduction/configurations/fluent.conf +++ b/monitoring/logging/fluentd/introduction/configurations/fluent.conf @@ -1,6 +1,4 @@ -@include elastic-fluent.conf ################################################################ - # This source reads tail of a file @type tail