Good morning.
From a Linux server out of the K8s where my ES is running, Im trying to setup the filebeat so it connects to the Service using the ingress.
If from the linux where I run the filebeat I run a curl to check the connectivity , it works:
Now Im trying to set up the filebeat.yaml with this settings:
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["elasticsearcheck.XXXXXXXXXXXXXXXX.com"]
# Protocol - either `http` (default) or `https`.
protocol: "https"
# Authentication credentials - either API key or username/password.
#api_key: "id:api_key"
username: "${FB_USER}"
password: "${FB_PWD}"
ssl.verification_mode: "none"
Once I run the 'filebeat setup -e' I get the following error.
{"log.level":"error","@timestamp":"2023-06-08T12:54:58.624+0200","log.logger":"esclientleg","log.origin":{"file.name":"eslegclient/connection.go","file.line":235},"message":"error connecting to Elasticsearch at https://elasticsearcheck.XXXXXXX..com:9200: Get "https://elasticsearcheck.XXXXXXX.com:9200": dial tcp X.X.X.X:9200: connect: no route to host","service.name":"filebeat","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2023-06-08T12:54:58.624+0200","log.origin":{"file.name":"instance/beat.go","file.line":1071},"message":"Exiting: couldn't connect to any of the configured Elasticsearch hosts. Errors: [error connecting to Elasticsearch at https://elasticsearcheck.XXXXXXX.com:9200: Get "https://elasticsearcheck.XXXXXXX.com:9200": dial tcp X.X.X.X:9200: connect: no route to host]","service.name":"filebeat","ecs.version":"1.6.0"}
Said that. As my curl really resolves an IP:9200 without addind manually the 9200 as it is included in the ingress. I've got the feeling that the error Filebeat is having is about translating the output.elasticsearch.hosts to -> IP:9200:9200
Does what Im saying makes any sense?
What do you think it could be the problem here? As I say I dont think there is a problem of firewalls or passwords as the curl works and the error message talks about what IMHO is a wrong host URL PATH.
Thank you in advance