Logstash connection to elasticsearch

First time I read your question I dont think I fully understood what you meant to say. So I started playing with two settings.

  1. The name of the elasticsearch container using: "es" or "elasticsearch"
  2. The host configuration on the config file, one more time using: "es" or "elasticsearch"

The combination of using the name "es" for the elasticsearch container and config file, throws the log error:
http://logstash_system:xxxxxx@elasticsearch:9200/
The combination of using the name "elasticsearch" for the container and but using "es" in the config file, the error is:
http://elastic:xxxxxx@es:9200
Only when I use "elasticsearch" on both the container name and the config file everything works just fine.
When I launch logstash I link the container to the elasticsearch running container.