add unix-sockets support in Fluentd logging driver

Signed-off-by: Akira Koyasu <mail@akirakoyasu.net>
This commit is contained in:
Akira Koyasu 2016-11-13 01:52:16 +09:00 committed by Misty Stanley-Jones
parent 45a19ec8f3
commit eb93d33609
1 changed files with 8 additions and 4 deletions

View File

@ -28,7 +28,7 @@ The `docker logs` command is not available for this logging driver.
Some options are supported by specifying `--log-opt` as many times as needed:
- `fluentd-address`: specify `host:port` to connect `localhost:24224`
- `fluentd-address`: specify a socket address to connect to the Fluentd daemon, ex `fluentdhost:24224` or `unix:///path/to/fluentd.sock`
- `tag`: specify tag for fluentd message, which interpret some markup, ex `{{.ID}}`, `{{.FullID}}` or `{{.Name}}` `docker.{{.ID}}`
@ -46,7 +46,7 @@ Before using this logging driver, launch a Fluentd daemon. The logging driver
connects to this daemon through `localhost:24224` by default. Use the
`fluentd-address` option to connect to a different address.
docker run --log-driver=fluentd --log-opt fluentd-address=myhost.local:24224
docker run --log-driver=fluentd --log-opt fluentd-address=fluentdhost:24224
If container cannot connect to the Fluentd daemon, the container stops
immediately unless the `fluentd-async-connect` option is used.
@ -58,9 +58,13 @@ Users can use the `--log-opt NAME=VALUE` flag to specify additional Fluentd logg
### fluentd-address
By default, the logging driver connects to `localhost:24224`. Supply the
`fluentd-address` option to connect to a different address.
`fluentd-address` option to connect to a different address. `tcp`(default) and `unix` sockets are supported.
docker run --log-driver=fluentd --log-opt fluentd-address=myhost.local:24224
docker run --log-driver=fluentd --log-opt fluentd-address=fluentdhost:24224
docker run --log-driver=fluentd --log-opt fluentd-address=tcp://fluentdhost:24224
docker run --log-driver=fluentd --log-opt fluentd-address=unix:///path/to/fluentd.sock
Two of the above specify the same address, because `tcp` is default.
### tag