# How to get node\_id in json query?

**URL:** https://discuss.elastic.co/t/how-to-get-node-id-in-json-query/21034
**Category:** Elasticsearch
**Created:** [December 2, 2014, 2:14pm UTC](https://discuss.elastic.co/t/how-to-get-node-id-in-json-query/21034 "2014-12-02T14:14:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Oguzhan\_Coskun](https://avatars.discourse-cdn.com/v4/letter/o/85f322/32.png) [@Oguzhan\_Coskun](https://discuss.elastic.co/u/Oguzhan_Coskun)
#### Post date: [December 2, 2014, 2:14pm UTC](https://discuss.elastic.co/t/how-to-get-node-id-in-json-query/21034/1 "2014-12-02T14:14:04Z")

</div>

"cluster\_name" : "elasticsearch",  
"nodes" : {  
"_ExaKHrlBREaM41s68j5zTQ_" : {  
"timestamp" : 1417529361647,  
"name" : "Sleek",  
"transport\_address" : "inet[/192.168.2.117:9300]",  
"host" : "localhost",  
"ip" : ["inet[/192.168.2.117:9300]", "NONE" ],  
"indices" : {  
"docs" : {  
"count" : 0,  
"deleted" : 0  
},

Elasticsearch node id change from when every restart. I have get node id _(look  
at the code bold line)_. any idea?

Kodu buraya girin...

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/1306108e-97b2-44e5-b17a-8d64a1a9da48%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1306108e-97b2-44e5-b17a-8d64a1a9da48%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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: [December 2, 2014, 3:07pm UTC](https://discuss.elastic.co/t/how-to-get-node-id-in-json-query/21034/2 "2014-12-02T15:07:22Z")

</div>

I don’t really get what you are looking for.  
But may be you'd simply like to set node.name in elasticsearch.yml?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)

> Le 2 déc. 2014 à 15:14, Oğuzhan Coşkun [oguzhan.cmd@gmail.com](mailto:oguzhan.cmd@gmail.com) a écrit :
> 
> "cluster\_name" : "elasticsearch",  
> "nodes" : {  
> "ExaKHrlBREaM41s68j5zTQ" : {  
> "timestamp" : 1417529361647,  
> "name" : "Sleek",  
> "transport\_address" : "inet[/192.168.2.117:9300]",  
> "host" : "localhost",  
> "ip" : ["inet[/192.168.2.117:9300]", "NONE" ],  
> "indices" : {  
> "docs" : {  
> "count" : 0,  
> "deleted" : 0  
> },
> 
> Elasticsearch node id change from when every restart. I have get node id (look at the code bold line). any idea?
> 
> Kodu buraya girin...
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/1306108e-97b2-44e5-b17a-8d64a1a9da48%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1306108e-97b2-44e5-b17a-8d64a1a9da48%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/1306108e-97b2-44e5-b17a-8d64a1a9da48%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/1306108e-97b2-44e5-b17a-8d64a1a9da48%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/36FECB82-1B8D-4EC2-98C9-0014F4E52607%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/36FECB82-1B8D-4EC2-98C9-0014F4E52607%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:46am UTC](https://discuss.elastic.co/t/how-to-get-node-id-in-json-query/21034/3 "2017-07-06T00:46:35Z")

</div>


