# How do I set the pubblish\_address in logstash?

**URL:** <https://discuss.elastic.co/t/how-do-i-set-the-pubblish-address-in-logstash/34935>\
**Category:** Logstash\
**Created:** [November 18, 2015, 1:16pm UTC](https://discuss.elastic.co/t/how-do-i-set-the-pubblish-address-in-logstash/34935 "2015-11-18T13:16:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![danilo\_gimenez\_ramos](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@danilo\_gimenez\_ramos](https://discuss.elastic.co/u/danilo_gimenez_ramos)\
**Post date:** [November 18, 2015, 1:16pm UTC](https://discuss.elastic.co/t/how-do-i-set-the-pubblish-address-in-logstash/34935/1 "2015-11-18T13:16:31Z")

</div>

Hi, I see a lot of discussions on how to set the publish address on logstash, but all answers refers to config the bind\_host on elasticsearch server rather than logstash.

My problem is, I have many servers where I installed only the logstash and they send info to a specific server with Elasticsearch on it. All things works well but in some servers with logstash I have multiple IP address and I have a Firewall between the logstash servers and elasticsearch server so I need to use the primary IP address from these machines so I can pass through firewall. The problem is in these multiple IPs servers the logstash set the wrong IP address as publish\_address and then have "connection timed out" problems.

So how do I configure the publish address in logstash servers?

Thanks

---

<div class="post-metadata">

**Author:** ![danilo\_gimenez\_ramos](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@danilo\_gimenez\_ramos](https://discuss.elastic.co/u/danilo_gimenez_ramos)\
**Post date:** [November 18, 2015, 2:56pm UTC](https://discuss.elastic.co/t/how-do-i-set-the-pubblish-address-in-logstash/34935/2 "2015-11-18T14:56:38Z")

</div>

Now I understand!

I put my the bind\_host setting on the output section, and now it is working!

An excerpt of my logstash.conf:  
output {  
if "127.0.0.1" not in [message] {  
elasticsearch {  
host =\> "elasticsearch-server"  
index =\> "logstash-haproxy-bsa-provserpro-%{+YYYY.MM.dd}"  
cluster =\> "elasticsearch-diretorio"  
bind\_host =\> "this-logstash-server"  
}  
}  
}

Thanks

---

<div class="post-metadata">

**Author:** ![danilo\_gimenez\_ramos](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@danilo\_gimenez\_ramos](https://discuss.elastic.co/u/danilo_gimenez_ramos)\
**Post date:** [November 23, 2015, 7:22pm UTC](https://discuss.elastic.co/t/how-do-i-set-the-pubblish-address-in-logstash/34935/3 "2015-11-23T19:22:22Z")

</div>

Hello,

This previous configuration was working until I upgrade logstash to version 2. In logstash 2 I can't use bind\_host anymore, anyone have a suggestion?

In the docs of logstash 2 it's say that the bind\_host is permitted but it's not really.

thanks

---

<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, 2015, 7:05am UTC](https://discuss.elastic.co/t/how-do-i-set-the-pubblish-address-in-logstash/34935/4 "2015-11-24T07:05:20Z")

</div>

The `bind_host` option isn't relevant when using the HTTP protocol, and in 2.0 the elasticsearch output is HTTP-only. See the release notes.

---

<div class="post-metadata">

**Author:** ![danilo\_gimenez\_ramos](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@danilo\_gimenez\_ramos](https://discuss.elastic.co/u/danilo_gimenez_ramos)\
**Post date:** [November 24, 2015, 11:26am UTC](https://discuss.elastic.co/t/how-do-i-set-the-pubblish-address-in-logstash/34935/5 "2015-11-24T11:26:51Z")

</div>

Indeed!  
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:** [July 6, 2017, 5:21am UTC](https://discuss.elastic.co/t/how-do-i-set-the-pubblish-address-in-logstash/34935/6 "2017-07-06T05:21:33Z")

</div>


