-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
fluent-bit Loki output plugin overrides fluent-bit escaped JSON parsing #4771
Comments
Hi! This issue has been automatically marked as stale because it has not had any We use a stalebot among other tools to help manage the state of issues in this project. Stalebots are also emotionless and cruel and can close issues which are still very relevant. If this issue is important to you, please add a comment to keep it open. More importantly, please add a thumbs-up to the original issue entry. We regularly sort for closed issues which have a We may also:
We are doing our best to respond, organize, and prioritize all issues but it can be a challenging task, |
This is definitely still an issue and there is a relatively simple fix unless I'm misunderstanding how fluent bit is meant to be used here. |
I'm running into this as well, it seems pretty common that people use JSON structured logs, its bizarre that the Loki output won't ship them right. |
Also running into this issue, however when disabling |
Made a PR very similar to your branch but wanted to avoid back and forth. FYI Next time @nottug don't hesitate to send the PR we'll review it gladly. We love cool contributions. |
That's perfect, thank you - and noted, I definitely will in the future. Thanks for getting this resolved, feel free to close this once its merged. |
Describe the bug
When using JSON logs with Docker, the JSON will be come escaped and stored in a JSON object like
{"json": "ESCAPED_JSON_STRING"}
. Native fluent-bit seems to handle this (and even has support with decoders for this exact issue), though when using the loki fluent-bit output plugin, the JSON remains as an escaped string (even when using decoders).There seems to be solutions with promtail and Kubernetes for this issue, though I haven't been able to find a solution when using ECS with firelens. I ended up forking Loki and creating a new config option
ParseJsonKeys
which works well. I'm happy to open a PR here if that's an acceptable solution, this is the relevant commit.To Reproduce
Steps to reproduce the behavior:
make fluent-bit-plugin
in the loki repofluent-bit -e /PATH/TO/LOKI/clients/cmd/fluent-bit/out_grafana_loki.so -c fluent-bit-native.conf
fluent-bit -e /PATH/TO/LOKI/clients/cmd/fluent-bit/out_grafana_loki.so -c fluent-bit-loki.conf
Expected behavior
For fluent-bit to unescape the JSON string and store it as native JSON instead of a string.
Environment:
The text was updated successfully, but these errors were encountered: