Hy, very helpfull example!
Bernd Kl
1

Good question. If I remember correctly the static IP for logstash was necessary for the logging driver to be able to connect to logstash. There is some issue with container names not resolving, because the docker daemon in that context (weirdly) has no notion of container names. Static IPs can be resolved though, if their subnet is defined explicitly, that’s why the startup.sh does so via

docker network create --subnet=192.16.0.0/24 monitoring_logging

Which should mean that it should work for containers in other networks just as well, as it is the daemon that is capturing the logs and routing them, not something from within the containers.

But try it out. I am just running everything in one big network, so I haven’t tried. Also experiment with the networks and IP settings. That stuff is from when I just got started with the stack, there might actually be a more elegant way that I didn’t find.

Show your support

Clapping shows how much you appreciated Wilhelm Uschtrin’s story.