Hello there,
I have the following pipeline output configuration:
output {
if ("${ELASTICSEARCH_HOSTS:}" == "http://elasticsearch:9200") {
elasticsearch {
action => "index"
index => "street"
hosts => ["${ELASTICSEARCH_HOSTS}"]
document_id => "%{id}"
}
}
else {
elasticsearch {
action => "index"
index => "street"
hosts => ["${ELASTICSEARCH_HOSTS}"]
user => "${ELASTICSEARCH_USERNAME}"
password => "${ELASTICSEARCH_PASSWORD}"
ssl_certificate_verification => "${ELASTICSEARCH_SSL_CERTIFICATE_VERIFICATION}"
cacert => "${ELASTICSEARCH_CA_CERT_PATH}"
document_id => "%{id}"
}
}
stdout {}
}
Even though, the environment variable ELASTICSEARCH_HOSTS is set to "http://elasticsearch:9200", the "else condition" is executed as the pipeline fails due to missing credentials, certificate and so on.
So, my question is: What am I doing wrong in my config?