diff --git a/tools/deployment/logging/fluentd.sh b/tools/deployment/logging/fluentd.sh index fbf43b292..871ddbe0c 100755 --- a/tools/deployment/logging/fluentd.sh +++ b/tools/deployment/logging/fluentd.sh @@ -53,20 +53,36 @@ conf: - - time_format %Y-%m-%dT%H:%M:%S.%NZ - @type json - - path /var/log/containers/*.log - read_from_head true - tag kubernetes.* @type tail + @id in_tail_container_logs + path "/var/log/containers/*.log" + pos_file "/var/log/fluentd-containers.log.pos" + tag kubernetes.* + read_from_head true + emit_unmatched_lines true + + @type "multi_format" + + format json + time_key "time" + time_type string + time_format "%Y-%m-%dT%H:%M:%S.%NZ" + keep_time_key false + + + format regexp + expression /^(?.+) (?stdout|stderr)( (.))? (?.*)$/ + time_format "%Y-%m-%dT%H:%M:%S.%NZ" + keep_time_key false + + @type tail tag libvirt.* path /var/log/libvirt/**.log + pos_file "/var/log/fluentd-libvirt.log.pos" read_from_head true @type none @@ -80,6 +96,11 @@ conf: matches [{ "SYSLOG_FACILITY":"10" }] read_from_head true + + @type local + path /var/log/fluentd-systemd-auth.json + + fields_strip_underscores true fields_lowercase true @@ -93,6 +114,11 @@ conf: matches [{ "_SYSTEMD_UNIT": "docker.service" }] read_from_head true + + @type local + path /var/log/fluentd-systemd-docker.json + + fields_strip_underscores true fields_lowercase true @@ -106,6 +132,11 @@ conf: matches [{ "_SYSTEMD_UNIT": "kubelet.service" }] read_from_head true + + @type local + path /var/log/fluentd-systemd-kubelet.json + + fields_strip_underscores true fields_lowercase true @@ -119,6 +150,11 @@ conf: matches [{ "_TRANSPORT": "kernel" }] read_from_head true + + @type local + path /var/log/fluentd-systemd-kernel.json + + fields_strip_underscores true fields_lowercase true @@ -131,7 +167,19 @@ conf: filter: | + + + @type null + @id ignore_fluent_logs + + + + + @type relabel + @label @FLUENT_LOG + + @type kubernetes_metadata @@ -156,7 +204,7 @@ conf: - chunk_limit_size 512K + chunk_limit_size 2M flush_interval 5s flush_thread_count 8 queue_limit_length 32