# Wants to generate Visualization and Dashboard

**URL:** https://discuss.elastic.co/t/wants-to-generate-visualization-and-dashboard/125197
**Category:** Kibana
**Created:** [March 22, 2018, 1:32pm UTC](https://discuss.elastic.co/t/wants-to-generate-visualization-and-dashboard/125197 "2018-03-22T13:32:01Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![pingmehere](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pingmehere](https://discuss.elastic.co/u/pingmehere)
#### Post date: [March 22, 2018, 1:32pm UTC](https://discuss.elastic.co/t/wants-to-generate-visualization-and-dashboard/125197/1 "2018-03-22T13:32:01Z")

</div>

HI there,

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.

I'm using Kibana 6.0.

Thanks  
Manu

---

<div class="post-metadata">

### Author: ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)
#### Post date: [March 22, 2018, 2:48pm UTC](https://discuss.elastic.co/t/wants-to-generate-visualization-and-dashboard/125197/2 "2018-03-22T14:48:01Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![pingmehere](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pingmehere](https://discuss.elastic.co/u/pingmehere)
#### Post date: [March 22, 2018, 2:50pm UTC](https://discuss.elastic.co/t/wants-to-generate-visualization-and-dashboard/125197/3 "2018-03-22T14:50:02Z")

</div>

I'm trying to create same visualization/dashboard for each index separately.

---

<div class="post-metadata">

### Author: ![Stacey\_Gammon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stacey_gammon/32/14025_2.png) [@Stacey\_Gammon](https://discuss.elastic.co/u/Stacey_Gammon)
#### Post date: [March 22, 2018, 3:31pm UTC](https://discuss.elastic.co/t/wants-to-generate-visualization-and-dashboard/125197/4 "2018-03-22T15:31:12Z")

</div>

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](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

`return doc['_index'].value.substring(0, 10)`

Let me know if that helps!

---

<div class="post-metadata">

### Author: ![pingmehere](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pingmehere](https://discuss.elastic.co/u/pingmehere)
#### Post date: [March 22, 2018, 4:14pm UTC](https://discuss.elastic.co/t/wants-to-generate-visualization-and-dashboard/125197/5 "2018-03-22T16:14:45Z")

</div>

Thanks...Stacey...  
I'll try this and let you know if I need any help....

---

<div class="post-metadata">

### Author: ![pingmehere](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pingmehere](https://discuss.elastic.co/u/pingmehere)
#### Post date: [March 22, 2018, 7:24pm UTC](https://discuss.elastic.co/t/wants-to-generate-visualization-and-dashboard/125197/6 "2018-03-22T19:24:41Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Stacey\_Gammon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stacey_gammon/32/14025_2.png) [@Stacey\_Gammon](https://discuss.elastic.co/u/Stacey_Gammon)
#### Post date: [March 22, 2018, 7:46pm UTC](https://discuss.elastic.co/t/wants-to-generate-visualization-and-dashboard/125197/7 "2018-03-22T19:46:35Z")

</div>

Will the 200 visualizations be duplicates of each other in every other aspect, aside from the index pattern?

---

<div class="post-metadata">

### Author: ![pingmehere](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pingmehere](https://discuss.elastic.co/u/pingmehere)
#### Post date: [March 22, 2018, 7:51pm UTC](https://discuss.elastic.co/t/wants-to-generate-visualization-and-dashboard/125197/8 "2018-03-22T19:51:18Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Stacey\_Gammon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stacey_gammon/32/14025_2.png) [@Stacey\_Gammon](https://discuss.elastic.co/u/Stacey_Gammon)
#### Post date: [March 22, 2018, 8:56pm UTC](https://discuss.elastic.co/t/wants-to-generate-visualization-and-dashboard/125197/9 "2018-03-22T20:56:59Z")

</div>

You just need to add the filter while you are looking at the visualization to segment to whichever data you want.

You don't even need a scripted field, you can enter it manually:

 ![20%20PM](https://us1.discourse-cdn.com/elastic/original/3X/1/b/1b1e4afb4e4c0329e1abb1620ea06380b0708a8e.png) ![34%20PM](https://us1.discourse-cdn.com/elastic/original/3X/9/a/9a5d8400a958a4177e8dcf80db9c4dc126f3e7b0.png) ![39%20PM](https://us1.discourse-cdn.com/elastic/original/3X/0/6/0658554a983dc340fb5a013e0214b226dfa89291.png)

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.

---

<div class="post-metadata">

### Author: ![pingmehere](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pingmehere](https://discuss.elastic.co/u/pingmehere)
#### Post date: [March 23, 2018, 1:49pm UTC](https://discuss.elastic.co/t/wants-to-generate-visualization-and-dashboard/125197/10 "2018-03-23T13:49:10Z")

</div>

Thanks, Stacey, this will work for me and helps me with changes in Viz.

Regards  
Manu:)

---

<div class="post-metadata">

### Author: ![pingmehere](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pingmehere](https://discuss.elastic.co/u/pingmehere)
#### Post date: [March 23, 2018, 3:54pm UTC](https://discuss.elastic.co/t/wants-to-generate-visualization-and-dashboard/125197/11 "2018-03-23T15:54:13Z")

</div>

I tried and working good, thanks for it ...

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.

I appreciate your help... Thanks-Manu

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 20, 2018, 3:54pm UTC](https://discuss.elastic.co/t/wants-to-generate-visualization-and-dashboard/125197/12 "2018-04-20T15:54:24Z")

</div>

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