|
1 | 1 | ## transport()
|
2 | 2 |
|
3 |
| -| Type:| udp, tcp, tls, proxied-tcp, proxied-tls, proxied-tls-passthrough, text-with-nuls| |
4 |
| - |Default:| tcp| |
5 |
| - |
6 |
| -*Description:* Specifies the protocol used to receive messages from the |
7 |
| -source. |
8 |
| - |
9 |
| -For detailed information about how {{ site.product.short_name }} supports the |
10 |
| -proxied-tcp, the proxied-tls, and the proxied-tls-passthrough |
11 |
| -parameters, see Proxy Protocol support. |
12 |
| -text-with-nuls: Allows embedded **NUL** characters in the message from a |
13 |
| -TCP source, that is, {{ site.product.short_name }} will not delimiter the incoming |
14 |
| -messages on **NUL** characters, only on **newline** characters (contrary |
15 |
| -to tcp transport, which splits the incoming log on **newline** |
16 |
| -characters and **NUL** characters). |
| 3 | +|Type: | `auto`, `proxied-tcp`, `proxied-tls`, `proxied-tls-passthrough`, `tcp`, `text-with-nuls`, `tls`, `udp`| |
| 4 | +|Default:| `tcp`| |
| 5 | + |
| 6 | +**Description:** This option specifies the protocol used to receive messages from the source. |
| 7 | + |
| 8 | +* `auto`: Available in {{ site.product.short_name }} 4.10 and later versions. In 4.9 and later versions the new `transport(auto)` option of the syslog() source allows you to support all TCP-based variants with a single source driver. In {{ site.product.short_name }} there numerous transport options and protocols. RFC3164 describes the legacy or BSD syslog protocol, while RFC5424 refers to the more recent syslog protocol. RFC5424 formatted messages normally come with framing or octet counting (RFC6587), where messages are prefixed with the length of the message. Furthermore, some software use RFC5424 message formatting, but without octet counting. In versions prior to {{ site.product.short_name }} 4.9, this many variants meant that that if you wanted to receive logs from RFC3164, and RFC5424 with or without octet counting, you had to configure three different ports on syslog-ng to parse them correctly. In {{ site.product.short_name }} 4.9 and later versions, The new `transport(auto)` option of syslog-ng allows you collect all of these variants using a single port, even the RFC3164 formatting variant with octet counting. |
| 9 | + |
| 10 | +### Example: configuring syslog() source with transport(auto) |
| 11 | + |
| 12 | +```config |
| 13 | +source s_auto { |
| 14 | + syslog(port(514) transport(auto)); |
| 15 | +}; |
| 16 | +destination d_auto { |
| 17 | + file("/var/log/auto.txt"); |
| 18 | +}; |
| 19 | +log { |
| 20 | + source(s_auto); destination(d_auto); |
| 21 | +}; |
| 22 | +``` |
| 23 | + |
| 24 | +* `proxied-tcp`, `proxied-tls`, `proxied-tls-passthrough`: Refers to the HAProxy Proxy Protocol. For more information, see Proxy Protocol support. |
| 25 | +* `text-with-nuls`: Allows embedded `NUL` characters in the message from a TCP source, that is, {{ site.product.short_name }} will not delimiter the incoming messages on `NUL` characters, only on `newline` characters (contrary to tcp transport, which splits the incoming log on `newline` characters and `NUL` characters). |
17 | 26 |
|
18 | 27 | **NOTE:** The {{ site.product.short_name }} application does not support embedded **NUL**
|
19 | 28 | characters everywhere, so it is recommended that you also use
|
|
0 commit comments