# Bad cluster name - change on the fly possible?

**URL:** https://discuss.elastic.co/t/bad-cluster-name-change-on-the-fly-possible/252475
**Category:** Elasticsearch
**Created:** [October 19, 2020, 5:52am UTC](https://discuss.elastic.co/t/bad-cluster-name-change-on-the-fly-possible/252475 "2020-10-19T05:52:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![smm](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@smm](https://discuss.elastic.co/u/smm)
#### Post date: [October 19, 2020, 5:52am UTC](https://discuss.elastic.co/t/bad-cluster-name-change-on-the-fly-possible/252475/1 "2020-10-19T05:52:38Z")

</div>

Hi there,  
I have a cluster name defined in the elasticsearch.ym defined as follows  
cluster.name: CLUSTERNAME"  
resulting e.g. in:  
'CLUSTERNAME".log'  
So, I want to correct this. The cluster is made of 3 production nodes. Is there a way to change a cluster name on-the- fly via an API call and afterwards correct the entry in the elasticsearch.yml? I would then - after having changed the cluster name - and correcting the yml restart each node, one by one.  
Or do see a better way?  
Thank you for your thoughts on this.  
cheers  
Stefano

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [October 19, 2020, 9:08am UTC](https://discuss.elastic.co/t/bad-cluster-name-change-on-the-fly-possible/252475/2 "2020-10-19T09:08:18Z")

</div>

I don't think you can change that on the fly.  
I believe you should keep it as is as it just "indicative" or you probably need to change `elasticsearch.yml` and do a full cluster restart.

But I'd try this procedure in a test environment first as I don't have any idea if this will work, specifically in version 7.x...

---

<div class="post-metadata">

### Author: ![smm](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@smm](https://discuss.elastic.co/u/smm)
#### Post date: [October 20, 2020, 11:45am UTC](https://discuss.elastic.co/t/bad-cluster-name-change-on-the-fly-possible/252475/3 "2020-10-20T11:45:09Z")

</div>

Hi David,  
from what I konw now, only a full cluster restart with a change in the yml is necessary. No on-the-fly oprtion is available.  
kind regards  
Stefano

---

<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: [November 17, 2020, 11:45am UTC](https://discuss.elastic.co/t/bad-cluster-name-change-on-the-fly-possible/252475/4 "2020-11-17T11:45:17Z")

</div>

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