logzio / docker-logging-plugin

This is a docker logging driver plugin to forward docker logs to Logz.io
Apache License 2.0
7 stars 3 forks source link

How to manually redirect a file to logz.io #7

Open skinderis opened 5 years ago

skinderis commented 5 years ago

We have our docker container logs and debug.log file which has required data that needs to be reflected on logz.io website. How could I pass all the content from debug.log file to logzio/logzio-logging-plugin, so that I can see that content on the logz.io.

We tried to create a symbolic: ln -s /dev/stdout debug.log, but the logs are not reflected on logz.io.

Did anyone tried to gather logs from a custom file for a log-driver? Thanks!

BeOleg commented 5 years ago

@idohalevi perhaps you could help us on this one?

Many thanks :)

idohalevi commented 5 years ago

@skinderis @BeOleg I don't know of a way to do so as the logging driver talks directly to the Docker daemon to receive to logs. This should fit your use-case better than the this plugin

BeOleg commented 5 years ago

Yes, and the daemon should get its logs from /std/out (perhaps it's only the stdout of the entry point?).

We are aware of the logs-collector solution, but it requires running a sidecar container. Since our architecture is designed in the way an actual lxc box wraps every container (for reliability and security reasons) that would mean many sidecar containers :)

Any way to avoid that?

Thanks for the quick reply!

idohalevi commented 5 years ago

Docker drivers documented very well here. Are you working with containers only?

BeOleg commented 5 years ago

I am not sure I get the question. Every container is wrapped in a VM of its own in the cloud which is essential an LXC :)

BeOleg commented 5 years ago

Any ideas here @idohalevi? Otherwise, feel free to close this one.

@skinderis

idohalevi commented 5 years ago

@BeOleg Sorry for the late response. I'm not that familiar with LXC. How do you manage those VM/LXC?