# Labeling elastic nodes by API?

**URL:** <https://discuss.elastic.co/t/labeling-elastic-nodes-by-api/109119>\
**Category:** Elasticsearch\
**Created:** [November 26, 2017, 4:37am UTC](https://discuss.elastic.co/t/labeling-elastic-nodes-by-api/109119 "2017-11-26T04:37:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![javadevmtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javadevmtl/32/45613_2.png) [@javadevmtl](https://discuss.elastic.co/u/javadevmtl)\
**Post date:** [November 26, 2017, 4:37am UTC](https://discuss.elastic.co/t/labeling-elastic-nodes-by-api/109119/1 "2017-11-26T04:37:34Z")

</div>

Hi, can the following attribute be set by API with 5.6.x?

node.attr.box\_type

Or only through the elastisearch.yml config?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 26, 2017, 5:43am UTC](https://discuss.elastic.co/t/labeling-elastic-nodes-by-api/109119/2 "2017-11-26T05:43:31Z")

</div>

It has to be done via the config file.

---

<div class="post-metadata">

**Author:** ![javadevmtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javadevmtl/32/45613_2.png) [@javadevmtl](https://discuss.elastic.co/u/javadevmtl)\
**Post date:** [November 28, 2017, 3:20pm UTC](https://discuss.elastic.co/t/labeling-elastic-nodes-by-api/109119/3 "2017-11-28T15:20:46Z")

</div>

Thank. Can it be done by ENV variable?

---

<div class="post-metadata">

**Author:** ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)\
**Post date:** [November 28, 2017, 9:59pm UTC](https://discuss.elastic.co/t/labeling-elastic-nodes-by-api/109119/4 "2017-11-28T21:59:45Z")

</div>

Environment variables can be referenced in the config.  
See [https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html#\_environment\_variable\_substitution](https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html#_environment_variable_substitution) for details and an example

---

<div class="post-metadata">

**Author:** ![javadevmtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javadevmtl/32/45613_2.png) [@javadevmtl](https://discuss.elastic.co/u/javadevmtl)\
**Post date:** [November 28, 2017, 10:51pm UTC](https://discuss.elastic.co/t/labeling-elastic-nodes-by-api/109119/5 "2017-11-28T22:51:30Z")

</div>

Sorry for confusion. Can it be configured by ENV variable not referenced. I.e: Can node.attr.box\_type be set as from ENV variable like some others?

And by that I mean NODE\_ATTR\_BOX\_TYPE

---

<div class="post-metadata">

**Author:** ![javadevmtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javadevmtl/32/45613_2.png) [@javadevmtl](https://discuss.elastic.co/u/javadevmtl)\
**Post date:** [November 29, 2017, 4:46pm UTC](https://discuss.elastic.co/t/labeling-elastic-nodes-by-api/109119/6 "2017-11-29T16:46:01Z")

</div>

Also if I'm not mistaken it seems that we can pass values to for these configs directly as environment variables. At least it seems so reading the docker docs of Elasticsearch.

Btw is there a central doc that describes all the config attributes and if they can be configured by file, environment variable, if they are transient or persistent. So far it's scatered through out the docs...

---

<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:** [December 27, 2017, 4:46pm UTC](https://discuss.elastic.co/t/labeling-elastic-nodes-by-api/109119/7 "2017-12-27T16:46:57Z")

</div>

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