# Environment Variable in logstash export

**URL:** <https://discuss.elastic.co/t/environment-variable-in-logstash-export/217392>\
**Category:** Logstash\
**Created:** [January 31, 2020, 2:08pm UTC](https://discuss.elastic.co/t/environment-variable-in-logstash-export/217392 "2020-01-31T14:08:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saravana\_hariharan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saravana_hariharan/32/57379_2.png) [@saravana\_hariharan](https://discuss.elastic.co/u/saravana_hariharan)\
**Post date:** [January 31, 2020, 2:08pm UTC](https://discuss.elastic.co/t/environment-variable-in-logstash-export/217392/1 "2020-01-31T14:08:03Z")

</div>

**How to set environment variable in logstash**  
input {  
tcp {  
port =\> "${TCP\_PORT}"  
}  
}  
Now let’s set the value of TCP\_PORT:

export TCP\_PORT=12345(i dont know, where to do this export please help)

---

<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:** [February 28, 2020, 2:08pm UTC](https://discuss.elastic.co/t/environment-variable-in-logstash-export/217392/2 "2020-02-28T14:08:16Z")

</div>

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