Closed pedros007 closed 8 years ago
tag
was added as part of Docker 1.9.0. Since you're using 1.8.3, you'll want to use gelf-tag
(see https://github.com/docker/docker/commit/3be7146e14d1f5ced470c0c7e3066f091f468696#diff-23c22cbdd65ac434eaf6d52ee1b9e6b2L96).
I'm going to close this for now, but please feel free to reopen if you continue to have issues using the gelf
logging driver.
The gelf Docker log driver includes an option
--log-opt tag="database"
which propagates into Gelf. I update my Task Definition to set"tag": "database"
, like so:However, when ECS attempts to start the task, it reports
Failed to initialize logging driver: unknown log opt 'tag' for gelf log driver
. Here's a snippet from/var/log/ecs/ecs-agent.log.2015-11-24-23
:For the record, I am using the gelf driver to pipe logs to a Logstash container with an Elasticsearch output. (I start the logstash container during EC2 instance startup using cfn-init in my autoscaling group launch configuration). See my StackOverflow post for how gelf & logstash are configured. When
--log-opt tag="database"
is included in the docker run command, logstash propagates the tag into Elasticsearch. I think this is the same setup as proposed in #238.I am running the 2015.09.b ECS optimized AMI in us-west-2 with an upgraded Docker
Here's my ECS config on the instance: