How to auto set the defualt index-pattern?


(Shalq) #1

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 .


(Shaunak Kashyap) #2

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.


(Shalq) #3

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.


(system) #4

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