# Logstash filter

**URL:** <https://discuss.elastic.co/t/logstash-filter/263718>\
**Category:** Logstash\
**Created:** [February 9, 2021, 11:06am UTC](https://discuss.elastic.co/t/logstash-filter/263718 "2021-02-09T11:06:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sujithra\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sujithra_s/32/76864_2.png) [@Sujithra\_S](https://discuss.elastic.co/u/Sujithra_S)\
**Post date:** [February 9, 2021, 11:06am UTC](https://discuss.elastic.co/t/logstash-filter/263718/1 "2021-02-09T11:06:21Z")

</div>

![logstash](https://us1.discourse-cdn.com/elastic/original/3X/2/e/2e43fdfb245f9dcec490ab9a2ea3ef29c14062af.png)

Hi, I am fetching the data from **Azure - event hubs** , I need to split the data which is in **message** field and i have tried **split filter** and **grok filter** it is showing the error which is in **tags**. Please help me to sort out which filter can be used and how it can be done.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 9, 2021, 4:41pm UTC](https://discuss.elastic.co/t/logstash-filter/263718/2 "2021-02-09T16:41:29Z")

</div>

I would suggest using mutate+gsub to strip off the first few characters then using a json filter to parse the data.

---

<div class="post-metadata">

**Author:** ![Sujithra\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sujithra_s/32/76864_2.png) [@Sujithra\_S](https://discuss.elastic.co/u/Sujithra_S)\
**Post date:** [February 10, 2021, 4:53am UTC](https://discuss.elastic.co/t/logstash-filter/263718/3 "2021-02-10T04:53:40Z")

</div>

![log](https://us1.discourse-cdn.com/elastic/original/3X/c/7/c750d4b175c3c07d67e4a15e246808a1fdddd8b8.png)

Hi, This is logstash config file i have used **mutate + gsub** and parse through json  
whether this the correct way to do this

 ![log2](https://us1.discourse-cdn.com/elastic/original/3X/7/6/76ba4d0b3e416150e10921e499044115fe133fd9.png)

I am facing this error can you please help me to sort out this..

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 10, 2021, 2:35pm UTC](https://discuss.elastic.co/t/logstash-filter/263718/4 "2021-02-10T14:35:01Z")

</div>

Please do not post pictures of text, they are hard to read and some folk will be unable to read them.

Remove the trailing comma from`"message", "/", ",",`.

---

<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:** [March 10, 2021, 2:35pm UTC](https://discuss.elastic.co/t/logstash-filter/263718/5 "2021-03-10T14:35:02Z")

</div>

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