I'm trying to connect to AWS instance for monitoring using metricbeat but getting an error "proxyconnect tcp: tls: first record does not look like a TLS handshake". When trying to test it with curl seems that is working.
Anyone have any ideas what can be the issue.
Metricbeat version: 7.6
Here is my configuration
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
Array of hosts to connect to.
hosts: ["http://AWS instace.us-west-1.aws.found.io:443"]
username: "cloud_monitoring_agent"
password: "xxxxx"
proxy_url: "https://proxy.domain.com:3128"
#proxy_disable: true
proxy_disable: false
Protocol - either http
(default) or https
.
#protocol: "https"
This is the outputs I've got.
Output
May 14 21:18:27 server metricbeat: 2020-05-14T21:18:27.191Z#011INFO#011pipeline/output.go:95#011Connecting to backoff(elasticsearch(http://AWS instance.us-west-1.aws.found.io:443))
May 14 21:18:28 server metricbeat: 2020-05-14T21:18:28.495Z#011ERROR#011pipeline/output.go:100#011Failed to connect to backoff(elasticsearch(http://AWS instance.us-west-1.aws.found.io:443)): Get http://.us-west-1.aws.found.io:443: proxyconnect tcp: tls: first record does not look like a TLS handshake
May 14 21:18:28 server metricbeat: 2020-05-14T21:18:28.495Z#011INFO#011pipeline/output.go:93#011Attempting to reconnect to backoff(elasticsearch(http://.us-west-1.aws.found.io:443)) with 1 reconnect attempt(s)
May 14 21:18:30 server metricbeat: 2020-05-14T21:18:30.501Z#011ERROR#011pipeline/output.go:100#011Failed to connect to backoff(elasticsearch(http://AWS instance.us-west-1.aws.found.io:443)): Get http://.us-west-1.aws.found.io:443: proxyconnect tcp: tls: first record does not look like a TLS handshake
Curl output
'# curl -u cloud_monitoring_agent:xxxxxx -x https://proxy.domain.com:3128 https://.us-west-1.aws.found.io:443
{
"name" : "instance-0000000001",
"cluster_name" : "",
"cluster_uuid" : "",
"version" : {
"number" : "7.3.0",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "de777fa",
"build_date" : "2019-07-24T18:30:11.767338Z",
"build_snapshot" : false,
"lucene_version" : "8.1.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}