# Mixed JSON and other content throws a warning for JSON filter

**URL:** <https://discuss.elastic.co/t/mixed-json-and-other-content-throws-a-warning-for-json-filter/216152>\
**Category:** Logstash\
**Created:** [January 22, 2020, 11:04pm UTC](https://discuss.elastic.co/t/mixed-json-and-other-content-throws-a-warning-for-json-filter/216152 "2020-01-22T23:04:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_LeCody](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_lecody/32/61234_2.png) [@Andrew\_LeCody](https://discuss.elastic.co/u/Andrew_LeCody)\
**Post date:** [January 22, 2020, 11:04pm UTC](https://discuss.elastic.co/t/mixed-json-and-other-content-throws-a-warning-for-json-filter/216152/1 "2020-01-22T23:04:02Z")

</div>

Despite having `skip_on_invalid_json` set to true I keep getting errors on content that isn't purely json, but is a mix of json and other content (null, int, strings).

Here's my filter config:

```auto
filter {
  json {
    source => "message"
    skip_on_invalid_json => true
  }
  mutate {
    lowercase => ["logGroup"]
  }
}

```

And here are some example warnings I'm getting in my logs:

```auto
[2020-01-22T22:52:07,697][WARN][logstash.filters.json] Parsed JSON object/hash requires a target configuration option {:source=>"message", :raw=>"{\"timestamp\":\"2020-01-22T22:51:47.940Z\",\"log_level\":\"INFO\",\"caller\":\"redacted\",\"invoke_id\":\"redacted\"} \"Input Phase is old or ManagedInfo Success is timeout or cancel. [Input Phase=2, ManagedInfo Phase=4,Success=0]\"\n"}

[2020-01-22T22:52:07,707][WARN][logstash.filters.json] Parsed JSON object/hash requires a target configuration option {:source=>"message", :raw=>"{\"timestamp\":\"2020-01-22T22:51:41.675Z\",\"log_level\":\"INFO\",\"caller\":\"redacted\",\"invoke_id\":\"redacted\"} 2001222251312800\n"}

[2020-01-22T22:55:11,134][WARN][logstash.filters.json] Parsed JSON object/hash requires a target configuration option {:source=>"message", :raw=>"{\"timestamp\":\"2020-01-22T22:54:58.479Z\",\"log_level\":\"INFO\",\"caller\":\"redacted\",\"invoke_id\":\"redacted\"} null"}

```

The logs do get placed into elasticsearch, but the logstash logs are filling up with warnings since this is a very high volume stream.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 19, 2020, 11:04pm UTC](https://discuss.elastic.co/t/mixed-json-and-other-content-throws-a-warning-for-json-filter/216152/2 "2020-02-19T23:04:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
