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

JSON Filter throws a warning (and fails to insert document) when object has a 'message' field #31

Open
orweinberger opened this issue Jun 9, 2016 · 2 comments

Comments

@orweinberger
Copy link

orweinberger commented Jun 9, 2016

Running Logstash v2.3.2

When trying to ship logs from Filebeat, the content is placed under a message field, in my case I'm shipping JSON documents so I need to tell Logstash to convert and expand the original document with the JSON document within message, I do it like this:

filter {
  json {
    source => "message"
  }
}

However, since my JSON document also has a message field, I get this error:

{:timestamp=>"2016-06-09T13:52:59.647000+0000", :message=>"Parsed JSON object/hash requires a target configuration option", :source=>"message", :raw=>"", :level=>:warn}

As a workaround I've changed one of the message fields to message2.

@Tsury
Copy link

Tsury commented Aug 3, 2016

Sometimes this workaround is not possible. I am using FileBeat -> Kafka -> Logstash and my JSON doesn't even contain a "message" field; it's FileBeat and Kafka who add this field.

How can i work around this?

@jonashackt
Copy link

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

No branches or pull requests

3 participants