have setup operator based elasticsearch & kibana.. but since logstash is not within ECK, running logstash as standalone. Unfortunately, i'm trying it hard to find to connect to Elasticsearch due to certificate issue.
output {
# stdout { codec => rubydebug }
elasticsearch {
hosts => ["localhost:9200"]
index => "my_index"
document_id => "%{[@metadata][id]}"
user => "elastic"
password => "my_elastic_passwd"
ssl => true
ssl_certificate_verification => false
}
}
with above setting, i'm getting an error: even though I've put ssl_certificate_verification=> false
!!
[WARN ][logstash.outputs.elasticsearch][main] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"https://elastic:xxxxxx@localhost:9200/",
:error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError,
:error=>"Elasticsearch Unreachable: [https://elastic:xxxxxx@localhost:9200/][Manticore::ClientProtocolException] PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target"}
As another method, I tried extracting the certificate as pem file and tried to load for logstash.
Like below
ssl => true
cacert => "/extracted/pem/file_from/eck_elastic.pem
But this also has an error, because i'm using localhost