-
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
out_gelf: Fluent Bit is refusing to send what Graylog accepts as a GELF message #2256
Comments
@manuelluis and @edsiper I'd be happy to hear your feedbacks. |
Using this configuration:
Simply if we remove the fluent-bit/src/flb_pack_gelf.c Lines 549 to 555 in 46e479e
This works: And if we use a string log level by changing the dummy message above to this: {"level": "ERROR", "time": "2020-06-13T15:02:12.637309", "host": "inja", "short_message":"{\"key1\":\"val1\"}"} And remove the fluent-bit/src/flb_pack_gelf.c Lines 580 to 584 in 46e479e
The only complain is from the Elasticsearch side where it requires
In this case also I believe if someone likes to send his log levels in |
Closing in favor of merging #2257 |
Bug Report
My story with log levels never ends.
Describe the bug
When the log level is an integer, we check its value according to the GELF payload specification that chooses the value to be a number between 0 and 7.
fluent-bit/src/flb_pack_gelf.c
Lines 559 to 563 in 46e479e
But the fact is that this field is optional and Graylog doesn't do anything special with it (Apparently, at least since Graylog 2.x).
I mean, here I successfully sent a GELF message with level 50 (Without Fluent Bit GELF output plugin):
It is usual for logging libraries to not follow syslog severity levels, so that lots of applications may have difficulties to convert these levels to what GELF (specifically, in Flutent Bit plugin) asks.
But I believe Fluent Bit mustn't be a "pain in the ass" for the person who is responsible to facilitate the management of logs. So I think allowing this field to be any arbitrary integer, and forward it anyway, and let the destination server decide if it accepts it or not, can be a better idea.
To Reproduce
Create a log with
level
key that is not between 0 and 7:and GELF output plugin will complain:
Expected behavior
I expect this log to be sent to the server, and if the server rejects it, it's not the problem with Fluent Bit. This field is optional and I think it being optional has made the specifications of it optional as well.
Your Environment
The text was updated successfully, but these errors were encountered: