# Elasticsearch hosts from configuration file in logstash JMS plugin

**URL:** <https://discuss.elastic.co/t/elasticsearch-hosts-from-configuration-file-in-logstash-jms-plugin/108608>\
**Category:** Logstash\
**Created:** [November 21, 2017, 7:27pm UTC](https://discuss.elastic.co/t/elasticsearch-hosts-from-configuration-file-in-logstash-jms-plugin/108608 "2017-11-21T19:27:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![roblopes](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@roblopes](https://discuss.elastic.co/u/roblopes)\
**Post date:** [November 21, 2017, 7:27pm UTC](https://discuss.elastic.co/t/elasticsearch-hosts-from-configuration-file-in-logstash-jms-plugin/108608/1 "2017-11-21T19:27:02Z")

</div>

Hi,

How can I configure the logstash configuration to retrieve the hosts (and maybe other parameters) from a configuration file (or at least from a single variable)?

The problem is that we want to make automated updates when deploying to an environment, and there are some variables (specially hosts) that is environment-sensitive.

Thanks,  
Rob

---

<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:** [November 24, 2017, 7:08pm UTC](https://discuss.elastic.co/t/elasticsearch-hosts-from-configuration-file-in-logstash-jms-plugin/108608/2 "2017-11-24T19:08:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![roblopes](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@roblopes](https://discuss.elastic.co/u/roblopes)\
**Post date:** [November 30, 2017, 2:51pm UTC](https://discuss.elastic.co/t/elasticsearch-hosts-from-configuration-file-in-logstash-jms-plugin/108608/3 "2017-11-30T14:51:01Z")

</div>

Exactly! Thank you very much!  
Rob

---

<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 28, 2017, 2:51pm UTC](https://discuss.elastic.co/t/elasticsearch-hosts-from-configuration-file-in-logstash-jms-plugin/108608/4 "2017-12-28T14:51:03Z")

</div>

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