rtoma / logspout-redis-logstash

Logspout adapter for writing Docker container logs to Redis in Logstash jsonevent layout
Apache License 2.0
33 stars 28 forks source link

Add a custom field to logspout #13

Open olivibernard opened 7 years ago

olivibernard commented 7 years ago

Hi,

Is it possible to add some data in a custom field ?

I have a 3 swarm cluster, namely : dev, staging and production. I would like to run each logspout container with the corresponding env value.

Something like :

$ docker run -d --name logspout \ -v /var/run/docker.sock:/var/run/docker.sock:ro \ rtoma/logspout-redis-logstash \ redis://<your-redis-server>?key=bla&cluster_env=production

Thanks !

rtoma commented 7 years ago

Sounds like a great feature, but I do not have the time to implement this myself. Feel free to submit a pull request.