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?
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
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.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.