Adding an index to Kibana


(michele crudele) #1

Actually adding an index to kibana is a manual operation: Settings -> Configure an index pattern.
I would like to provide to my end users an already configured Kibana installation, with all the indexes they need avoiding any manual operation.
Would that be possible? I mean, is there any command line or rest api to configure a new index pattern to Kibana?

I have the same need for visualizations and dashboards. I would like to avoid manual import of json files, installing them via command line / rest api.

Thanks in advance.


(Mark O Stewart) #2

Is your Kibana connected to Elasticsearch?
If so run REST commands against Elasticsearch and insert the indices and documents there?
The indices and documents will show in in Kibana.
Kibana just reads indices from another source so you really need to set up a datafeed (Logstash, beats etc) or something webpage etc. to give data to an index in Elastic and then present in Kibana.


(michele crudele) #3

My Kibana is connected to Elasticsearch. However, to make an ES index visible to Kibana you have to configure it manually as I described in the original post. Same for dashboards/visualizations: the user has to import them manually into Kibana. What I'm asking for is a Kibana REST API that I can call for doing those operations programmatically, without the intervention of the end user.
I know that I can write to the .kibana metadata ES index, but that's weird and error prone, that's the reason why I'm asking for a better way.

Thanks in advance, guys.


(Mark O Stewart) #4

You should only have to configure an index once in Kibana if you use index patterns. An index pattern is an index name with a wild card like logstash* will allow Kibana to see all new indices that start with logstash.

see the following for a how to.
https://www.elastic.co/guide/en/kibana/current/tutorial-define-index.html

I hope this helps.
MS


(michele crudele) #5

What is the part of my post that is not clear? The wildcard does not help.
It's a manual operation and if you add more indexes matching the wildcard
later, they are not taken automatically by kibana.


(system) #6