How do I set the pubblish_address in logstash?

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

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

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

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.

Indeed!
Thank you