# How to auto set the defualt index-pattern?

**URL:** <https://discuss.elastic.co/t/how-to-auto-set-the-defualt-index-pattern/68877>\
**Category:** Kibana\
**Created:** [December 13, 2016, 2:06pm UTC](https://discuss.elastic.co/t/how-to-auto-set-the-defualt-index-pattern/68877 "2016-12-13T14:06:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shalq](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@shalq](https://discuss.elastic.co/u/shalq)\
**Post date:** [December 13, 2016, 2:06pm UTC](https://discuss.elastic.co/t/how-to-auto-set-the-defualt-index-pattern/68877/1 "2016-12-13T14:06:33Z")

</div>

I have setup ELK 5.1.1, and I want every user has its own default index-pattern, so I'd like to know how kibana get default index ? I inspect the http request on firefox, but I can't find any request about fetching default index pattern. I do see it call mget to get index pattern list. If I know the request then I can proxy the specific request inside nginx and return a default index per user, Can any one help me ? Thanks .

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [December 13, 2016, 7:58pm UTC](https://discuss.elastic.co/t/how-to-auto-set-the-defualt-index-pattern/68877/2 "2016-12-13T19:58:11Z")

</div>

The default index pattern is stored in a special index (default: `.kibana`) in Elasticsearch. Assuming your Elasticsearch cluster has a node on localhost:9200, you can see where the default index pattern is stored by making this HTTP request to Elasticsearch: `GET http://localhost:9200/.kibana/config/_search`. In the response, you'll notice a field called `defaultIndex`. This is where the default index pattern is stored by Kibana.

---

<div class="post-metadata">

**Author:** ![shalq](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@shalq](https://discuss.elastic.co/u/shalq)\
**Post date:** [December 14, 2016, 12:55am UTC](https://discuss.elastic.co/t/how-to-auto-set-the-defualt-index-pattern/68877/3 "2016-12-14T00:55:14Z")

</div>

shaunak, thank you for the answer. I know that kibana store settings in .kibana index in elasticsearch. I just wonder how kibana query the default index, I suppose it uses mget to query and get the default index , but I didn't catch that request when I inspect http request on firefox. What I want to do is to let every user have its own default index pattern based on its username in cookie, instead of having an overall default index pattern.

---

<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:** [January 11, 2017, 12:56am UTC](https://discuss.elastic.co/t/how-to-auto-set-the-defualt-index-pattern/68877/4 "2017-01-11T00:56:04Z")

</div>

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