Search code examples
linuxloggingdockerlog-rotation

Log management of various docker containers


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?


Solution

  • 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.