logspout icon indicating copy to clipboard operation
logspout copied to clipboard

There is no way to define a whitelist of docker containers for logspout to monitor

Open dnk8n opened this issue 7 years ago • 4 comments

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.

dnk8n avatar Nov 29 '17 09:11 dnk8n

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.

kingjerod avatar Dec 08 '17 18:12 kingjerod

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

develar avatar Jul 11 '18 07:07 develar

Related #404

develar avatar Jul 11 '18 07:07 develar

Duplicates #351

develar avatar Jul 11 '18 07:07 develar