Passing into a docker log driver tag for ELK?


I’m trying to figure out how to pass in the automatic label that rancher sets on each container in a service through to a log driver for docker so I can easily identify logs in ELK.

The reason for this is to be a workaround for #4993 - “Container names revert to UUID after service upgrade”. This issue means every odd time I upgrade a service the containers will switch to a uuid name making log searching impossible.

Docker suggests it can pass through labels into a log driver but due to the label having full stops in it elk will reject it due to it’s own restriction with field names.

Anyone got any ideas?