blob: bfcbd3ec96a111a0e4f0f19309990795808fcd37 [file] [log] [blame]
{%- from "kubernetes/map.jinja" import common with context -%}
---
kind: ConfigMap
apiVersion: v1
metadata:
name: fluentd-aggregator-cfg
namespace: {{ common.addons.fluentd.get('namespace', 'stacklight') }}
labels:
addonmanager.kubernetes.io/mode: Reconcile
data:
fluent.conf: |
@include forward-input.conf
@include general.conf
@include output.conf
forward-input.conf: |
<source>
@type forward
port "#{ENV['FLUENTD_AGGREGATOR_BIND_PORT']}"
bind 0.0.0.0
</source>
general.conf: |
<match fluent.**>
@type null
</match>
output.conf: |
<match **>
@type elasticsearch
@log_level {{ common.addons.fluentd.aggregator.config.output.get('log_level', 'info') }}
host "#{ENV['FLUENTD_ELASTICSEARCH_HOST']}"
port "#{ENV['FLUENTD_ELASTICSEARCH_PORT']}"
scheme "#{ENV['FLUENTD_ELASTICSEARCH_SCHEME'] || 'http'}"
ssl_verify "#{ENV['FLUENTD_ELASTICSEARCH_SSL_VERIFY'] || 'true'}"
reload_connections "#{ENV['FLUENTD_ELASTICSEARCH_RELOAD_CONNECTIONS'] || 'true'}"
type_name message
tag_key Logger
include_tag_key true
time_key Timestamp
time_key_exclude_timestamp true
logstash_format {{ common.addons.fluentd.aggregator.config.output.get('logstash_format', 'true') | lower }}
logstash_prefix {{ common.addons.fluentd.aggregator.config.output.get('logstash_prefix', 'log') }}
logstash_dateformat {{ common.addons.fluentd.aggregator.config.output.get('logstash_dateformat', '%Y.%m.%d') }}
request_timeout {{ common.addons.fluentd.aggregator.config.output.get('request_timeout', '10s') }}
buffer_chunk_limit {{ common.addons.fluentd.aggregator.config.output.get('buffer_chunk_limit', '2m') }}
buffer_queue_limit {{ common.addons.fluentd.aggregator.config.output.get('buffer_queue_limit', '32') }}
flush_interval {{ common.addons.fluentd.aggregator.config.output.get('flush_interval', '10s') }}
max_retry_wait {{ common.addons.fluentd.aggregator.config.output.get('max_retry_wait', '30') }}
disable_retry_limit
num_threads {{ common.addons.fluentd.aggregator.config.output.get('num_threads', '8') }}
</match>