Create Indices pattern through commnadline

(Bharath) #1

Iam using Kibana-4.5 and Elasticseach 2.3. I know to register the indices pattern in Kibana via UI, @settings tab. But I want it to do through curl commands any Help

Registering the index pattern through curl
Create index pattern automatically
(Shaunak Kashyap) #2

Warning: what you are asking for is possible but relies on knowing how Kibana persists index patterns internally. This means if Kibana changes the internal structure that is persisted, your index pattern creation/manipulation code may break.

Basically, Kibana stores index patterns (amongst other things) in a special index in Elasticsearch. This index is named .kibana by default but can be customized via the kibana.index setting in the config file. You can read more about how this persistence works in this blog post:

So your best bet would be to start by defining and changing index patterns through the UI, while observing the effects to the corresponding documents in the .kibana index. That will give you an idea of what the bodies of your curl requests should be. The curl requests would be made against the Elasticsearch cluster Kibana is pointed to, the .kibana (by default) index, and the documents within that index corresponding to the index patterns.

(system) #3