Skip to content

Setting "target" and "source" to "message" silently drops eventsΒ #34

@jcmcken

Description

@jcmcken
  • Version: 5.5.0
  • Operating System: CentOS 7.3
  • Config File (if you have sensitive info, please remove it):
      json {
        source => "message"
        target => "message"
        skip_on_invalid_json => true
      }

  • Sample Data:

This is a Mesos task log:

Registered docker executor on 10.x.x.x
Starting task sometask
{"foo": "bar", "baz": 1}
{"foo": "bar", "baz": 1}
{"foo": "bar", "baz": 1}
{"foo": "bar", "baz": 1}
  • Steps to Reproduce:

Send sample data with Filebeat to Logstash with JSON filter documented above.

The input messages should be of the form:

...etc...
{"message": "Starting task sometask", ...}
{"message": "{\"foo\": \"bar\", \"baz\": 1}", ...}
...etc...

The output message should look like:

...etc...
{"message": "Starting task sometask", ...}
{"message": {"foo": "bar", "baz": 1}, ...}
...etc...

Instead, the invalidly parsed events (e.g. Starting task sometask) pass through, but the JSON events are silently dropped.

If I change target to something else (e.g. target => "json"), it works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions