Skip to content

Commit

Permalink
Merge pull request docker#380 from FrenchBen/awstream-tag
Browse files Browse the repository at this point in the history
Added details about tag support for AWS log driver
  • Loading branch information
johndmulhausen committed Nov 3, 2016
2 parents 09b79c9 + ca70084 commit 8e56f9d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions engine/admin/logging/awslogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ specified, the container ID is used as the log stream.
> at a time. Using the same log stream for multiple containers concurrently
> can cause reduced logging performance.
### tag

Specify `tag` as an alternative to the `awslogs-stream` option. `tag` interprets template markup (e.g., `{% raw %}{{.ID}}{% endraw %}`, `{% raw %}{{.FullID}}{% endraw %}` or `{% raw %}{{.Name}}{% endraw %}` `{% raw %}docker.{{.ID}}{% endraw %}`).
See the [tag option documentation](log_tags.md) for details on all supported template substitutions.

When both `awslogs-stream` and `tag` are specified, the value supplied for `awslogs-stream` will override the template specified with `tag`.

If not specified, the container ID is used as the log stream.


## Credentials

You must provide AWS credentials to the Docker daemon to use the `awslogs`
Expand Down
5 changes: 5 additions & 0 deletions engine/admin/logging/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,13 @@ logging driver options.
For example, to specify both additional options:

```bash
{% raw %}
$ docker run -dit \
--log-driver=fluentd \
--log-opt fluentd-address=localhost:24224 \
--log-opt tag="docker.{{.Name}}" \
alpine sh
{% endraw %}
```

If container cannot connect to the Fluentd daemon on the specified address and
Expand All @@ -262,9 +264,12 @@ see [the fluentd logging driver](fluentd.md)
The Amazon CloudWatch Logs logging driver supports the following options:

```bash
{% raw %}
--log-opt awslogs-region=<aws_region>
--log-opt awslogs-group=<log_group_name>
--log-opt awslogs-stream=<log_stream_name>
--log-opt tag="docker.{{.Name}}" \
{% endraw %}
```

For detailed information on working with this logging driver, see [the awslogs
Expand Down

0 comments on commit 8e56f9d

Please sign in to comment.