Skip to content
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

hash_value_field support (from fluentd) for fluent-bit's filter_parsers #8893

Closed
kfdm opened this issue May 30, 2024 · 5 comments
Closed

hash_value_field support (from fluentd) for fluent-bit's filter_parsers #8893

kfdm opened this issue May 30, 2024 · 5 comments
Labels

Comments

@kfdm
Copy link

kfdm commented May 30, 2024

Is your feature request related to a problem? Please describe.

Using filter_parser you can parse a field into a new value. For example

[FILTER]
    Name parser
    Match systemd.json
    Parser systemd_json
    Key_name MESSAGE
    Reserve_Data On

Allows me to take a MESSAGE field from some incoming systemd (journald) logs, and parse them.
One minor issue, is that it all gets merged down into the original hash value

# Input
{"MESSAGE": '{"some":"value"}}
# Output
{"MESSAGE": '{"some":"value"}, "some":value}

Fluentd's version of filter_parser supports a hash_value_field field, that lets us control where this goes.

# Input
{"MESSAGE": '{"some":"value"}}
# Output
{"MESSAGE": '{"some":"value"}, "parsed": {"some":value}}

What would be involved in allowing fluent-bit's filter_parser to support a similar hash_value_field target, to avoid a case where something parsed out might overwrite another field

I think it's not really possible to use filter_lua to parse it, and I think there's no way to have filter_record_modifer to make a copy either. I'm trying to simplify a few things to avoid deploying fluentd, so I'm hoping there might be a way to handle this within fluent-bit alone.

@Athishpranav2003
Copy link

Athishpranav2003 commented Aug 13, 2024

I guess i can work on this feature. I am trying to refactor some code in msgpack itself msgpack/msgpack-c#1135. Once that PR gets accepted i will create this PR for the approval

@Athishpranav2003
Copy link

Raised PR #9243 for the latest lib

@Athishpranav2003
Copy link

@kfdm if possible you can also look at the PR

Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

@github-actions github-actions bot added the Stale label Nov 23, 2024
Copy link
Contributor

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants