You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pipeline/outputs/syslog.md
+117-4Lines changed: 117 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,8 @@
2
2
3
3
The Syslog output plugin allows you to deliver messages to Syslog servers. It supports RFC3164 and RFC5424 formats through different transports such as UDP, TCP or TLS.
4
4
5
-
As of Fluent Bit v1.5.3 the configuration is very strict. You must be aware of the structure of your original record so you can configure the plugin to use specific keys to compose your outgoing Syslog message.
5
+
As of Fluent Bit v1.5.3 the configuration is very strict.
6
+
You must be aware of the structure of your original record so you can configure the plugin to use specific keys to compose your outgoing Syslog message.
6
7
7
8
> Future versions of Fluent Bit are expanding this plugin feature set to support better handling of keys and message composing.
8
9
@@ -12,7 +13,7 @@ As of Fluent Bit v1.5.3 the configuration is very strict. You must be aware of t
12
13
| :--- | :--- | :--- |
13
14
| host | Domain or IP address of the remote Syslog server. | 127.0.0.1 |
14
15
| port | TCP or UDP port of the remote Syslog server. | 514 |
15
-
| mode | Desired transport type. Available options are `tcp`, `tls` and `udp`. | udp |
16
+
| mode | Desired transport type. Available options are `tcp` and `udp`. | udp |
16
17
| syslog\_format | The Syslog protocol format to use. Available options are `rfc3164` and `rfc5424`. | rfc5424 |
17
18
| syslog\_maxsize | The maximum size allowed per message. The value must be an integer representing the number of bytes allowed. If no value is provided, the default size is set depending of the protocol version specified by `syslog_format`.<br><br>`rfc3164` sets max size to 1024 bytes.<br><br>`rfc5424` sets the size to 2048 bytes. ||
18
19
| syslog\_severity\_key | The key name from the original record that contains the Syslog severity number. This configuration is optional. ||
@@ -27,16 +28,23 @@ As of Fluent Bit v1.5.3 the configuration is very strict. You must be aware of t
27
28
| syslog\_procid\_preset | The preset process ID. It will be overwritten if `syslog_procid_key` is set and a key of a record is matched. This configuration is optional. ||
28
29
| syslog\_msgid\_key | The key name from the original record that contains the Message ID associated to the message. This configuration is optional. ||
29
30
| syslog\_msgid\_preset | The preset message ID. It will be overwritten if `syslog_msgid_key` is set and a key of a record is matched. This configuration is optional. ||
30
-
| syslog\_sd\_key | The key name from the original record that contains the Structured Data \(SD\)content. This configuration is optional. ||
31
+
| syslog\_sd\_key | The key name from the original record that contains a map of key/value pairs to use as Structured Data \(SD\) content. The key name is included in the resulting SD field as shown in examples below. This configuration is optional. ||
31
32
| syslog\_message\_key | The key name from the original record that contains the message to deliver. Note that this property is **mandatory**, otherwise the message will be empty. ||
32
33
| allow\_longer\_sd\_id| If true, Fluent-bit allows SD-ID that is longer than 32 characters. Such long SD-ID violates RFC 5424.| false |
33
34
35
+
### TLS / SSL
36
+
37
+
The Syslog output plugin supports TLS/SSL.
38
+
For more details about the properties available and general configuration, please refer to the [TLS/SSL](../../administration/transport-security.md) section.
39
+
34
40
## Examples
35
41
36
42
### Configuration File
37
43
38
44
Get started quickly with this configuration file:
39
45
46
+
{% tabs %}
47
+
{% tab title="fluent-bit.conf" %}
40
48
```text
41
49
[OUTPUT]
42
50
name syslog
@@ -55,6 +63,28 @@ Get started quickly with this configuration file:
Some services use the structured data field to pass authentication tokens (e.g. `[<token>@41018]`), which would need to be added to each log message dynamically.
160
+
However, this requires setting the token as a key rather than as a value.
161
+
Here's an example of how that might be achieved, using `AUTH_TOKEN` as a [variable](../../administration/configuring-fluent-bit/classic-mode/variables.md):
162
+
163
+
{% tabs %}
164
+
{% tab title="fluent-bit.conf" %}
165
+
```text
166
+
[FILTER]
167
+
name lua
168
+
match *
169
+
call append_token
170
+
code function append_token(tag, timestamp, record) record["${AUTH_TOKEN}"] = {} return 2, timestamp, record end
0 commit comments