Skip to content

Plugin uses port 9200 to connect https host while 443 is expected #1078

Open
@kaisecheng

Description

@kaisecheng

Logstash version 8.3.3

When the hosts point to https url, it is expected to be in port 443 by default, however, the plugin appends 9200.

Steps to reproduce

input {
      heartbeat {
        message => '{"say": "hello"}'
        interval => 1
      }
}
filter {
	json {
		source => "message"
	}
}
output {
    elasticsearch {
      hosts => ["https://YOUR_HOST.europe-west2.gcp.elastic-cloud.com"]
      index => "test_index"
      user => "YOUR_USERNAME"
      password => "YOUR_PASSWORD"
    }
}

Log

[INFO ][logstash.outputs.elasticsearch][main] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[https://elastic:xxxxxx@YOUR_HOST.europe-west2.gcp.elastic-cloud.com:9200/]}}

Workaround

The workaround is to add :443 to the hosts
hosts => ["https://YOUR_HOST.europe-west2.gcp.elastic-cloud.com:443"]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions