How to combine logs for all docker containers in meso

I have several microservices written in node and the microservices are installed in a docker container and we are using Mesos + Marathon for clustering.

How can I aggregate the logs of all containers (microservices) in different instances.?


source to share

3 answers

This is a broad question, but I suggest you set up Elastic Search, Logstash, Kibana stack (ELK)

Then on each of your containers, you can run logstash forwarder / shipper to send the logs to your logstash interface.

The logs are saved in Elastic Search and then you search for them using Kibana or Elastic Search API

Hope it helps.



We also use Docker + Mesos and send all logs to the logarithmic analytics service (this is the service I work for for suggestions, ). There are several ways to achieve this:

  • Have a log sender agent in every docker - an agent like rsyslog, nxlog, logstash, logstash-forwarder - this agent sends data to a central logging solution
  • Build a Docker that is running a sender agent (like rsyslog, nxlog, logstash, logstash-forwarder) and this agent reads the logs from all dockers on each machine and sends them to a central location - this is the path we are taking


I am also doing Docker + Mesos + Marathon work, so I think I will have the same doubt as you do.

I don't know if there is any other solution of my own. But there a blog at talked about how they decided to solve this problem.

Here's the link - Aggregating Logs for Docker Containers in Mesos / Marathon Cluster



All Articles