-
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
FluentBit support HTTP input? #7008
Comments
It is not included in the default configuration: fluent-bit/cmake/windows-setup.cmake Line 35 in 7fd9950
This may be because it requires some inherent Linux capability or dependencies, or it may just not have been supported at the time but is now. |
Mmm that's strange, I don't think it needs anything special and that could be something from the days where monkey wasn't working in windows so maybe we should reevaluate it. |
We probably should look at the general set of Windows options with every major release I think. It should be easy to test, any PR will exercise it. |
Definitely |
I found it odd to me too because HTTP Server is included in the build for Windows but not the HTTP input plugin. I tried to build with the HTTP input for Windows. It looks like these two lines were giving me issue with error of invalid operand for fluent-bit/plugins/in_http/http_conn.c Line 137 in 64763f5
fluent-bit/plugins/in_http/http_conn.c Line 149 in 64763f5
mk_http_parser is a function and the operand of sizeof cannot be function according to https://learn.microsoft.com/en-us/cpp/cpp/sizeof-operator?view=msvc-160#sample-outputIt also didn't seem to make sense to me to reallocate the size of the mk_http_parser function to &conn->session.parser which is a reference to a type of struct also named mk_http_parser .Do you think this is a typo? Could these lines of code mean to be memset(&conn->session.parser, 0, sizeof(struct mk_http_parser)); ? If so, would these lines be redundant since the function call mk_http_parser_init (which is called after the memset call) does exactly the same thing and more: https://github.com/fluent/fluent-bit/blob/64763f57d9dc209cde6a41f8aa3c303480123646/lib/monkey/include/monkey/mk_http_parser.h#LL314C20-L314C39I removed those two lines and was able to build with the HTTP input plugin for Windows. The plugin seems to work fine on Windows. Do you think removing those two lines would be okay? I really hope the HTTP input plugin can be included in the official Windows binary so that I don't have to re-build just to enable this plugin for Windows. Thank you! |
You are absolutely correct, would you mind sending a PR with the change? If you look at Additionally, if you decide to make the PR, I think the same change will be necessary in fluent-bit 2.0, would you like to create a backport PR yourself or to have a member of the team do it instead? Thank you for taking the time to properly analyze it and submit your results, we really appreciate it. |
Thank you @leonardo-albertovich! I can create a PR but I don't know what is a backport PR nor how to create one 😅. Is there an example I could reference? Thank you! |
My crude description : a backport is a pull request to apply a patch in an older version. In this case you would create the PR in master (which is fluent-bit 2.1) and then you can either get the I'm just mentioning it in case you want to learn how to do it / practice but it's by no means a requirement and we'd be more than happy to take care of it if it makes things easier for you. |
As for a proper example of a backport this one made by Hiroshi is quite simple. |
Hi @leonardo-albertovich, I created the PR and the backport PR. Let me know if they look okay. Thank you! :) |
Thank you very much for the contribution, I'm closing this issue because the issue has been solved. |
Does Fluentbit support HTTP input on windows platform(windows10)?
The text was updated successfully, but these errors were encountered: