fluentd logger: support all options besides Unix sockets

Mostly useful for docker/docker#19438.

Signed-off-by: Pierre Carrier <pierre@meteor.com>
Upstream-commit: 13086f387b28ceea5aff5924e430f41608884a9b
Component: engine
This commit is contained in:
Pierre Carrier
2016-01-24 05:51:03 -08:00
parent 0d8ebbb32a
commit 0f2d2de049
3 changed files with 92 additions and 18 deletions

View File

@ -54,7 +54,7 @@ connects to this daemon through `localhost:24224` by default. Use the
docker run --log-driver=fluentd --log-opt fluentd-address=myhost.local:24224
If container cannot connect to the Fluentd daemon, the container stops
immediately.
immediately unless the `fluentd-async-connect` option is used.
## Options
@ -78,6 +78,9 @@ the log tag format.
The `labels` and `env` options each take a comma-separated list of keys. If there is collision between `label` and `env` keys, the value of the `env` takes precedence. Both options add additional fields to the extra attributes of a logging message.
### fluentd-async-connect
Docker connects to Fluentd in the background. Messages are buffered until the connection is established.
## Fluentd daemon management with Docker

View File

@ -189,15 +189,20 @@ run slower but compress more. Default value is 1 (BestSpeed).
You can use the `--log-opt NAME=VALUE` flag to specify these additional Fluentd logging driver options.
- `fluentd-address`: specify `host:port` to connect [localhost:24224]
- `tag`: specify tag for `fluentd` message,
- `tag`: specify tag for `fluentd` message
- `fluentd-buffer-limit`: specify the maximum size of the fluentd log buffer [8MB]
- `fluentd-retry-wait`: initial delay before a connection retry (after which it increases exponentially) [1000ms]
- `fluentd-max-retries`: maximum number of connection retries before abrupt failure of docker [1073741824]
- `fluentd-async-connect`: whether to block on initial connection or not [false]
For example, to specify both additional options:
`docker run --log-driver=fluentd --log-opt fluentd-address=localhost:24224 --log-opt tag=docker.{{.Name}}`
If container cannot connect to the Fluentd daemon on the specified address,
the container stops immediately. For detailed information on working with this
logging driver, see [the fluentd logging driver](fluentd.md)
If container cannot connect to the Fluentd daemon on the specified address and
`fluentd-async-connect` is not enabled, the container stops immediately.
For detailed information on working with this logging driver,
see [the fluentd logging driver](fluentd.md)
## Specify Amazon CloudWatch Logs options