# Logging: What does log-aggregator flex-volume containers for?

**URL:** <https://forums.suse.com/t/logging-what-does-log-aggregator-flex-volume-containers-for/15812>\
**Category:** General\
**Created:** [November 13, 2019, 1:41pm UTC](https://forums.suse.com/t/logging-what-does-log-aggregator-flex-volume-containers-for/15812 "2019-11-13T13:41:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sergey](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@sergey](https://forums.suse.com/u/sergey)\
**Post date:** [November 13, 2019, 1:41pm UTC](https://forums.suse.com/t/logging-what-does-log-aggregator-flex-volume-containers-for/15812/1 "2019-11-13T13:41:48Z")

</div>

When you enable cluster logging, rancher will create log-aggregator daemon set. I believe, that /var/log/docker/containers… local path on each node is mounted just to fluentd pods. Does it not enough to gather cluster logs? Why we need log-aggregator?

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [November 13, 2019, 4:30pm UTC](https://forums.suse.com/t/logging-what-does-log-aggregator-flex-volume-containers-for/15812/2 "2019-11-13T16:30:45Z")

</div>

The log aggregator captures the container’s stdout/err (`docker logs <id>`). The volume allows you to capture arbitrary files that are being written **in** the container (e.g. `/var/log/yourapp.log`).

---

<div class="post-metadata">

**Author:** ![sergey](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@sergey](https://forums.suse.com/u/sergey)\
**Post date:** [November 14, 2019, 7:13am UTC](https://forums.suse.com/t/logging-what-does-log-aggregator-flex-volume-containers-for/15812/3 "2019-11-14T07:13:34Z")

</div>

Container’s stdout/err is written down to /var/log/docker/containers/\*.log by docker log driver, isn’t it? Docker logs command shows this log files. This dir is mounted to fluentd container, so container’s stdout can be parsed just by fluentd, i believe.

But capturing arbitrary files from container with log-aggregator does make sense. Thank you to figure it out for me.
