# Rename all index pattern name

**URL:** <https://discuss.elastic.co/t/rename-all-index-pattern-name/324872>\
**Category:** Kibana\
**Created:** [February 7, 2023, 8:54am UTC](https://discuss.elastic.co/t/rename-all-index-pattern-name/324872 "2023-02-07T08:54:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![PRASHANT\_MEHTA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_mehta/32/101764_2.png) [@PRASHANT\_MEHTA](https://discuss.elastic.co/u/PRASHANT_MEHTA)\
**Post date:** [February 7, 2023, 8:54am UTC](https://discuss.elastic.co/t/rename-all-index-pattern-name/324872/1 "2023-02-07T08:54:59Z")

</div>

Hello All,

I'd like to rename my index pattern,what would be best way to do it correctly.I just want that duplicate dashboards or visuals are not created.

current index pattern cahnged index pattern(Rename to this)  
tcs-monitor-usecase1-\> tcs- **monitoring** -usecase1  
tcs-monitor=usecase2-\> tcs- **monitoring** -usecase2

I'm not sure how this can be done in saved object,does it require me to export both index pattern and dashboard and update or only index pattern should only be exported and updated with current name?

Any guidance or help would be appriciated.

Thanx

---

<div class="post-metadata">

**Author:** ![mverbeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mverbeek/32/101709_2.png) [@mverbeek](https://discuss.elastic.co/u/mverbeek)\
**Post date:** [February 7, 2023, 9:10am UTC](https://discuss.elastic.co/t/rename-all-index-pattern-name/324872/2 "2023-02-07T09:10:09Z")

</div>

Hello,

You could do this with the [reindex API](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html)

After that you have to update your dashboards with the new name.

---

<div class="post-metadata">

**Author:** ![PRASHANT\_MEHTA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_mehta/32/101764_2.png) [@PRASHANT\_MEHTA](https://discuss.elastic.co/u/PRASHANT_MEHTA)\
**Post date:** [February 7, 2023, 2:52pm UTC](https://discuss.elastic.co/t/rename-all-index-pattern-name/324872/3 "2023-02-07T14:52:51Z")

</div>

Hi @mverbeek ,

Thanx for looking into this,below steps worked without any conflicts.

1)Downloading the export file with index pattern and dashboard.  
2)Open the export file and edit  
3)replace/rename -monitor- (old index pattern) with -monitoring-(new index pattern)  
4)After renaming save the object  
5)now import the ndjson file

Note :The latest Index template refering the latest index pattern is to be executed in devtools before above steps.

Useful Link: [How to rename index patterns in Kibana](https://jorgelbg.me/2019/05/how-to-rename-index-patterns-in-kibana/)

---

<div class="post-metadata">

**Author:** ![mverbeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mverbeek/32/101709_2.png) [@mverbeek](https://discuss.elastic.co/u/mverbeek)\
**Post date:** [February 7, 2023, 2:59pm UTC](https://discuss.elastic.co/t/rename-all-index-pattern-name/324872/4 "2023-02-07T14:59:47Z")

</div>

Ah, I thought you wanted to change the name of the index 😅

You can also put a alias on top of the index so you can move stuff behind the screen without the need to change your visualizations.

Glad it all worked out.

---

<div class="post-metadata">

**Author:** ![PRASHANT\_MEHTA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_mehta/32/101764_2.png) [@PRASHANT\_MEHTA](https://discuss.elastic.co/u/PRASHANT_MEHTA)\
**Post date:** [February 7, 2023, 3:07pm UTC](https://discuss.elastic.co/t/rename-all-index-pattern-name/324872/5 "2023-02-07T15:07:38Z")

</div>

Hi @mverbeek ,

Going forward for prod and quality I'd like to have my index pattern to be cahnged like:

tcs-monitoringquality-usecase1  
tcs-monitoringquality-usecase2  
tcs-monitoringquality-usecase3

tcs-monitoringprod-usecase1  
tcs-monitoringprod-usecase2  
tcs-monitoringprod-usecase3

Will the same approch as above will work fine?,whts ur opinion. Is this the way its actually done  
,or this is just work around.  
This might be quite common and not sure whts the best way its done.For now the link was saviour.Going fwd all the Enviorments would have specific index pattern ex:Test,Quality,Prod with there index patterns.

I didnt get what exactly you meant by this:  
You can also put a alias on top of the index so you can move stuff behind the screen without the need to change your visualizations

Thnx

---

<div class="post-metadata">

**Author:** ![mverbeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mverbeek/32/101709_2.png) [@mverbeek](https://discuss.elastic.co/u/mverbeek)\
**Post date:** [February 7, 2023, 3:29pm UTC](https://discuss.elastic.co/t/rename-all-index-pattern-name/324872/6 "2023-02-07T15:29:36Z")

</div>

Naming is very much a thing that is decided internally by the team or company.

You can create a [alias](https://www.elastic.co/guide/en/elasticsearch/reference/master/aliases.html), which gives you the option to point searches and visualizations. The alias will redirect it to the indexes. So it makes changing things behind the alias much simpler if you ever decide to do so again.

---

<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:** [March 7, 2023, 3:30pm UTC](https://discuss.elastic.co/t/rename-all-index-pattern-name/324872/7 "2023-03-07T15:30:11Z")

</div>

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