Skip to content

Commit caf7b84

Browse files
eschabellpatrick-stephens
authored andcommitted
docs pipeline: outputs: syslog: document DTLS transport mode (#2643)
* docs: pipeline: outputs: syslog: document DTLS transport mode Replace the statement that DTLS isn't supported with the four available transport modes and their tls requirements, including the startup validation rules for mode=dtls and mode=udp. Note that mode=tls alone does not secure the connection, and add a DTLS configuration example. Also, clarified that TLS is not a transport. Note, covers code changes without corresponding docs PR. Signed-off-by: Eric D. Schabell <eric@schabell.org> * docs: docs: pipeline: outputs: syslog: correct TLS mode behavior Upstream commit 40641ddb (out_syslog: Handle TLS mode automatically) changed how mode=tls and mode=dtls interact with the tls parameter. Both modes now enable TLS themselves, and the mode=dtls requires tls=on startup check was removed. Update the docs to match: - Intro: list UDP, TCP, TLS, and DTLS as four transports, and drop the claim that TLS isn't a transport of its own. - Transport modes table: change the tls setting for tls and dtls from required to optional and enabled automatically, and drop "behaves the same as tcp" from the tls row. - Replace the paragraph stating that mode=tls doesn't secure the connection on its own with the automatic TLS behavior. - Startup validation: remove the mode=dtls requires tls=on bullet, which no longer exists in the source, and add a bullet for builds compiled without TLS support failing with "TLS support is unavailable". - DTLS example: drop the now-redundant tls: on from both the YAML and classic configuration tabs. Signed-off-by: Eric D. Schabell <eric@schabell.org> --------- Signed-off-by: Eric D. Schabell <eric@schabell.org> Signed-off-by: Patrick Stephens <pat@telemetryforge.io>
1 parent 2b28e5e commit caf7b84

1 file changed

Lines changed: 65 additions & 2 deletions

File tree

pipeline/outputs/syslog.md

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Syslog
22

3-
The _Syslog_ output plugin lets you deliver messages to Syslog servers. It supports RFC3164 and RFC5424 formats through different transports such as UDP, TCP, or TLS.
3+
The _Syslog_ output plugin lets you deliver messages to Syslog servers. It supports RFC3164 and RFC5424 formats over UDP, TCP, TLS, and Datagram Transport Layer Security (DTLS) transports.
44

55
## Configuration parameters
66

77
| Key | Description | Default |
88
| --- | ----------- | ------- |
99
| `allow_longer_sd_id` | If `true`, Fluent Bit allows SD-ID values longer than 32 characters. SD-ID values that exceed 32 characters violate RFC5424 standards. | `false` |
1010
| `host` | Domain or IP address of the remote Syslog server. | `127.0.0.1` |
11-
| `mode` | Desired transport type. Available options are `tcp` and `udp`. To use a TLS secure channel, set this to `tcp` and enable the `tls` option separately. Datagram Transport Layer Security (DTLS) over UDP isn't supported. | `udp` |
11+
| `mode` | Desired transport type. Available options are `udp`, `tcp`, `tls`, and `dtls`. See [Transport modes](#transport-modes). | `udp` |
1212
| `port` | TCP or UDP port of the remote Syslog server. | `514` |
1313
| `syslog_appname_key` | Optional. The key name from the original record that contains the application name that generated the message. | _none_ |
1414
| `syslog_appname_preset` | Optional. The preset application name. It will be overwritten if `syslog_appname_key` is set and a key of a record is matched. | _none_ |
@@ -28,10 +28,32 @@ The _Syslog_ output plugin lets you deliver messages to Syslog servers. It suppo
2828
| `syslog_severity_preset` | Optional. The preset severity number. It will be overwritten if `syslog_severity_key` is set and a key of a record is matched. | `6` |
2929
| `workers` | The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. | `0` |
3030

31+
### Transport modes
32+
33+
The `mode` parameter selects the transport used to reach the Syslog server:
34+
35+
| Mode | Transport | `tls` setting |
36+
| --- | --- | --- |
37+
| `udp` | Datagrams. | Must remain `off`. |
38+
| `tcp` | Stream. Set `tls` to `on` to secure the connection. | Optional. |
39+
| `tls` | Stream secured with TLS. | Optional. Enabled automatically. |
40+
| `dtls` | Datagrams secured with DTLS. | Optional. Enabled automatically. |
41+
42+
Setting `mode` to `tls` or `dtls` enables TLS automatically, so you don't need to set `tls` to `on` for those modes. Setting it explicitly is harmless. To secure a `tcp` connection, you must set `tls` to `on`.
43+
44+
Fluent Bit validates the configuration at startup and refuses to start in these cases:
45+
46+
- `mode` set to `udp` with `tls` set to `on` fails with `mode=udp with tls=on is unsupported`. Use `dtls` instead, which is the supported way to secure datagram transport.
47+
- `mode` set to `tls` or `dtls` in a build compiled without TLS support fails with `TLS support is unavailable`.
48+
49+
DTLS support is available in Fluent Bit version 5.1 and greater. Earlier versions support only `udp`, `tcp`, and `tls`.
50+
3151
### TLS / SSL
3252

3353
The Syslog output plugin supports TLS/SSL. For more details about the properties available and general configuration, see [TLS/SSL](../../administration/transport-security.md).
3454

55+
The same TLS properties apply to `dtls` mode, including `tls.verify`, `tls.ca_file`, `tls.crt_file`, and `tls.key_file`.
56+
3557
## Examples
3658

3759
### Configuration file
@@ -87,6 +109,47 @@ pipeline:
87109
{% endtab %}
88110
{% endtabs %}
89111

112+
### Secure datagram transport with DTLS
113+
114+
To send messages over DTLS, set `mode` to `dtls`. The Syslog server must listen for DTLS on the configured port:
115+
116+
{% tabs %}
117+
{% tab title="fluent-bit.yaml" %}
118+
119+
```yaml
120+
pipeline:
121+
122+
outputs:
123+
- name: syslog
124+
match: "*"
125+
host: syslog.yourserver.com
126+
port: 6514
127+
mode: dtls
128+
tls.verify: on
129+
tls.ca_file: /path/to/ca.crt
130+
syslog_format: rfc5424
131+
syslog_message_key: message
132+
```
133+
134+
{% endtab %}
135+
{% tab title="fluent-bit.conf" %}
136+
137+
```text
138+
[OUTPUT]
139+
Name syslog
140+
Match *
141+
Host syslog.yourserver.com
142+
Port 6514
143+
Mode dtls
144+
Tls.verify on
145+
Tls.ca_file /path/to/ca.crt
146+
Syslog_Format rfc5424
147+
Syslog_Message_Key message
148+
```
149+
150+
{% endtab %}
151+
{% endtabs %}
152+
90153
### Structured data
91154

92155
The following is an example of how to configure the `syslog_sd_key` to send Structured Data to the remote Syslog server.

0 commit comments

Comments
 (0)