Parsing specific files with Kubernetes autodiscover (hints)


(Håvard Langdal) #1

Is it possible to log or tail specific files specified with Kuberneres filebeat hints or something? Say a service is logging specific events to a file, is it possible to extract these with filebeat? Is hint modules the way to go to achieve this?

Thanks


(Carlos Pérez Aradros) #2

Hi @havlan,

By default (when using our manifests) Filebeat is configured to retrieve logs from containers stdout/stderr. If you are referring to a container writing to a log file (instead of stdout/stderr), I would recommend using the streaming sidecar approach: https://kubernetes.io/docs/concepts/cluster-administration/logging/#streaming-sidecar-container

Filebeat doesn't have access to files inside your containers, but you can just create another container in the same pod, and make it tail the log file so it hits stdout. This way Filebeat will collect it in the common way.

Best regards


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.