Skip to content

Add custom tail kubernetes tag example #1358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

VincentSchmid
Copy link
Contributor

Adding an example of how to get the kube.<namespace_name>.<pod_name>.<container_name>.<docker_id> tag in the Tail Input to actually work.

Also, fixing the regex in the Tail documentation to reflect how it worked for me.

Now that I begin to understand what is actually happening, I realize you don't need the above notation to split by namespace, pod, container, or Docker ID. However, for me, the above tag feels more intuitive. From my online research, many people have struggled with this, and there are blog posts that arguably do it worse (no disrespect, these two articles are still helpful):

https://blog.omerh.me/post/2020/05/splitting-kubernetes-logs-by-namespaces-with-fluentbit/

This could work (though it did not for me):
https://www.agilicus.com/routing-to-multiple-outputs-by-kubernetes-namespace-in-fluent-bit/

@lecaros
Copy link
Contributor

lecaros commented Apr 25, 2024

Hi @VincentSchmid, thanks for this.
Please review our contributing guidelines and modify your PR accordingly..

@VincentSchmid VincentSchmid force-pushed the add-tail-kubernetes-tag-example branch from e63d4f3 to 0abe859 Compare May 2, 2024 13:03
Co-authored-by: Pat <[email protected]>
Signed-off-by: Vincent Schmid <[email protected]>
@VincentSchmid VincentSchmid force-pushed the add-tail-kubernetes-tag-example branch 2 times, most recently from d9d0234 to cdcc1d3 Compare May 2, 2024 14:57
@VincentSchmid VincentSchmid force-pushed the add-tail-kubernetes-tag-example branch from 85d3865 to 99f4d24 Compare May 3, 2024 17:28
@lecaros lecaros requested a review from patrick-stephens May 5, 2024 00:52
@patrick-stephens patrick-stephens merged commit 07aefcd into fluent:master May 7, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants