# Failed to execute action logstash message=\>"Expected one of \[ \\\\t\\\\r\\\\n\], \\"#\\", \\"{\\" at line 9, column 8 (byte 62) after filter {\\n json "

**URL:** <https://discuss.elastic.co/t/failed-to-execute-action-logstash-message-expected-one-of-t-r-n-at-line-9-column-8-byte-62-after-filter-n-json/308559>\
**Category:** Logstash\
**Created:** [June 30, 2022, 10:37am UTC](https://discuss.elastic.co/t/failed-to-execute-action-logstash-message-expected-one-of-t-r-n-at-line-9-column-8-byte-62-after-filter-n-json/308559 "2022-06-30T10:37:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hemabh\_Ravee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hemabh_ravee/32/104534_2.png) [@Hemabh\_Ravee](https://discuss.elastic.co/u/Hemabh_Ravee)\
**Post date:** [June 30, 2022, 10:37am UTC](https://discuss.elastic.co/t/failed-to-execute-action-logstash-message-expected-one-of-t-r-n-at-line-9-column-8-byte-62-after-filter-n-json/308559/1 "2022-06-30T10:37:46Z")

</div>

I am new to the Elastic stack and tried using the json filter plugin to parse kibana's logs. But adding the filter started throwing this error -

```auto
Failed to execute action logstash message=>"Expected one of [\\t\\r\\n], \"#\", \"{\" at line 9, column 8 (byte 62) after filter {\n json "

```

Here is my logstash.conf -

```auto
      input {
        beats {
          port => "5044"
        }
      }

      filter {
        
        json => { 
           source => "message" 
           target => "kibanaLog"
           skip_on_invalid_json => true
          }
        # my other filters.. 
      }

      output { 
        elasticsearch { 
          hosts => "http://elasticsearch.elk:9200"
          index => "new-index"
          action => "create"
          doc_as_upsert => true
        } 
      }

```

Not sure why Logstash is unable to recognize the json filter plugin.

---

<div class="post-metadata">

**Author:** ![sudhagar\_ramesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sudhagar_ramesh/32/105673_2.png) [@sudhagar\_ramesh](https://discuss.elastic.co/u/sudhagar_ramesh)\
**Post date:** [June 30, 2022, 11:58am UTC](https://discuss.elastic.co/t/failed-to-execute-action-logstash-message-expected-one-of-t-r-n-at-line-9-column-8-byte-62-after-filter-n-json/308559/2 "2022-06-30T11:58:22Z")

</div>

Hello @Hemabh_Ravee  
Welcome to elastic community 🙂 !!!

There is a small typo just remove " =\>" in json line under filter

```auto
 json { 
           source => "message" 
           target => "kibanaLog"
           skip_on_invalid_json => true
          }

```

Keep Posted!!! Thanks !!!

---

<div class="post-metadata">

**Author:** ![Hemabh\_Ravee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hemabh_ravee/32/104534_2.png) [@Hemabh\_Ravee](https://discuss.elastic.co/u/Hemabh_Ravee)\
**Post date:** [July 1, 2022, 9:04am UTC](https://discuss.elastic.co/t/failed-to-execute-action-logstash-message-expected-one-of-t-r-n-at-line-9-column-8-byte-62-after-filter-n-json/308559/3 "2022-07-01T09:04:03Z")

</div>

Wow I can't believe that's what I was missing. Thanks a lot! @sudhagar_ramesh

---

<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:** [July 29, 2022, 9:04am UTC](https://discuss.elastic.co/t/failed-to-execute-action-logstash-message-expected-one-of-t-r-n-at-line-9-column-8-byte-62-after-filter-n-json/308559/4 "2022-07-29T09:04:15Z")

</div>

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