# Checking for a pattern in a logstash field name

**URL:** <https://discuss.elastic.co/t/checking-for-a-pattern-in-a-logstash-field-name/52601>\
**Category:** Logstash\
**Created:** [June 13, 2016, 11:29am UTC](https://discuss.elastic.co/t/checking-for-a-pattern-in-a-logstash-field-name/52601 "2016-06-13T11:29:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![quietrags](https://avatars.discourse-cdn.com/v4/letter/q/5f9b8f/32.png) [@quietrags](https://discuss.elastic.co/u/quietrags)\
**Post date:** [June 13, 2016, 11:29am UTC](https://discuss.elastic.co/t/checking-for-a-pattern-in-a-logstash-field-name/52601/1 "2016-06-13T11:29:25Z")

</div>

I would like to check if a dynamic field has a certain pattern in it - for example in my case i get a lot of '.' in the field name which elastic search complains about whilst indexing.

Is there a way i can check if the field name has a certain pattern in it and if it does then either mutate it or drop it. Since these field names are dynamic, i don't know the actual name of the field until it comes by.

The specific case is that i get a json structure with a lot of dynamic values in them. I want to index them all in elasticsearch. But i don't know before hand what these names could be.

Thanks

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 13, 2016, 12:02pm UTC](https://discuss.elastic.co/t/checking-for-a-pattern-in-a-logstash-field-name/52601/2 "2016-06-13T12:02:06Z")

</div>

Have you seen the Logstash [de\_dot filter](https://www.elastic.co/guide/en/logstash/current/plugins-filters-de_dot.html)?

---

<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 6, 2017, 4:53am UTC](https://discuss.elastic.co/t/checking-for-a-pattern-in-a-logstash-field-name/52601/3 "2017-07-06T04:53:20Z")

</div>


