Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cff0907

Browse files
committed
add unix-sockets support in Fluentd logging driver
Signed-off-by: Akira Koyasu <[email protected]>
1 parent 5bef5da commit cff0907

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

engine/admin/logging/fluentd.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The `docker logs` command is not available for this logging driver.
2929

3030
Some options are supported by specifying `--log-opt` as many times as needed:
3131

32-
- `fluentd-address`: specify `host:port` to connect `localhost:24224`
32+
- `fluentd-address`: specify a socket address to connect to the Fluentd daemon, ex `fluentdhost:24224` or `unix:///path/to/fluentd.sock`
3333
- `tag`: specify tag for fluentd message, which interpret some markup, ex `{{.ID}}`, `{{.FullID}}` or `{{.Name}}` `docker.{{.ID}}`
3434

3535

@@ -47,7 +47,7 @@ Before using this logging driver, launch a Fluentd daemon. The logging driver
4747
connects to this daemon through `localhost:24224` by default. Use the
4848
`fluentd-address` option to connect to a different address.
4949

50-
docker run --log-driver=fluentd --log-opt fluentd-address=myhost.local:24224
50+
docker run --log-driver=fluentd --log-opt fluentd-address=fluentdhost:24224
5151

5252
If container cannot connect to the Fluentd daemon, the container stops
5353
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
5959
### fluentd-address
6060

6161
By default, the logging driver connects to `localhost:24224`. Supply the
62-
`fluentd-address` option to connect to a different address.
62+
`fluentd-address` option to connect to a different address. `tcp`(default) and `unix` sockets are supported.
63+
64+
docker run --log-driver=fluentd --log-opt fluentd-address=fluentdhost:24224
65+
docker run --log-driver=fluentd --log-opt fluentd-address=tcp://fluentdhost:24224
66+
docker run --log-driver=fluentd --log-opt fluentd-address=unix:///path/to/fluentd.sock
6367

64-
docker run --log-driver=fluentd --log-opt fluentd-address=myhost.local:24224
68+
Two of the above specify the same address, because `tcp` is default.
6569

6670
### tag
6771

0 commit comments

Comments
 (0)