# Node id/name

**URL:** <https://discuss.elastic.co/t/node-id-name/4599>\
**Category:** Elasticsearch\
**Created:** [June 10, 2011, 12:20pm UTC](https://discuss.elastic.co/t/node-id-name/4599 "2011-06-10T12:20:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mustafa\_Sener](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@Mustafa\_Sener](https://discuss.elastic.co/u/Mustafa_Sener)\
**Post date:** [June 10, 2011, 12:20pm UTC](https://discuss.elastic.co/t/node-id-name/4599/1 "2011-06-10T12:20:45Z")

</div>

Hi,  
Currently node id and name change at each restart. Is it possible to store  
them (at least id) and reuse that node id? We are planning to monitor ES  
cluster, nodes, indices and etc. However, since node id change every time it  
is restarted, it is not possible to track a node.

--  
Mustafa Sener  
[www.ifountain.com](http://www.ifountain.com)

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 10, 2011, 2:54pm UTC](https://discuss.elastic.co/t/node-id-name/4599/2 "2011-06-10T14:54:44Z")

</div>

Node name can be set by setting `name` setting, id is always auto generated (its highly important to make sure its unique). It can be allowed to be set, but I wonder if a different way to try and attack this is not better, for example, I have been thinking that node level APIs should allow to specify the name (or even IP address) for example.

On Friday, June 10, 2011 at 3:20 PM, Mustafa Sener wrote:

> Hi,  
> Currently node id and name change at each restart. Is it possible to store them (at least id) and reuse that node id? We are planning to monitor ES cluster, nodes, indices and etc. However, since node id change every time it is restarted, it is not possible to track a node.
> 
> --  
> Mustafa Sener  
> [www.ifountain.com](http://www.ifountain.com) ([http://www.ifountain.com](http://www.ifountain.com))

---

<div class="post-metadata">

**Author:** ![Mustafa\_Sener](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@Mustafa\_Sener](https://discuss.elastic.co/u/Mustafa_Sener)\
**Post date:** [June 13, 2011, 6:07am UTC](https://discuss.elastic.co/t/node-id-name/4599/3 "2011-06-13T06:07:23Z")

</div>

Hi,  
I understand your concerns about auto generated id. However, once it is auto  
generated why we don't save it to meta data and reuse that auto generated id  
instead of generating new one. In this way we can be sure that it is unique  
since it is generated randomly once and we can refer to that node with that  
id for subsequent restarts.

On Fri, Jun 10, 2011 at 5:54 PM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:

> Node name can be set by setting `name` setting, id is always auto  
> generated (its highly important to make sure its unique). It can be allowed  
> to be set, but I wonder if a different way to try and attack this is not  
> better, for example, I have been thinking that node level APIs should allow  
> to specify the name (or even IP address) for example.
> 
> On Friday, June 10, 2011 at 3:20 PM, Mustafa Sener wrote:
> 
> Hi,  
> Currently node id and name change at each restart. Is it possible to store  
> them (at least id) and reuse that node id? We are planning to monitor ES  
> cluster, nodes, indices and etc. However, since node id change every time it  
> is restarted, it is not possible to track a node.
> 
> --  
> Mustafa Sener  
> [www.ifountain.com](http://www.ifountain.com)

--  
Mustafa Sener  
[www.ifountain.com](http://www.ifountain.com)  
WebRep  
Overall rating

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 13, 2011, 10:08am UTC](https://discuss.elastic.co/t/node-id-name/4599/4 "2011-06-13T10:08:07Z")

</div>

Since then we need to somehow identify a "machine" or an instance (basically a JVM) and then it becomes much more complex. I was thinking about stats reports, you can use things like IP, or hostname, to report it, or, node name if needed, which you can set.

On Monday, June 13, 2011 at 9:07 AM, Mustafa Sener wrote:

> Hi,  
> I understand your concerns about auto generated id. However, once it is auto generated why we don't save it to meta data and reuse that auto generated id instead of generating new one. In this way we can be sure that it is unique since it is generated randomly once and we can refer to that node with that id for subsequent restarts.
> 
> On Fri, Jun 10, 2011 at 5:54 PM, Shay Banon \<[shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com) ([mailto:shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com))\> wrote:
> 
> > Node name can be set by setting `name` setting, id is always auto generated (its highly important to make sure its unique). It can be allowed to be set, but I wonder if a different way to try and attack this is not better, for example, I have been thinking that node level APIs should allow to specify the name (or even IP address) for example.
> > 
> > On Friday, June 10, 2011 at 3:20 PM, Mustafa Sener wrote:
> > 
> > > Hi,  
> > > Currently node id and name change at each restart. Is it possible to store them (at least id) and reuse that node id? We are planning to monitor ES cluster, nodes, indices and etc. However, since node id change every time it is restarted, it is not possible to track a node.
> > > 
> > > --  
> > > Mustafa Sener  
> > > [www.ifountain.com](http://www.ifountain.com) ([http://www.ifountain.com](http://www.ifountain.com))
> 
> --  
> Mustafa Sener  
> [www.ifountain.com](http://www.ifountain.com) ([http://www.ifountain.com](http://www.ifountain.com))  
> WebRep
> 
> Overall rating

---

<div class="post-metadata">

**Author:** ![thomas\_3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomas_3/32/3198_2.png) [@thomas\_3](https://discuss.elastic.co/u/thomas_3)\
**Post date:** [June 22, 2011, 3:05pm UTC](https://discuss.elastic.co/t/node-id-name/4599/5 "2011-06-22T15:05:20Z")

</div>

On Jun 10, 4:54 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:

> Node name can be set by setting `name` setting, id is always auto generated (its highly important to make sure its unique). It can be allowed to be set, but I wonder if a different way to try and attack this is not better, for example, I have been thinking that node level APIs should allow to specify the name (or even IP address) for example.

And how exactly can I set it? I tried

node:  
name: test

but it didn't work ...

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 22, 2011, 4:59pm UTC](https://discuss.elastic.co/t/node-id-name/4599/6 "2011-06-22T16:59:51Z")

</div>

Just using name, no node prefix.

On Wednesday, June 22, 2011 at 6:05 PM, Thomas Witt wrote:

> On Jun 10, 4:54 pm, Shay Banon \<[shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) ([http://elasticsearch.com](http://elasticsearch.com))\> wrote:
> 
> > Node name can be set by setting `name` setting, id is always auto generated (its highly important to make sure its unique). It can be allowed to be set, but I wonder if a different way to try and attack this is not better, for example, I have been thinking that node level APIs should allow to specify the name (or even IP address) for example.
> 
> And how exactly can I set it? I tried
> 
> node:  
> name: test
> 
> but it didn't work ...

---

<div class="post-metadata">

**Author:** ![thomas\_3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomas_3/32/3198_2.png) [@thomas\_3](https://discuss.elastic.co/u/thomas_3)\
**Post date:** [June 23, 2011, 10:19am UTC](https://discuss.elastic.co/t/node-id-name/4599/7 "2011-06-23T10:19:18Z")

</div>

On Jun 22, 6:59 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:

> Just using name, no node prefix.

Great, that worked. Thanks a lot for the help. AFAIK this is not  
documented anyway, just FYI.

---

<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:** [July 6, 2017, 4:02am UTC](https://discuss.elastic.co/t/node-id-name/4599/8 "2017-07-06T04:02:53Z")

</div>


