My Logstash is running behind a proxy server with all the logs successfully delivered to Elasticsearch Cloud. Now I'm trying to enable x-pack on logstash and looks like xpack is not following my proxy. Besides that I can't found any doc related to enable proxy on logstash with x-pack.
My es output
...
output {
elasticsearch {
hosts => "https://xxx.europe-west1.gcp.cloud.es.io:9243/"
password => "xxxx"
user => "logstash_internal"
proxy => "http://proxy.my.url:8080"
}
}
...
I tried to set all possible variables to setup the proxy but it didn't worked .
set JRUBY_OPTS="-J-Dhttp.proxyHost=proxy.myhost.local -J-Dhttp.proxyPort=8080"
set http_proxy="http://proxy.myhost.local:8080"
set https_proxy="http://proxy.myhost.local:8080"
set HTTP_PROXY="http://proxy.myhost.local:8080"
set HTTPS_PROXY="http://proxy.myhost.local:8080"
set LS_JAVA_OPTS="-Dhttp.proxyHost=proxy.myhost.local -Dhttp.proxyPort=8080"
Errors
[2017-10-13T13:23:44,858][INFO ][logstash.licensechecker.licensereader] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>https://logstash_internal:xxxxxx@xxxx.europe-west1.gcp.cloud.es.io:9243/, :path=>"/"}
[2017-10-13T13:23:49,874][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>https://logstash_internal:xxxxxx@xxx.europe-west1.gcp.cloud.es.io:9243/, :path=>"/"}
[2017-10-13T13:23:54,874][WARN ][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"https://logstash_internal:xxxxxx@xxx.europe-west1.gcp.cloud.es.io:9243/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [https://logstash_internal:xxxxxx@xxx.europe-west1.gcp.cloud.es.io:9243/][Manticore::ConnectTimeout] connect timed out"}