-
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: allow a parser to be specified as part of the systemd unit #9567
base: master
Are you sure you want to change the base?
Conversation
21c2e24
to
c94ed77
Compare
Example config:
The systemd unit of the service whose logs we now parse:
Log output showing that
|
c94ed77
to
e8a8138
Compare
Valgrind is happy:
|
e8a8138
to
07962d7
Compare
@seveas I am trying to understand the use case here. Can you expand a bit on what is the problem you are trying to solve? |
Similar to how we use kubernetes annotations to determine a parser, this uses custom fields in systemd units to configure a parser per systemd unit. In the unit file this is configured as: ``` [Service] ... LogExtraFields=FLUENT_BIT_PARSER=logfmt ``` Signed-off-by: Dennis Kaarsemaker <[email protected]>
07962d7
to
c23b26c
Compare
@niedbalski the trigger for this is the desire to move to yaml based configs, and the incompatibility of those and the way we build our configuration. We currently have a base config (not yaml) deployed to all hosts, it includes a systemd input and a strategically placed This is impossible to do in yaml configs, as its inclusion system only supports including full pipelines. So, taking inspiration from the kubernetes filter, where you can have one input, one filter and using metadata attached to pods, we came up with this strategy where a systemd unit can specify a parser to use, removing the need for a separate filter per systemd service and removing the need for these includes. |
Similar to how we use kubernetes annotations to determine a parser, this
uses custom fields in systemd units to configure a parser per systemd
unit.
In the unit file this is configured as:
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:
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.