-
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
filter_multiline: implemented buffered mode using in_emitter #4383
Conversation
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
I used a container image to test; attached is the project files for that. I run it with the fluentd docker log driver:
And configure Fluent Bit to listen on forward port 24224 |
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
5507ab3
to
3ee8fab
Compare
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some comments.
Could you attach debug logs?
/* Create the emitter context */ | ||
ret = emitter_create(ctx); | ||
if (ret == -1) { | ||
return -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flb_free(ctx)
is needed.
plugins/filter_multiline/ml.c
Outdated
* user must explicitly set buffer to false to turn it off | ||
*/ | ||
tmp = (char *) flb_filter_get_property("buffer", ins); | ||
if (tmp && (strcasecmp(tmp, "Off") == 0 || strcasecmp(tmp, "false") == 0)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flb_utils_bool
is to check bool value.
flb_free(ctx); | ||
return -1; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it needs a log to output emitter_name for user.
@@ -375,6 +375,7 @@ static int cb_geoip2_filter(const void *data, size_t bytes, | |||
const char *tag, int tag_len, | |||
void **out_buf, size_t *out_size, | |||
struct flb_filter_instance *f_ins, | |||
struct flb_input_instance *i_ins, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(void) i_ins;
is missing.
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
d938935
to
0ec807c
Compare
@nokute78 Addressed feedback and here are the debug logs:
|
@PettitWesley can you submit a PR for GIT master first ?, so then we can merge this one |
@edsiper ack- will put up a PR against master and test it by EOD |
let's put this in now (but not forget about GIT master... ) thanks for the hard work on this one! |
@edsiper Sorry, I just got it done now: #4671 Also here are docs: fluent/fluent-bit-docs#675 Also, I am blocked for testing until this is resolved: #4670 |
This is the first part of the multiline filter re-design #4309
Testing
Before we can approve your change; please submit the following in a comment:
Example config:
Debug logs:
Valgrind:
Buffered (new) mode:
Un-buffered (old) mode:
Documentation
TODO
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.