Skip to content

Commit b59a8a8

Browse files
syslog() source updates (#218)
Updated syslog() source options with special attention to transport(auto) updates in 4.9.
2 parents 27fb5d1 + 7eb333d commit b59a8a8

File tree

3 files changed

+73
-15
lines changed

3 files changed

+73
-15
lines changed

_includes/doc/admin-guide/options/source-transport.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
## transport()
22

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.9 and later versions. The `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 are 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 you had to configure a different port on syslog-ng for each of them 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.
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).
1726

1827
**NOTE:** The {{ site.product.short_name }} application does not support embedded **NUL**
1928
characters everywhere, so it is recommended that you also use
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
>![]({{ site.baseurl}}/assets/images/caution.png) **CAUTION:**
2+
>The tcp-keepalive-time(), tcp-keepalive-probes(), and tcp-keepalive-intvl() options only work on platforms which support the TCP_KEEPCNT, TCP_KEEPIDLE,and TCP_KEEPINTVL setsockopts. Currently, this is Linux.
3+
>
4+
>A connection that has no traffic is closed after tcp-keepalive-time() + tcp-keepalive-intvl() * tcp-keepalive-probes() seconds.
5+
{: .notice--warning}

doc/_admin-guide/060_Sources/170_Syslog/000_syslog_source_options.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ The syslog() driver has the following options.
1313

1414
{% include doc/admin-guide/options/dynamic-window-size.md %}
1515

16+
## ebpf()
17+
18+
|Type: | string|
19+
|Default:| None|
20+
21+
This option is available in {{ site.product.short_name }} 4.2 and later versions.
22+
23+
*Description:* By default, the kernel selects the receive socket for a specific UDP randomly based on the source IP/port of the sender. You can customize this algorithm using the Extended Berkeley Packet Filter (eBPF) plugin. The `ebpf()` option changes the kernel’s `SO_REUSEPORT` algorithm so that all messages are randomly placed into one of the UDP sockets. The decision which UDP socket buffer a datagram is placed is made for every datagram, and not once for every stream. This means that messages are perfectly load-balanced across your set of UDP sockets. While this resolves the imbalance between the sockets and results in perfect load balancing, you will lose ordering between messages from the same sender, which is the price to pay for increased throughput.
24+
25+
1626
{% include doc/admin-guide/options/encoding.md %}
1727

1828
{% include doc/admin-guide/options/source-flags.md %}
@@ -23,11 +33,12 @@ The syslog() driver has the following options.
2333

2434
## interface()
2535

36+
Available in {{ site.product.short_name }} 3.19 and later versions.
37+
2638
| Type:| string|
2739
|Default:| None|
2840

2941
*Description:* Bind to the specified interface instead of an IP address.
30-
Available in 3.19 and later.
3142

3243
{% include doc/admin-guide/options/ip-localip.md %}
3344

@@ -73,6 +84,39 @@ Available in 3.19 and later.
7384

7485
{% include doc/admin-guide/options/tags.md %}
7586

87+
## tcp-keepalive-intvl()
88+
89+
Available in {{ site.product.short_name }} 3.4 and later versions.
90+
91+
|Type: | number [seconds]|
92+
|Default:| `0`|
93+
94+
*Description:* This option specifies the interval between subsequential keepalive probes in seconds, regardless of the traffic exchanged in the connection. This option is equivalent to `/proc/sys/net/ipv4/tcp_keepalive_intvl`. The default value is `0`, which results in using the kernel default.
95+
96+
{% include doc/admin-guide/warnings/tcp-warning.md %}
97+
98+
## tcp-keepalive-probes()
99+
100+
Available in {{ site.product.short_name }} 3.4 and later versions.
101+
102+
|Type: | number [seconds]|
103+
|Default:| `0`|
104+
105+
*Description:* This option specifies the number of unacknowledged probes to send before considering the connection dead. This option is equivalent to `/proc/sys/net/ipv4/tcp_keepalive_probes`. The default value is `0`, which results in using the kernel default.
106+
107+
{% include doc/admin-guide/warnings/tcp-warning.md %}
108+
109+
## tcp-keepalive-time()
110+
111+
Available in {{ site.product.short_name }} 3.4 and later versions.
112+
113+
|Type: | number [seconds]|
114+
|Default:| `0`|
115+
116+
*Description:* This option specifies the interval between the last data packet sent and the first keepalive probe in seconds. This option is equivalent to `/proc/sys/net/ipv4/tcp_keepalive_time`. The default value is `0`, which results in using the kernel default.
117+
118+
{% include doc/admin-guide/warnings/tcp-warning.md %}
119+
76120
{% include doc/admin-guide/options/time-zone.md %}
77121

78122
{% include doc/admin-guide/options/source-transport.md %}

0 commit comments

Comments
 (0)