fluent / fluentd-kubernetes-daemonset

Fluentd daemonset for Kubernetes and it Docker image
Apache License 2.0
1.26k stars 982 forks source link

Have installed daemonset but pod logs are not exporting #1449

Closed jamesla closed 11 months ago

jamesla commented 12 months ago

I have fluentd set up to export logs to elastic which is working nicely for kubernetes events etc using the manifest in this repository.

However the template does not appear to be exporting any container or pod logs.

I've also noticed that when viewing the logs of the daemon log they are spewing garbage (screenshot attached).

image

My questions are:

  1. By default should pod or container logs (stdout) be exported?
  2. What is the garbage in the screenshot and is this a known issue?
jamesla commented 11 months ago

fixed with:

- name: FLUENT_CONTAINER_TAIL_EXCLUDE_PATH
   value: /var/log/containers/fluent*
- name: FLUENT_CONTAINER_TAIL_PARSER_TYPE
   value: /^(?<time>.+) (?<stream>stdout|stderr)( (?<logtag>.))? (?<log>.*)$/