# Read path from another config file in Logstash configuration file

**URL:** <https://discuss.elastic.co/t/read-path-from-another-config-file-in-logstash-configuration-file/118439>\
**Category:** Logstash\
**Created:** [February 5, 2018, 12:23pm UTC](https://discuss.elastic.co/t/read-path-from-another-config-file-in-logstash-configuration-file/118439 "2018-02-05T12:23:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![RamyaGowda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramyagowda/32/27440_2.png) [@RamyaGowda](https://discuss.elastic.co/u/RamyaGowda)\
**Post date:** [February 5, 2018, 12:23pm UTC](https://discuss.elastic.co/t/read-path-from-another-config-file-in-logstash-configuration-file/118439/1 "2018-02-05T12:23:18Z")

</div>

Hi

I have a requirement that ,in input section i have to read file path location from another config file ,so that i can change the file location dynamically from the config file instead of going into logstash config file and changing it every time.

Since i am new to EL i don't have any idea of achieving it , please help me

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 5, 2018, 1:49pm UTC](https://discuss.elastic.co/t/read-path-from-another-config-file-in-logstash-configuration-file/118439/2 "2018-02-05T13:49:10Z")

</div>

Sorry, that's not supported. You'll have to generate your configuration file or pass the input file path via an environment variable.

---

<div class="post-metadata">

**Author:** ![RamyaGowda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramyagowda/32/27440_2.png) [@RamyaGowda](https://discuss.elastic.co/u/RamyaGowda)\
**Post date:** [February 6, 2018, 12:51pm UTC](https://discuss.elastic.co/t/read-path-from-another-config-file-in-logstash-configuration-file/118439/3 "2018-02-06T12:51:48Z")

</div>

Ok, Please tell me How can pass input file path via an environment variable

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 6, 2018, 9:31pm UTC](https://discuss.elastic.co/t/read-path-from-another-config-file-in-logstash-configuration-file/118439/4 "2018-02-06T21:31:02Z")

</div>

[https://www.elastic.co/guide/en/logstash/current/environment-variables.html](https://www.elastic.co/guide/en/logstash/current/environment-variables.html)

---

<div class="post-metadata">

**Author:** ![RamyaGowda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramyagowda/32/27440_2.png) [@RamyaGowda](https://discuss.elastic.co/u/RamyaGowda)\
**Post date:** [February 7, 2018, 4:44am UTC](https://discuss.elastic.co/t/read-path-from-another-config-file-in-logstash-configuration-file/118439/5 "2018-02-07T04:44:25Z")

</div>

It helped me,Thank you

---

<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 7, 2018, 4:44am UTC](https://discuss.elastic.co/t/read-path-from-another-config-file-in-logstash-configuration-file/118439/6 "2018-03-07T04:44:26Z")

</div>

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