Skip to content
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

Gelf TCP Null frame delimiter option should not be shown in configuration #1240

Closed
pdepaepe opened this issue Jun 10, 2015 · 6 comments
Closed

Comments

@pdepaepe
Copy link
Contributor

Hello,

One of the Input Gelf TCP option is:

Null frame delimiter? (optional)
Use null byte as frame delimiter? Otherwise newline delimiter is used.

This option is very interesting as rsyslog doesn't support NUL characters in templates.

After few unsuccessful tries, it appears that this flag is in fact hardcoded:

https://github.com/Graylog2/graylog2-server/blob/a5cec6ee646044d55789cd516569fb7a56a478fd/graylog2-inputs/src/main/java/org/graylog2/inputs/gelf/tcp/GELFTCPInput.java

So if they are no choice, why suggest one? And why \n is not supported?

Thanks.

@kroepke
Copy link
Member

kroepke commented Jun 10, 2015

There's a (bad) technical reason why that option is exposed.
GELF can contain newlines in fields, that's why it is not possible to use it as a delimiter in TCP, as TCP requires some framing to be able to tell where each message ends. Other transports can use other delimiters.

But you are correct in that the option should not be listed for this type of input.

@pdepaepe
Copy link
Contributor Author

Ok you can have newlines in fields, but you have a json encapsulation, no ? so your delimiter is not \n but something like }\n

Or even better offer "}" as "natural" json delimiter.

@kroepke
Copy link
Member

kroepke commented Jun 11, 2015

That only works when you actually parse the content as you receive it, something we do not do right now.

Changing this now is extremely unlikely mostly because I do not believe in just adding a multitude of options to a protocol without proper design and review phases.

For proper GELF TCP support rsyslog will need to be updated. As an alternative I would suggest using structured syslog with TCP in rsyslog, it should solve the same purpose and is easier to implement.

But this is something that we will certainly want to consider for GELF 2.0.

@kroepke kroepke closed this as completed Jun 11, 2015
@kroepke
Copy link
Member

kroepke commented Jun 11, 2015

Oops, wrong button, did not mean to close it.
The presence of the invalid option is still a valid bug report, which we will need to address.

@kroepke kroepke reopened this Jun 11, 2015
@kroepke kroepke changed the title Gefl TCP Null frame delimiter option Gelf TCP Null frame delimiter option should not be shown in configuration Jun 11, 2015
@zexxon zexxon added this to the 1.x milestone Jun 18, 2015
@kkamkou
Copy link

kkamkou commented Sep 23, 2015

Hi guys! When are you planning to release GELF 2.0?

@joschi
Copy link
Contributor

joschi commented Sep 23, 2015

@kkamkou There is no schedule for the release of the next GELF specification.

Additionally, please don't hijack arbitrary issues. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants