Error connecting to secured ES cluster from logstash.filters.elasticsearch

When I am trying to connect to secured ES cluster from logstash.filters.elasticsearch, getting this error: [2019-05-03T04:15:34,613][WARN ][logstash.filters.elasticsearch] Failed to query elasticsearch for previous event ... :error=>"Illegal character in authority at index 8: https://{:host=>"test-es2:9200", :scheme=>"https", :protocol=>"https", :port=>9200}:9200/indexName/_search?q=fieldName%3A%2522Field%2520Value%2522&size=1"

Tried ["test-es1:9200"] ["https://test-es1:9200"] ["test-es1"]

elasticsearch {
ssl => "true"
hosts => ["test-es1:9200"]
ca_file => "/etc/logstash/tls/certs/ca/ca.crt"
user => "user"
password => "pwd"
index => ["indexName"]
query => "query"
enable_sort => false
fields => {
field1 => field1
}
}

Appreciate if someone can help resolve this problem as I am stuck here for last 2 days.

3 Likes

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