Change elastic ip from localhost to x.x.x.x

Hi,
Elastic search by default running on 127.0.0.1:9200. I change it to some IP address. Question is how I can change or tell logstash to connect with given IP address.

Thanks in Advance

Right here - https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-hosts

Example in your conf/pipeline use something like below

output {
  elasticsearch {
    hosts => "{{es_api_uri}}"
    user => "{{es_user}}"
    password => "{{es_password}}"
  }
}

something similar. You can use Array of hosts too in the parameter

URI examples would be
A list of elastic endpoints: ["192.168.2.3:9200","192.168.2.4:9200"]
https protocol and port: ["https://192.168.2.5:9300"]

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