I would like to know what is the easiest way to forward my docker container logs into a ELK server, so far the solutions I have tried after having search through internet didn´t work at all.
Basically I have a docker image that I run using docker-compose, this container does not log anything locally( it is composed by different services but none of them are logstash or whatever) but I see logging through docker logs -tf imageName or docker-compose logs. Since I am running up the images with compose I cannot make use ( or at least I don´t know how) of the --logs-driver option of docker.
Thus I was wondering if someone may enlight me a bit regarding how to forward that logging to an ELK container for example that I might download.
Run a logstash instance somewhere, set up to listen on the ‘gelf’ port and output to ElasticSearch. Set your log driver to gelf and the destination as that instance. Note that ‘docker logs’ will no longer work.
@nemonik The logs should be getting sent to gelf. Like @jhmartin said in his answer docker logs won’t work any more since it depends on json-file log driver. Check gelf to see if they’re showing up. If they’re not it’s likely a configuration issue, I recall there being a bug around DNS in gelf driver in recent versions too.