# Creating dynamic elastic seach indices using a json field

**URL:** <https://discuss.elastic.co/t/creating-dynamic-elastic-seach-indices-using-a-json-field/96112>\
**Category:** Logstash\
**Created:** [August 7, 2017, 1:28pm UTC](https://discuss.elastic.co/t/creating-dynamic-elastic-seach-indices-using-a-json-field/96112 "2017-08-07T13:28:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AswinKakarot](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aswinkakarot/32/20868_2.png) [@AswinKakarot](https://discuss.elastic.co/u/AswinKakarot)\
**Post date:** [August 7, 2017, 1:28pm UTC](https://discuss.elastic.co/t/creating-dynamic-elastic-seach-indices-using-a-json-field/96112/1 "2017-08-07T13:28:43Z")

</div>

I need to create different outputs to elasticsearch for different inputs. My logs are coming in json format. I have created a field called "environment" in the json input. I need to filter that field's value and create indices using that value. How can I do that?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 9, 2017, 6:20am UTC](https://discuss.elastic.co/t/creating-dynamic-elastic-seach-indices-using-a-json-field/96112/2 "2017-08-09T06:20:20Z")

</div>

[https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#logstash-config-field-references](https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#logstash-config-field-references)

---

<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:** [September 6, 2017, 6:20am UTC](https://discuss.elastic.co/t/creating-dynamic-elastic-seach-indices-using-a-json-field/96112/3 "2017-09-06T06:20:34Z")

</div>

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