Loading Dockerfile +4 −1 Original line number Diff line number Diff line Loading @@ -4,11 +4,14 @@ FROM fluent/fluentd:v${FLUENTD_VERSION} LABEL maintainer="info@redmic.es" ARG REWRITE_TAG_PLUGIN_VERSION=2.1.1 ARG ES_PLUGIN_VERSION=2.12.1 RUN apk add --update --no-cache --virtual .build-deps \ build-base \ ruby-dev && \ gem install --no-document fluent-plugin-elasticsearch:${ES_PLUGIN_VERSION} && \ gem install --no-document \ fluent-plugin-rewrite-tag-filter:${REWRITE_TAG_PLUGIN_VERSION} \ fluent-plugin-elasticsearch:${ES_PLUGIN_VERSION} && \ gem sources --clear-all && \ apk del .build-deps deploy/conf/fluent.conf +16 −5 Original line number Diff line number Diff line <source> @type forward port 24224 bind 0.0.0.0 </source> <match *.**> <match **> @type copy <store> @type rewrite_tag_filter <rule> key container_name pattern /^\/?([\w-]+)\.(\d+)\.(.*)/ tag $1 </rule> </store> <store> @type elasticsearch @id elasticsearch-output @log_level debug hosts "#{ENV['ES_HOSTS']}" type_name fluentd logstash_format true logstash_prefix fluentd logstash_dateformat %Y%m%d include_tag_key true tag_key @log_name flush_interval 1s tag_key @service_name flush_interval 5s </store> <store> @type stdout @id standard-output @log_level warn </store> </match> Loading
Dockerfile +4 −1 Original line number Diff line number Diff line Loading @@ -4,11 +4,14 @@ FROM fluent/fluentd:v${FLUENTD_VERSION} LABEL maintainer="info@redmic.es" ARG REWRITE_TAG_PLUGIN_VERSION=2.1.1 ARG ES_PLUGIN_VERSION=2.12.1 RUN apk add --update --no-cache --virtual .build-deps \ build-base \ ruby-dev && \ gem install --no-document fluent-plugin-elasticsearch:${ES_PLUGIN_VERSION} && \ gem install --no-document \ fluent-plugin-rewrite-tag-filter:${REWRITE_TAG_PLUGIN_VERSION} \ fluent-plugin-elasticsearch:${ES_PLUGIN_VERSION} && \ gem sources --clear-all && \ apk del .build-deps
deploy/conf/fluent.conf +16 −5 Original line number Diff line number Diff line <source> @type forward port 24224 bind 0.0.0.0 </source> <match *.**> <match **> @type copy <store> @type rewrite_tag_filter <rule> key container_name pattern /^\/?([\w-]+)\.(\d+)\.(.*)/ tag $1 </rule> </store> <store> @type elasticsearch @id elasticsearch-output @log_level debug hosts "#{ENV['ES_HOSTS']}" type_name fluentd logstash_format true logstash_prefix fluentd logstash_dateformat %Y%m%d include_tag_key true tag_key @log_name flush_interval 1s tag_key @service_name flush_interval 5s </store> <store> @type stdout @id standard-output @log_level warn </store> </match>