# Kibana4 - dynamic index selection

**URL:** <https://discuss.elastic.co/t/kibana4-dynamic-index-selection/2664>\
**Category:** Kibana\
**Created:** [June 15, 2015, 6:26am UTC](https://discuss.elastic.co/t/kibana4-dynamic-index-selection/2664 "2015-06-15T06:26:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![german23](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/german23/32/11052_2.png) [@german23](https://discuss.elastic.co/u/german23)\
**Post date:** [June 15, 2015, 6:26am UTC](https://discuss.elastic.co/t/kibana4-dynamic-index-selection/2664/1 "2015-06-15T06:26:33Z")

</div>

Hello guys,

in Kibana3, elasticsearch querys were based on the required indices given on the selected time.

This feature should also be implemented in Kibana 4 (there was a side note in a news at [elastic.co](http://elastic.co) about 1-2 months ago) so that you could set i.e. logstash-\* as index patterns but the querys made in kibana only searches in the required (daily,weekly..) indices.

This would allow us the migration from kibana3 to 4 due to our hardware setup with tiered storage.

Is the feature already implemented or coming in the future?

Thanks for response

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 15, 2015, 8:04am UTC](https://discuss.elastic.co/t/kibana4-dynamic-index-selection/2664/2 "2015-06-15T08:04:30Z")

</div>

You can use wildcards in index masks now, have you tried?

---

<div class="post-metadata">

**Author:** ![german23](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/german23/32/11052_2.png) [@german23](https://discuss.elastic.co/u/german23)\
**Post date:** [June 15, 2015, 8:24am UTC](https://discuss.elastic.co/t/kibana4-dynamic-index-selection/2664/3 "2015-06-15T08:24:43Z")

</div>

Yes we did that.

The problem is that, as said, if you use logstash-\* as index pattern with daily indices and you search for the last hour, kibana should send a query to elasticsearch with logstash-2015.06.15 as index and the query parameters.

Instead of doing this, if you issue a search over the last hour, it seems like all the indices provided in the index patterns are getting queried, which results in bad query performance if you got like 50 indices in your escluster(some laying on HDDs).

As said in kibana3 this is solved with providing index patterns + telling it that there are daily,weekly,hourly indices.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 15, 2015, 9:14am UTC](https://discuss.elastic.co/t/kibana4-dynamic-index-selection/2664/4 "2015-06-15T09:14:50Z")

</div>

Do you have both "Index contains time-based events" and "Use event times to create index names" set in the index settings underKB?

---

<div class="post-metadata">

**Author:** ![german23](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/german23/32/11052_2.png) [@german23](https://discuss.elastic.co/u/german23)\
**Post date:** [June 15, 2015, 9:25am UTC](https://discuss.elastic.co/t/kibana4-dynamic-index-selection/2664/5 "2015-06-15T09:25:27Z")

</div>

Thanks for pointing this out Mark.

Indeed i haven´t used the "use event times to create index names" setting. Now its working as intended

Sorry for any inconveniences

---

<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, 2:18pm UTC](https://discuss.elastic.co/t/kibana4-dynamic-index-selection/2664/6 "2017-07-06T14:18:10Z")

</div>


