Replies: 3 comments 1 reply
-
|
This comes up a few times and I really should write up a post on how to do it. I did something like this a few years ago: https://github.com/couchbase/couchbase-fluent-bit You can do this fairly easily with some combination of routing and multi-stage parsing. https://www.couchbase.com/blog/fluent-bit-tips-tricks-log-forwarding-couchbase/ was something I put together a few years back with some advice too: this is based on 1.9 series at the time. |
Beta Was this translation helpful? Give feedback.
-
|
Unrelated but do not make up your own containerd parser - you should use the built in ones to cope with all the edge cases and be more performant. Your current parser fails to cope with partial lines for example which the kubelet can decide to split on for any reason it likes. I would also add a simple filter as well to enforce some of the label keys you are using and/or simplify them: What happens if any of those are missing, using invalid characters or some other nonsense? The K8S API may reject the request to look up metadata for example. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @patrick-stephens One strange thing: I tried using
I don't understand what's happening here 😅 . i.e. if I'm able to remove keys then the log must be structured, so why do all the application log keys end up in the main log message? It's like |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm using the Helm chart to run fluent-bit in our Kubernetes cluster. The configuration used is below:
Our kubernetes application logs have different formats:
Example: fluent-bit
we want:
2025/05/06 08:38:42to be parsed as the log entry time (_timefield)infoto be set as thelevelinput:tail:kubernetesto be set asinput_msgfield)Example: victoria metrics
we want
infoto be set asleveltsto be set as_timemsgto be set as_msgExample: node exporter
we want:
tsto be set as_timelevelto be set aslevelmsgto be set as_msgIs there a recommended way to configure parsing for each application in this scenario? Should I be configuring individual inputs and parsers for these?
Beta Was this translation helpful? Give feedback.
All reactions