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 v1.1 compatibility #5

Closed
h4cc opened this issue Feb 20, 2014 · 10 comments
Closed

GELF v1.1 compatibility #5

h4cc opened this issue Feb 20, 2014 · 10 comments
Labels

Comments

@h4cc
Copy link
Contributor

h4cc commented Feb 20, 2014

This library does not work when using against a Graylog2 v0.20 server, because the GELF specification has changed.
http://graylog2.org/gelf#specs

These fields are now deprecated: facility, line, file

Also, there seems to be a error when elasticsearch tries to index fields, that do not conform the the spec. For example, if "line" has the string value "null", the message will be dropped.

@lennartkoopmann
Copy link
Collaborator

That is not related to GELF but to ElasticSearch. There is a mapping per index that is created dynamically: When a field is seen first, the field keeps the type for that index. That is why you cannot index Strings after you indexed Numbers already.

The deprecated fields are also not at all considered set when processing the message.

@lennartkoopmann
Copy link
Collaborator

leaving this ticket open to @bzikarsky though ;)

@bzikarsky
Copy link
Owner

@lennartkoopmann: Does 0.20 support GELFv1.0 or do we need to add support for 1.1 ASAP?

Regarding the "null"-issue: Is this something library-related? https://github.com/bzikarsky/gelf-php/blob/master/src/Gelf/Message.php#L270 drops any real null-like values. But gelf-php cannot handle errorneous strings.

@h4cc
Copy link
Contributor Author

h4cc commented Feb 20, 2014

@bzikarsky There is a issue for the NULL values in JSON:
Graylog2/graylog2-server#438

@bzikarsky
Copy link
Owner

But gelf-php does not send any NULLs?

@h4cc
Copy link
Contributor Author

h4cc commented Feb 20, 2014

@bzikarsky This library does not seem to have problem about this.
Bit is still think that using "array_filter($message, 'strlen')" might be problematic, because the specs say some field MUST be there (version, host, short_message). If one of them gets filtered, it might be problematic.

@bzikarsky
Copy link
Owner

@h4cc
Copy link
Contributor Author

h4cc commented Feb 20, 2014

👍

@bzikarsky
Copy link
Owner

@lennartkoopmann commented in IRC:
<lennartkoopmann> bzikarsky: 0.20 is supporting all versions, yes

all as in 1.0, 1.1, and the upcoming 1.2

=> We are not on a clock for this. Message validation and serialization/transformationen need a major refactoring in the light of multiple GELF specification versions.

bzikarsky pushed a commit that referenced this issue Feb 26, 2014
This is a very simple implementation without breaking BC;
should be refactored with 2.0
@bzikarsky
Copy link
Owner

1.2 did not happen - 1.1 got some ammendments.
Basic compatibility got released in 1.0.2 , but it's rather hacky.

I will close this issue, and add a refactoring issue to 2.0.

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

No branches or pull requests

3 participants