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
_Syslog_ input plugins allows to collect Syslog messages through a Unix socket server \(UDP or TCP\) or over the network using TCP or UDP.
3
+
The _Syslog_ input plugin lets you collect `syslog` messages through a Unix socket server (UDP or TCP) or over the network using TCP or UDP.
4
4
5
-
## Configuration Parameters
5
+
## Configuration parameters
6
6
7
7
The plugin supports the following configuration parameters:
8
8
9
9
| Key | Description | Default |
10
10
| :--- | :--- | :--- |
11
-
| Mode | Defines transport protocol mode: unix\_udp \(UDP over Unix socket\), unix\_tcp \(TCP over Unix socket\), tcp or udp |unix\_udp|
12
-
| Listen | If _Mode_ is set to _tcp_ or _udp_, specify the network interface to bind. | 0.0.0.0 |
13
-
| Port | If _Mode_ is set to _tcp_ or _udp_, specify the TCP port to listen for incoming connections. | 5140 |
14
-
| Path | If _Mode_ is set to _unix\_tcp_ or _unix\_udp_, set the absolute path to the Unix socket file. ||
15
-
|Unix\_Perm| If _Mode_ is set to _unix\_tcp_ or _unix\_udp_, set the permission of the Unix socket file. | 0644 |
16
-
| Parser | Specify an alternative parser for the message. If _Mode_ is set to _tcp_ or _udp_ then the default parser is _syslog-rfc5424_ otherwise _syslog-rfc3164-local_ is used. If your syslog messages have fractional seconds set this Parser value to _syslog-rfc5424_ instead. ||
17
-
|Buffer\_Chunk\_Size| By default the buffer to store the incoming Syslog messages, do not allocate the maximum memory allowed, instead it allocate memory when is required. The rounds of allocations are set by _Buffer\_Chunk\_Size_. If not set, _Buffer\_Chunk\_Size_ is equal to 32000 bytes \(32KB\). Read considerations below when using _udp_ or _unix\_udp_ mode. ||
18
-
|Buffer\_Max\_Size| Specify the maximum buffer size to receive a Syslog message. If not set, the default size will be the value of _Buffer\_Chunk\_Size_. ||
19
-
|Receive\_Buffer\_Size| Specify the maximum socket receive buffer size. If not set, the default value is OS-dependant, but generally too low to accept thousands of syslog messages per second without loss on _udp_ or _unix\_udp_ sockets. Note that on Linux the value is capped by `sysctl net.core.rmem_max`.||
20
-
|Source\_Address\_Key| Specify the key where the source address will be injected. ||
21
-
| Threaded | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). |`false`|
11
+
|`Mode`| Defines transport protocol mode: UDP over Unix socket (`unix_udp`), TCP over Unix socket (`unix_tcp`), `tcp`, or `udp`|`unix_udp`|
12
+
|`Listen`| If `Mode` is set to `tcp` or `udp`, specify the network interface to bind. |`0.0.0.0`|
13
+
|`Port`| If `Mode` is set to `tcp` or `udp`, specify the TCP port to listen for incoming connections. |`5140`|
14
+
|`Path`| If `Mode` is set to `unix_tcp` or `unix_udp`, set the absolute path to the Unix socket file. |_none_|
15
+
|`Unix_Perm`| If `Mode` is set to `unix_tcp` or `unix_udp`, set the permission of the Unix socket file. |`0644`|
16
+
|`Parser`| Specify an alternative parser for the message. If `Mode` is set to `tcp` or `udp` then the default parser is `syslog-rfc5424`. Otherwise, `syslog-rfc3164-local` is used. If your syslog` messages have fractional seconds set this parser value to `syslog-rfc5424` instead. |_none_|
17
+
|`Buffer_Chunk_Size`| By default, the buffer to store the incoming `syslog` messages. Doesn't allocate the maximum memory allowed, instead it allocates memory when required. The rounds of allocations are set by `Buffer_Chunk_Size`. There are considerations when using `udp` or `unix_udp` mode. |`32KB` (set in code)|
18
+
|`Buffer_Max_Size`| Specify the maximum buffer size to receive a `syslog` message. If not set, the default size is the value of `Buffer_Chunk_Size`. |_none_|
19
+
|`Receive_Buffer_Size`| Specify the maximum socket receive buffer size. If not set, the default value is OS-dependant, but generally too low to accept thousands of syslog messages per second without loss on `udp` or `unix_udp` sockets. For Linux, the value is capped by `sysctl net.core.rmem_max`.|_none_|
20
+
|`Source_Address_Key`| Specify the key where the source address will be injected. |_none_|
21
+
|`Threaded`| Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). |`false`|
22
22
23
23
### Considerations
24
24
25
-
* When using Syslog input plugin, Fluent Bit requires access to the _parsers.conf_ file, the path to this file can be specified with the option _-R_ or through the _Parsers\_File_ key on the \[SERVICE\] section\(more details below\).
26
-
* When _udp_or _unix\_udp_ is used, the buffer size to receive messages is configurable **only** through the _Buffer\_Chunk\_Size_ option which defaults to 32kb.
25
+
- When using the Syslog input plugin, Fluent Bit requires access to the `parsers.conf` file. The path to this file can be specified with the option `-R` or through the `Parsers_File` key in the `[SERVICE]` section.
26
+
- When using `udp`or `unix_udp`, the buffer size to receive messages is configurable only through the `Buffer_Chunk_Size` option, which defaults to 32kb.
27
27
28
-
## Getting Started
28
+
## Get started
29
29
30
-
In order to receive Syslog messages, you can run the plugin from the command line or through the configuration file:
30
+
To receive `syslog` messages, you can run the plugin from the command line or through the configuration file:
31
31
32
-
### Command Line
32
+
### Command line
33
33
34
-
From the command line you can let Fluent Bit listen for _Forward_ messages with the following options:
34
+
From the command line you can let Fluent Bit listen for `Forward` messages with the following options:
The following content aims to provide configuration examples for different use cases to integrate Fluent Bit and make it listen for Syslog messages from your systems.
120
+
The following configuration examples cover different use cases to integrate Fluent Bit and make it listen for Syslog messages from your systems.
112
121
113
-
### Rsyslog to Fluent Bit: Network mode over TCP <aid="rsyslog_to_fluentbit_network"></a>
122
+
### `rsyslog` to Fluent Bit: Network mode over TCP
114
123
115
-
#### Fluent Bit Configuration
124
+
#### Fluent Bit configuration
116
125
117
126
Put the following content in your configuration file:
118
127
119
128
{% tabs %}
129
+
{% tab title="fluent-bit.yaml" %}
130
+
131
+
```yaml
132
+
service:
133
+
flush: 1
134
+
parsers_file: parsers.conf
135
+
pipeline:
136
+
inputs:
137
+
- name: syslog
138
+
parser: syslog-rfc3164
139
+
listen: 0.0.0.0
140
+
port: 5140
141
+
mode: tcp
142
+
outputs:
143
+
- name: stdout
144
+
match: '*'
145
+
```
146
+
147
+
{% endtab %}
148
+
120
149
{% tab title="fluent-bit.conf" %}
150
+
121
151
```text
122
152
[SERVICE]
123
153
Flush 1
@@ -134,51 +164,54 @@ Put the following content in your configuration file:
134
164
Name stdout
135
165
Match *
136
166
```
137
-
{% endtab %}
138
167
139
-
{% tab title="fluent-bit.yaml" %}
140
-
```yaml
141
-
service:
142
-
flush: 1
143
-
parsers_file: parsers.conf
144
-
pipeline:
145
-
inputs:
146
-
- name: syslog
147
-
parser: syslog-rfc3164
148
-
listen: 0.0.0.0
149
-
port: 5140
150
-
mode: tcp
151
-
outputs:
152
-
- name: stdout
153
-
match: '*'
154
-
```
155
168
{% endtab %}
156
169
{% endtabs %}
157
170
158
-
then start Fluent Bit.
171
+
Then, start Fluent Bit.
159
172
160
-
#### RSyslog Configuration
173
+
#### `rsyslog` configuration
161
174
162
-
Add a new file to your rsyslog config rules called _60-fluent-bit.conf_ inside the directory _/etc/rsyslog.d/_ and add the following content:
175
+
Add a new file to your `rsyslog` configuration rules called `60-fluent-bit.conf` inside the directory `/etc/rsyslog.d/` and add the following content:
### Rsyslog to Fluent Bit: Unix socket mode over UDP
187
+
### `rsyslog` to Fluent Bit: Unix socket mode over UDP
175
188
176
-
#### Fluent Bit Configuration
189
+
#### Fluent Bit configuration
177
190
178
-
Put the following content in your fluent-bit.conf file:
191
+
Put the following content in your `fluent-bit.conf` file:
179
192
180
193
{% tabs %}
194
+
{% tab title="fluent-bit.yaml" %}
195
+
196
+
```yaml
197
+
service:
198
+
flush: 1
199
+
parsers_file: parsers.conf
200
+
pipeline:
201
+
inputs:
202
+
- name: syslog
203
+
parser: syslog-rfc3164
204
+
path: /tmp/fluent-bit.sock
205
+
mode: unix_udp
206
+
unix_perm: 0644
207
+
outputs:
208
+
- name: stdout
209
+
match: '*'
210
+
```
211
+
212
+
{% endtab %}
181
213
{% tab title="fluent-bit.conf" %}
214
+
182
215
```text
183
216
[SERVICE]
184
217
Flush 1
@@ -195,37 +228,20 @@ Put the following content in your fluent-bit.conf file:
195
228
Name stdout
196
229
Match *
197
230
```
198
-
{% endtab %}
199
231
200
-
{% tab title="fluent-bit.yaml" %}
201
-
```yaml
202
-
service:
203
-
flush: 1
204
-
parsers_file: parsers.conf
205
-
pipeline:
206
-
inputs:
207
-
- name: syslog
208
-
parser: syslog-rfc3164
209
-
path: /tmp/fluent-bit.sock
210
-
mode: unix_udp
211
-
unix_perm: 0644
212
-
outputs:
213
-
- name: stdout
214
-
match: '*'
215
-
```
216
232
{% endtab %}
217
233
{% endtabs %}
218
234
219
-
then start Fluent Bit.
235
+
Then, start Fluent Bit.
220
236
221
-
#### RSyslog Configuration
237
+
#### `rsyslog` configuration
222
238
223
-
Add a new file to your rsyslog config rules called _60-fluent-bit.conf_ inside the directory _/etc/rsyslog.d/_ and place the following content:
239
+
Add a new file to your `rsyslog` configuration rules called `60-fluent-bit.conf` inside the directory `/etc/rsyslog.d/` containing the following content:
224
240
225
241
```text
226
242
$ModLoad omuxsock
227
243
$OMUxSockSocket /tmp/fluent-bit.sock
228
244
*.* :omuxsock:
229
245
```
230
246
231
-
Make sure that the socket file is readable by rsyslog\(tweak the`Unix_Perm`option shown above\).
247
+
Make sure that the socket file is readable by `rsyslog` by modifying`Unix_Perm`key.
0 commit comments