0

If I have a container writing its log to a file e.g /var/log/app.log, how can I configure Fluent bit to read the container's log from that file?I have this configuration inside my K8S ConfigMap:

input-kubernetes.conf: |
  [INPUT]
      Name              tail
      Tag               kube.*
      Path              /var/log/containers/*.log
      Exclude_Path      /var/log/containers/*_kube-system_*.log, /var/log/containers/*fluent-bit*.log
      Parser            docker
      DB                /var/log/flb_kube.db
      Mem_Buf_Limit     5MB
      Skip_Long_Lines   On
      Refresh_Interval  10
El ktiba
  • 326
  • 1
  • 6
  • Could you share more information? It's not working for you? Did you configured also `Parser`, `Filter` and `Output`? Please provide you whole configuration. What is your environment? It's local or cloud? – PjoterS Nov 30 '20 at 11:20
  • 1
    One container can't directly read another container's files; doubly true in Kubernetes. You'd have to write the log file to NFS or other ReadWriteMany storage. Configuring the application to write its logs to stdout (maybe using the special file `/dev/stdout`) might be easier. – David Maze Nov 30 '20 at 11:50

0 Answers0