1

There are many docker containers which are running on a given server. I have configured each application instance running inside the container to send the logs to the standard output. Now, I am interested in the following:

  1. Manage the logs coming out of all these containers.
  2. Store all of these logs and also rotate them as needed.
  3. Only store the logs locally on the server or on a shared location but NOT sending them to any cloud/log management service.
  4. Probably coming up with a container which can take up the task of log management independently.

Any suggestions on how I can achieve this?

sunsin1985
  • 2,437
  • 5
  • 22
  • 27

2 Answers2

1

You can create data container which will gather all logs from all of your containers.

Then you can process those logs for example with ELK stack (Elastic search, logstash, kibana) to aggregate and transoform and visualise your logs for your need.

wsl
  • 8,875
  • 1
  • 20
  • 24
1

also rotate them as needed.

Docker will have logrotate in a future version, but you can already use logrotate for docker container http://blog.sandro-keil.de/2015/03/11/logrotate-for-docker-container/

user2915097
  • 30,758
  • 6
  • 57
  • 59