logspout
logspout copied to clipboard
There is no way to define a whitelist of docker containers for logspout to monitor
I am mostly happy with the LOGSPOUT=ignore environment variable set per container, but it would be much more useful if that environment variable could optionally be set with ignore as the default value and LOGSPOUT=monitor for example could be set to indicate to logspout that that container should be monitored.
An example use case, we use Amazon AWS ECS which comes with an agent container (which we have no control over). Currently I cannot see a way to disable logspout from monitoring this container.
Also in my local environment I have many other containers running, which clutters the logging. I know I could get logstash for example to drop the logs I don't want, but this is unneccessary work and does not provide optimal performance.
If you're sending to a syslog endpoint, you can add filtering on the endpoint to achieve this:
syslog+tls://papertrail.com:6405?filter.name=*container-name*
I don't know if there is a way to achieve multiple names.
It is awful. K8s doesn't support containers labels and filtering by labels doesn't work (https://github.com/kubernetes/kubernetes/issues/26275). And it is only several lines of code to support multiple names as it is already implemented for labels...
Related #404
Duplicates #351