# Using environment variable on logstash.yml

**URL:** <https://discuss.elastic.co/t/using-environment-variable-on-logstash-yml/167328>\
**Category:** Logstash\
**Created:** [February 6, 2019, 4:29pm UTC](https://discuss.elastic.co/t/using-environment-variable-on-logstash-yml/167328 "2019-02-06T16:29:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvsell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jvsell/32/40631_2.png) [@jvsell](https://discuss.elastic.co/u/jvsell)\
**Post date:** [February 6, 2019, 4:29pm UTC](https://discuss.elastic.co/t/using-environment-variable-on-logstash-yml/167328/1 "2019-02-06T16:29:22Z")

</div>

Good afternoon everyone  
I'm trying to follow the documentation example - [https://www.elastic.co/guide/en/logstash/6.5/logstash-settings-file.html](https://www.elastic.co/guide/en/logstash/6.5/logstash-settings-file.html) - referring to the use of variables in logstash.yml more specifically in the node.name attribute I'm putting it as in the example but it does not work:

Here is the excerpt from my logstash.yml that I use:

```
## ------------ Node identity ------------
#
## Use a descriptive name for the node:
#
node.name: 123_${HOSTNAME}
#
## If omitted the node name will default to the machine's host name

##--------------------------------------------

```

My logstash is in version 6.5.4, has anyone else gone through this?

Obs: No have **nothing** in log.

---

<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 6, 2019, 4:29pm UTC](https://discuss.elastic.co/t/using-environment-variable-on-logstash-yml/167328/2 "2019-03-06T16:29:23Z")

</div>

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