# Logstash applying json filter on all messages in filter when I did not apply it

**URL:** <https://discuss.elastic.co/t/logstash-applying-json-filter-on-all-messages-in-filter-when-i-did-not-apply-it/320628>\
**Category:** Logstash\
**Created:** [December 6, 2022, 11:44pm UTC](https://discuss.elastic.co/t/logstash-applying-json-filter-on-all-messages-in-filter-when-i-did-not-apply-it/320628 "2022-12-06T23:44:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![d14](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@d14](https://discuss.elastic.co/u/d14)\
**Post date:** [December 6, 2022, 11:44pm UTC](https://discuss.elastic.co/t/logstash-applying-json-filter-on-all-messages-in-filter-when-i-did-not-apply-it/320628/1 "2022-12-06T23:44:39Z")

</div>

I have a pipeline that looks like the below, for some reason I still get

```auto
[2022-12-06T17:30:17,641][ERROR][logstash.codecs.json][main] [f764d264.....] JSON parse error, original data now in message field ...........

```

in the console and `_jsonparsefailure` added to the `"tags"` field when I have not applied the json filter at all. Is this normal? How can I remove the forced json filter application, if that is what it is?

```auto
input {
   rabbitmq {
     queue => "q1"
     host => "localhost"
     password => "guest"
     durable => "true"
      }
}

filter {
      grok {
         match => {
               "message" => "%{TIMESTAMP_ISO8601:datetime} %{IP:ip}"
         }
         add_tag => "extra_tag"
      }
}
output {
        if "extra_tag" in [tags] {
        stdout {}
}}

```

Thanks.

---

<div class="post-metadata">

**Author:** ![d14](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@d14](https://discuss.elastic.co/u/d14)\
**Post date:** [December 7, 2022, 12:08am UTC](https://discuss.elastic.co/t/logstash-applying-json-filter-on-all-messages-in-filter-when-i-did-not-apply-it/320628/2 "2022-12-07T00:08:42Z")

</div>

okay, it is related to [codec](https://www.elastic.co/guide/en/logstash/current/codec-plugins.html).  
I solved the issue by adding `codec => "plain"` to my input

---

<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:** [January 4, 2023, 12:09am UTC](https://discuss.elastic.co/t/logstash-applying-json-filter-on-all-messages-in-filter-when-i-did-not-apply-it/320628/3 "2023-01-04T00:09:00Z")

</div>

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