Collect selected container logs from Kubernetes


(Trondhindenes) #1

I'm trying to find a solution for gathering stdout logs from only selected pods in our Kubernetes cluster. We're huge fans of using annotations to specify the behavior of things. Would be great to be able to set a pod annotation to indicate that Filebeat should harvest docker logs from containers in the pod (either on a pod-by-pod basis or somehow with more control of logging from the individual containers in a pod).

Is anything like this available/planned for Filebeat, or is it simple all or nothing?


(Carlos PĂ©rez Aradros) #2

Hi @trondhindenes,

Hints based autodiscover allows you to disable logs retrieval for any container, some users have requested the inverse behavior, having it disabled by default and require an annotation to enable it, is that what you want? https://github.com/elastic/beats/issues/7407

Best regards


(Trondhindenes) #3

Wow, yes that's exactly what I'm after. The extra functionality flags the Issue OP asks for would be nice as well. In general one flag to turn stuff on/off, and then other flags to configure the feature given that it's enabled is often a good pattern.


(system) #4

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