I am creating indexes programmatically with different mappings. Is it possible that Kibana will recognize that new indexes automatically?
You can use wildcards and date/time patterns in your index patterns. More on that here: https://www.elastic.co/guide/en/kibana/current/settings.html
Hi. Lets say I have 2 indexes index1 and index2 that have common fields. When I created an index pattern like index* and try to create a visualization how can I only show data from index1?
You cannot - once you've set the index pattern, it will search all indexes in that pattern. However, you can define multiple index patterns, even if they overlap, and run queries against them directly, for instance: "index1", "index2", and "index*" can all be index patterns you add.
Ok. Thanks. But is it possible to create an index pattern programmatically? From an api etc. I want to create index pattern for my index from my java program
Got it - no, unfortunately not at this time. But it's a request we've heard before and are tracking, so please feel free to +1 and expand on your use case! https://github.com/elastic/kibana/issues/3709
Thanks for your help and quick replies. I will just try to fix that problem by manually creating fields json for index pattern and putting it to index-pattern in .kibana index.