I have 200 indices with the same type and wants to build same visualizations and dashboards for them, is there any way to create by scripts all together at once rather than creating one by one from Visualization tab in kibana.
Are you trying to display all indices in the same dashboard or visualization? Or are you trying to make the same visualization/dashboard for each index?
Do the indices share a prefix? What you can do is create a visualization using a shared prefix (or if not, just *). For instance if your indices are animal-cat, animal-dog, animal-pig, and they all have the same mappings, you can create a visualization using the index pattern animal-*.
That will at least alleviate the need to create the same visualization 200 times. You'd still have to create 200 dashboards (though if we implemented https://github.com/elastic/kibana/issues/16919 you would only need to manage one of those 200 dashboards for all changes to propagate).
Currently though, what you can do is create a dashboard for each index pattern, and use filters to segment the data you wish to see. You can either use a field you might have available in the indexes (e.g. in my example above you might have a field called animalType). If you don't though, you can still filter on the index pattern by creating a painless field on animal-* to extract the index substring. Something like
Hi Stacey,
If I create with Prefix, that creates only one visualization of the grand total from all 200 indices, but I want it should generate individual visualizations for each of them.
I created one Index pattern with Prefix and then created a visualization for that prefix, the visualization gave me a total number of messages from all the 200 indices, but I want visualization for each of them separately. Generally, we create index pattern 1st then create visualization for it, if I do like this I have to 200 times but this is not prefered method to do if we have like that lot of indices, so the reason I'm looking for some solution where we can create similar kind of visualization at once for all of them.
The benefit of doing it this way is if you ever want to change one of the visualizations, you don't have to do it 200xs, you only do it once and all your dashboards with that visualization on it are updated.
If you really want different objects for each index, we don't have a script to do that automatically for you. You could use the export/import with a bunch of copy/paste/edit index pattern. It'd be manually intensive though.
Have one more question on the same page- When we filter dashboard with index. I can see only 10 indices in the drop-down option. Is there any way to get all indices in the filter list what we have in the prefix list, so that we can select from a list of indices and check dashboard.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.