If you move past using docker-compose for it and making services of the stack it might be something to try if you have networking issues again.

Emitrr cost

Using localhost means that Logstash will try to connect to an Elasticsearch instance running on the same machine/container, which is not your case since they are on different containers.

Podium

But since you are using https you will have to provide the ca certificate as @stephenb mentioned or set ssl_verification_mode to none in the elasticsearch output.

Fwiw, I had some connection issues when I was initially setting up my docker services as well. I had ended up switching from container names to hosts => ["https://tasks.elasticsearch:9200"] which apparently uses some docker internal networking to reference the container services since I couldn't connect via _app.

I would think the are all on the local docker network... its is possible since the first uses 9200 the others use 9201 9202 etc

Emitrr reviews

I'm able to authenticate using elastic/changeme as the creds when I try accessing the ES cluster from the webui and get the following response:

When I run docker compose up -d all the containers start like they should but my Logstash container is not able to connect to my ES Cluster.