From cff09079c73bc327c653ea2a05adac78775c7de7 Mon Sep 17 00:00:00 2001 From: Akira Koyasu Date: Sun, 13 Nov 2016 01:52:16 +0900 Subject: [PATCH] add unix-sockets support in Fluentd logging driver Signed-off-by: Akira Koyasu --- engine/admin/logging/fluentd.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/engine/admin/logging/fluentd.md b/engine/admin/logging/fluentd.md index 6a00e3562535..81d71f2c5626 100644 --- a/engine/admin/logging/fluentd.md +++ b/engine/admin/logging/fluentd.md @@ -29,7 +29,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}}` @@ -47,7 +47,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. @@ -59,9 +59,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=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 - docker run --log-driver=fluentd --log-opt fluentd-address=myhost.local:24224 +Two of the above specify the same address, because `tcp` is default. ### tag