Skip to content

Commit 7129f30

Browse files
authored
Merge pull request #1725 from fluent/lynettemiles/sc-136178/update-fluent-bit-docs-pipeline-inputs-forward
2 parents f32293f + 37593d0 commit 7129f30

File tree

1 file changed

+48
-35
lines changed

1 file changed

+48
-35
lines changed

pipeline/inputs/forward.md

Lines changed: 48 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,53 @@
33
_Forward_ is the protocol used by [Fluent Bit](http://fluentbit.io) and [Fluentd](http://www.fluentd.org) to route messages between peers.
44
This plugin implements the input service to listen for Forward messages.
55

6-
## Configuration Parameters
6+
## Configuration parameters
77

88
The plugin supports the following configuration parameters:
99

10-
| Key | Description | Default |
11-
|:--------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| :--- |
12-
| Listen | Listener network interface. | 0.0.0.0 |
13-
| Port | TCP port to listen for incoming connections. | 24224 |
14-
| Unix_Path | Specify the path to unix socket to receive a Forward message. If set, `Listen` and `Port` are ignored. | |
15-
| Unix_Perm | Set the permission of the unix socket file. If `Unix_Path` is not set, this parameter is ignored. | |
16-
| Buffer\_Max\_Size | Specify the maximum buffer memory size used to receive a Forward message. The value must be according to the [Unit Size](../../administration/configuring-fluent-bit/unit-sizes.md) specification. | 6144000 |
17-
| Buffer\_Chunk\_Size | By default the buffer to store the incoming Forward 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_. The value must be according to the [Unit Size ](../../administration/configuring-fluent-bit/unit-sizes.md)specification. | 1024000 |
18-
| Tag_Prefix | Prefix incoming tag with the defined value.| |
19-
| Tag | Override the tag of the forwarded events with the defined value.| |
20-
| Shared\_Key | Shared key for secure forward authentication. | |
21-
| Empty\_Shared\_Key | Use this option to connect to Fluentd with a zero-length shared key. | `false` |
22-
| Self\_Hostname | Hostname for secure forward authentication. | |
23-
| Security.Users | Specify the username and password pairs for secure forward authentication. | |
24-
| Threaded | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
10+
| Key | Description | Default |
11+
|:----|:------------| :------ |
12+
| `Listen` | Listener network interface. | `0.0.0.0` |
13+
| `Port` | TCP port to listen for incoming connections. | `24224` |
14+
| `Unix_Path` | Specify the path to Unix socket to receive a Forward message. If set, `Listen` and `Port` are ignored. | _none_ |
15+
| `Unix_Perm` | Set the permission of the Unix socket file. If `Unix_Path` isn't set, this parameter is ignored. | _none_ |
16+
| `Buffer_Max_Size` | Specify the maximum buffer memory size used to receive a Forward message. The value must be according to the [Unit Size](../../administration/configuring-fluent-bit/unit-sizes.md) specification. | `6144000` |
17+
| `Buffer_Chunk_Size` | By default the buffer to store the incoming Forward messages, don't allocate the maximum memory allowed, instead it allocate memory when it's required. The rounds of allocations are set by `Buffer_Chunk_Size`. The value must be according to the [Unit Size ](../../administration/configuring-fluent-bit/unit-sizes.md)specification. | `1024000` |
18+
| `Tag_Prefix` | Prefix incoming tag with the defined value.| _none_ |
19+
| `Tag` | Override the tag of the forwarded events with the defined value.| _none_ |
20+
| `Shared_Key` | Shared key for secure forward authentication. | _none_ |
21+
| `Empty_Shared_Key` | Use this option to connect to Fluentd with a zero-length shared key. | `false` |
22+
| `Self_Hostname` | Hostname for secure forward authentication. | _none_ |
23+
| `Security.Users` | Specify the username and password pairs for secure forward authentication. | |
24+
| `Threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
2525

26-
## Getting Started
26+
## Get started
2727

28-
In order to receive Forward messages, you can run the plugin from the command line or through the configuration file as shown in the following examples.
28+
To receive Forward messages, you can run the plugin from the command line or through the configuration file as shown in the following examples.
2929

30-
### Command Line
30+
### Command line
3131

32-
From the command line you can let Fluent Bit listen for _Forward_ messages with the following options:
32+
From the command line you can let Fluent Bit listen for Forward messages with the following options:
3333

3434
```bash
35-
$ fluent-bit -i forward -o stdout
35+
fluent-bit -i forward -o stdout
3636
```
3737

38-
By default the service will listen an all interfaces \(0.0.0.0\) through TCP port 24224, optionally you can change this directly, e.g:
38+
By default, the service listens on all interfaces (`0.0.0.0`) through TCP port `24224`. You can change this by passing parameters to the command:
3939

4040
```bash
41-
$ fluent-bit -i forward -p listen="192.168.3.2" -p port=9090 -o stdout
41+
fluent-bit -i forward -p listen="192.168.3.2" -p port=9090 -o stdout
4242
```
4343

44-
In the example the Forward messages will only arrive through network interface under 192.168.3.2 address and TCP Port 9090.
44+
In the example, the Forward messages arrive only through network interface `192.168.3.2` address and TCP Port `9090`.
4545

46-
### Configuration File
46+
### Configuration file
4747

48-
In your main configuration file append the following _Input_ & _Output_ sections:
48+
In your main configuration file append the following `Input` and `Output` sections:
4949

5050
{% tabs %}
5151
{% tab title="fluent-bit.conf" %}
52+
5253
```python
5354
[INPUT]
5455
Name forward
@@ -61,9 +62,11 @@ In your main configuration file append the following _Input_ & _Output_ sections
6162
Name stdout
6263
Match *
6364
```
65+
6466
{% endtab %}
6567

6668
{% tab title="fluent-bit.yaml" %}
69+
6770
```yaml
6871
pipeline:
6972
inputs:
@@ -76,19 +79,21 @@ pipeline:
7679
- name: stdout
7780
match: '*'
7881
```
82+
7983
{% endtab %}
8084
{% endtabs %}
8185
82-
## Fluent Bit + Secure Forward Setup
86+
## Fluent Bit and Secure Forward Setup
8387
84-
Since Fluent Bit v3, in\_forward can handle secure forward protocol.
88+
In Fluent Bit v3 or later, `in_forward` can handle secure forward protocol.
8589

86-
For using user-password authentication, it needs to specify `security.users` at least an one-pair.
87-
For using shared key, it needs to specify `shared_key` in both of forward output and forward input.
88-
`self_hostname` is not able to specify with the same hostname between fluent servers and clients.
90+
For using user-password authentication, specify `security.users` at least an one-pair.
91+
For using shared key, specify `shared_key` in both of forward output and forward input.
92+
`self_hostname` isn't able to specify with the same hostname between fluent servers and clients.
8993

9094
{% tabs %}
9195
{% tab title="fluent-bit-secure-forward.conf" %}
96+
9297
```python
9398
[INPUT]
9499
Name forward
@@ -104,9 +109,11 @@ For using shared key, it needs to specify `shared_key` in both of forward output
104109
Name stdout
105110
Match *
106111
```
112+
107113
{% endtab %}
108114

109115
{% tab title="fluent-bit-secure-forward.yaml" %}
116+
110117
```yaml
111118
pipeline:
112119
inputs:
@@ -122,21 +129,27 @@ pipeline:
122129
- name: stdout
123130
match: '*'
124131
```
132+
125133
{% endtab %}
126134
{% endtabs %}
127135

128136
## Testing
129137

130-
Once Fluent Bit is running, you can send some messages using the _fluent-cat_ tool \(this tool is provided by [Fluentd](http://www.fluentd.org):
138+
After Fluent Bit is running, you can send some messages using the `fluent-cat` tool, provided by [Fluentd](http://www.fluentd.org):
131139

132140
```bash
133-
$ echo '{"key 1": 123456789, "key 2": "abcdefg"}' | fluent-cat my_tag
141+
echo '{"key 1": 123456789, "key 2": "abcdefg"}' | fluent-cat my_tag
134142
```
135143

136-
In [Fluent Bit](http://fluentbit.io) we should see the following output:
144+
When you run the plugin with the following command:
137145

138146
```bash
139-
$ bin/fluent-bit -i forward -o stdout
147+
bin/fluent-bit -i forward -o stdout
148+
```
149+
150+
In [Fluent Bit](http://fluentbit.io) you should see the following output:
151+
152+
```text
140153
Fluent-Bit v0.9.0
141154
Copyright (C) Treasure Data
142155

0 commit comments

Comments
 (0)