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

Feature to enable/disable nested json parsing #2435

Closed
wants to merge 2 commits into from

Conversation

suraj-soni
Copy link
Contributor

Add a feature-flag that allows to that replaces a field containing json as a string with a field that holds that json as valid json object.

@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run.

1 similar comment
@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run.

@ruflin ruflin added discuss Issue needs further discussion. Filebeat Filebeat labels Sep 2, 2016
@ruflin
Copy link
Member

ruflin commented Sep 2, 2016

@suraj-soni Thanks a lot for the addition. I assume this is mainly for some docker logs?

We currently have quite a few discussions on how much processing we should add on the filebeat side, means should be done on the edge machine and which parts we prefer to see on Logstash or elasticsearch ingest. Every added feature on the client adds complexity and code we have to maintain. In addition filebeat gets more and more resource hungry. Obviously some of the features are also very nice to have on the client as this PR allows to apply more filtering of the json document directly in filebeat to reduce the amount of data sent. We will discuss this in the team and get back to you.

@tsg
Copy link
Contributor

tsg commented Sep 5, 2016

Hi @suraj-soni, thanks for the PR. We'd like to better understand your goals here, because in general we're trying to avoid features that do processing on the Beats side. In this particular case, doing this in Logstash or (soon) inside Elasticsearch itself (the Elasticsearch Ingest Node is getting a JSON processor) might be more convenient. Would the new JSON process inside Ingest Node fill your needs?

If we are to add this functionality to Beats, we'd prefer to do it as a processor, which will give it more flexibility in configuration.

@suraj-soni
Copy link
Contributor Author

suraj-soni commented Sep 12, 2016

Hi @tsg, @ruflin,

Thanks for your inputs!

I see this feature architecturally as something that allows a consumer to be independent of the output that filebeat writes to. For ex. imagine a use-case to write directly to Kafka or Redis. So if the consumer is reading from ES (parsed JSON) or Kafka, the way to parse the data still remains the same.

If we are to add this functionality to Beats, we'd prefer to do it as a processor, which will give it more flexibility in configuration.

I like the idea of implementing this with a processor like 'parse_field' or similar so that you are not doing a parse on all the fields and only the ones that are specifically required. This would of course require a syntax definition for defining which fields should be parsed.

@tsg
Copy link
Contributor

tsg commented Sep 15, 2016

@suraj-soni Sorry for the delay here. We've discussed it internally, and we think that this functionality would fit Filebeat pretty well, if done in the form of a processor. The configuration could be something like:

processors:
  - json_decode.fields: ["message"]

For examples of other processors, see around here.

So if you are still interested, we'd be happy to work with you do get this change in.

I am closing this PR for now, as I assume you'd rather open another one for the new implementation.

@tsg tsg closed this Sep 15, 2016
@suraj-soni
Copy link
Contributor Author

@tsg : Thanks for getting back. Yes i can still work on integrating the same feature but as a processor. Shall create a pull request soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Issue needs further discussion. Filebeat Filebeat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants