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
|`port`| The port for Fluent Bit to listen on. |`9880`|
12
-
|`tag_key`| Specify the key name to overwrite a tag. If set, the tag will be overwritten by a value of the key. |_none_|
13
-
|`buffer_max_size`| Specify the maximum buffer size in KB to receive a JSON message. |`4M`|
14
-
|`buffer_chunk_size`| This sets the chunk size for incoming JSON messages. These chunks are then stored and managed in the space available by `buffer_max_size`. |`512K`|
|`port`| The port for Fluent Bit to listen on. |`9880`|
12
+
|`tag_key`| Specify the key name to overwrite a tag. If set, the tag will be overwritten by a value of the key. |_none_|
13
+
|`buffer_max_size`| Specify the maximum buffer size in KB to receive a JSON message. |`4M`|
14
+
|`buffer_chunk_size`| This sets the chunk size for incoming JSON messages. These chunks are then stored and managed in the space available by `buffer_max_size`. |`512K`|
|`success_header`| Add an HTTP header key/value pair on success. Multiple headers can be set. For example, `X-Custom custom-answer`|_none_|
17
+
|`threaded`| Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). |`false`|
18
+
|`add_remote_addr`| Adds a REMOTE_ADDR field to the record. The value of REMOTE_ADDR is the client's address, which is extracted from the X-Forwarded-For header. |`false`|
18
19
19
20
### TLS / SSL
20
21
@@ -40,6 +41,32 @@ For example, in the following curl message the tag set is `app.log**. **` becaus
Adds a REMOTE_ADDR field to the records. The value of REMOTE_ADDR is the client's address, which is extracted from the X-Forwarded-For header.
47
+
48
+
In most cases, only a single X-Forwarded-For header is in the request, so the following curl would add a REMOTE_ADDR field which would be set to `host1`:
However, if your system sets multiple `X-Forwarded-For` headers in the request, which one is used (first, or last) will depend on the value of the `http2` config, for example:
55
+
56
+
Assuming the following X-Forwarded-For headers are in the request:
57
+
58
+
```
59
+
X-Forwarded-For: host1, host2
60
+
X-Forwarded-For: host3, host4
61
+
```
62
+
63
+
The value of REMOTE_ADDR will be:
64
+
65
+
| http2 config | value of REMOTE_ADDR |
66
+
|------------------|----------------------|
67
+
|`true` (default) | host3 |
68
+
|`false`| host1 |
69
+
43
70
### Configuration file
44
71
45
72
{% tabs %}
@@ -160,6 +187,46 @@ pipeline:
160
187
{% endtab %}
161
188
{% endtabs %}
162
189
190
+
#### Set `add_remote_addr`
191
+
192
+
The `add_remote_addr` configuration option allows you to activate a feature that will systematically add a REMOTE_ADDR field to events, and set its value to the client's address. The address will be extracted from the X-Forwarded-For header of the request. The format is:
0 commit comments