Answer the question
In order to leave comments, you need to log in
Using ElasticsearchLogstashHandler inside Docker?
there is such an instruction: https://jolicode.com/blog/how-to-visualize-symfony...
Briefly - it tells how to raise 2 containers with kibana and elasticsearch, connect ElasticsearchLogstashHandler (which comes with the monologue) in Symphony.
These two containers + the container with Symfony are united by one network. But there is a problem:
by default, the ElasticsearchLogstashHandler itself tries to make a request to elasticksearch via curl at
127.0.0.1:9200 the symphony inside the container wants to shoot at 127.0.0.1, but it can't because inside itself, it independently creates its own internal ip-address.
I see several solutions:
1. Symphony somehow determines the internal ip address of the network in which it spins and passes this ip to the ElasticsearchLogstashHandler arguments
2. When creating a container with elascticsearch, forward the ip address inside = 127.0.0.1
3. When creating a network, explicitly specify what would the internal ip-address be 127.0.0.1
Maybe someone faced a similar task?
Maybe this can be solved much easier than I painted here?
Answer the question
In order to leave comments, you need to log in
most likely instead of ip you need to substitute the name of the container
when you write something like this in docker-compose:
mysql:
image: mysql:5.7
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question