-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
in_systemd: Process enumerated data as cfl_kvlist(s) at first #9291
Open
cosmo0920
wants to merge
4
commits into
master
Choose a base branch
from
cosmo0920-process-as_cfl-variant-at-first-on-in_systemd
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
in_systemd: Process enumerated data as cfl_kvlist(s) at first #9291
cosmo0920
wants to merge
4
commits into
master
from
cosmo0920-process-as_cfl-variant-at-first-on-in_systemd
+562
−53
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cosmo0920
force-pushed
the
cosmo0920-process-as_cfl-variant-at-first-on-in_systemd
branch
from
August 28, 2024 09:59
7c4c98b
to
0a500fb
Compare
cosmo0920
force-pushed
the
cosmo0920-process-as_cfl-variant-at-first-on-in_systemd
branch
from
August 28, 2024 10:00
0a500fb
to
347c77b
Compare
cosmo0920
force-pushed
the
cosmo0920-process-as_cfl-variant-at-first-on-in_systemd
branch
from
August 29, 2024 03:07
78aeb85
to
518204b
Compare
Signed-off-by: Hiroshi Hatake <[email protected]>
Signed-off-by: Hiroshi Hatake <[email protected]>
This is because systemctl's -o json-pretty or -o json converts duplicated keys' values as array(s). To avoid generating the duplicated key(s) does not resolve this issue. Instead, we need to store as cfl_kvlist at first to detect duplicated keys on enumerated data in journal storage. Then, we also need to generate as msgpack's array format when the duplicated key(s) were detected and translated as array format when storing as cfl_kvlist(s). Signed-off-by: Hiroshi Hatake <[email protected]>
Signed-off-by: Hiroshi Hatake <[email protected]>
cosmo0920
force-pushed
the
cosmo0920-process-as_cfl-variant-at-first-on-in_systemd
branch
from
October 10, 2024 10:52
57d2cb4
to
6ed3974
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is because systemctl's -o json-pretty or -o json converts duplicated keys' values as array(s).
To avoid generating the duplicated key(s) does not resolve this issue. Instead, we need to store as cfl_kvlist at first to detect duplicated keys on enumerated data in journal storage.
Then, we also need to generate as msgpack's array format when the duplicated key(s) were detected and translated as array format when storing as cfl_kvlist(s).
Closes #501.
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
$ bin/fluent-bit -i systemd -p read_from_tail=on -o stdout -v
Send SystemD logs
$ echo -e 'MESSAGE=test native message with multiple values\nKEY=value1\nKEY=value4\nKEY2=value2\nKEY=another\nKEY2=value2\nKEY2=value5\nKEY3=howdy\nKEY3=prettygood\nKEY2=value10\nKEY3=wow\nKEY2=final_field\n' | socat - UNIX-SENDTO:/run/systemd/journal/socket
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.