filter_join_partial: new filter for appending partial docker logs (#821)#852
filter_join_partial: new filter for appending partial docker logs (#821)#852jlpettersson wants to merge 2 commits intofluent:masterfrom SpareBank1:filter_join_partial
Conversation
…ts (#821) Signed-off-by: Jonas Pettersson <jonas.pettersson@sparebank1.no>
|
this looks good, despite this is similar to the new docker_mode in in_tail, I think is a good addition. since Fluent Bit is a subproject of Fluentd which is part of CNCF and we are in the process of "donate the project", would you please assign the copyright to Treasure Data ? /* Fluent Bit
* ==========
* Copyright (C) 2015-2018 Treasure Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ |
Signed-off-by: Jonas Pettersson <jonas.pettersson@sparebank1.no>
|
Please fix the following two things: 1. single-line comments Instead of comment a single line with //, use /* my comment */ 2. memory leak at exit: the following is reported by valgrind: |
|
ping |
|
@edsiper Is there really use for this filter now when the same functionallity is available in the tail-input? |
|
@jlpettersson My understanding is that appending partial CRI-O logs is not supported with the tail-input. I would like to see you pursue this specifically for that reason, and @edsiper already commented that he thought it was a good addition. |
|
Yes. Even if you consider that logs can come from a different source than in_tail we need a mechanism to correlate them. |
|
@jlpettersson we are ready to go once the minor memory leak is fixed. |
hi, can you show any example of the same functionality with in_tail please? |
|
@oanogin it's coming in the next major release (v1.0), you can check the docs here: https://github.com/fluent/fluent-bit-docs/blob/master/input/tail.md#docker_mode |
|
ping @jlpettersson |
|
@edsiper We have no use for this in our project, since this functionality now is in the tail input. So I will not invest more time on this one. For me, it can be closed. |
|
ack. thanks. |
|
@jlpettersson We're using containerd/CRI-O and have many mutli-line log events (Java stack dumps 😄). My reading of this issue is that it has been closed because the |
@edsiper hi, do we have this merged? the filter plugin |
|
@edsiper Hi, is there a chance this ever gets implemented ? Such a filter would be really useful, ie for re-assembling chunked >16M docker logs lines forwarded through Firelens (cannot use Docker_Mode, as I can't use in_tail module). The usecase is not the same, it would be really complementary, maybe you should reconsider openening this issue ? |
A new filter for appending log events. Solves issue #821
Currently only implemented for Docker json-log format, but can support CRI-O logs with little work.
This plugin is supposed to be used early in the filter-chain, before kubernetes-filter, e.g. right after tail-input.
Example configuration:
Example log file, for test input:
Example output: