blob: 30035040b5ec332550a1d531685df4eff5b2ff5d [file] [log] [blame]
---
kind: ConfigMap
apiVersion: v1
metadata:
name: fluentd-logger-cfg
namespace: stacklight
labels:
addonmanager.kubernetes.io/mode: Reconcile
data:
fluent.conf: |
@include general.conf
@include kubernetes-input.conf
@include systemd-input.conf
@include forward-output.conf
general.conf: |
<match fluent.**>
@type null
</match>
<source>
@type http
port 9880
bind 0.0.0.0
</source>
kubernetes-input.conf: |
<source>
@type tail
path /var/log/containers/*.log
pos_file /var/log/fluentd-containers.log.pos
time_format %Y-%m-%dT%H:%M:%S.%NZ
tag temp.kubernetes.container.*
format json
read_from_head true
path_key log_path
</source>
systemd-input.conf: |
<source>
@type systemd
path /run/log/journal
pos_file /var/log/fluentd-journald-systemd.pos
tag systemd.source
<entry>
field_map {"MESSAGE": "Payload", "_CMDLINE": "process", "_COMM": "programname", "_PID": "Pid", "_SYSTEMD_UNIT": "service", "priority": "Severity", "syslog_identifier": "ident" }
field_map_strict true
fields_strip_underscores true
fields_lowercase true
</entry>
</source>
forward-output.conf: |
<match **>
@type forward
require_ack_response true
ack_response_timeout 30
recover_wait 10s
heartbeat_interval 1s
phi_threshold 16
send_timeout 10s
hard_timeout 10s
expire_dns_cache 15
heartbeat_type tcp
buffer_chunk_limit 2M
buffer_queue_limit 32
flush_interval 5s
max_retry_wait 15
disable_retry_limit
num_threads 8
<server>
name fluentd-aggregator
host fluentd-aggregator
port "#{ENV['FLUENTD_AGGREGATOR_PORT']}"
weight 60
</server>
</match>