Skip to content

Commit 6dee51e

Browse files
authored
Merge pull request #1940 from fluent/lynettemiles/sc-136241/update-fluent-bit-docs-pipeline-outputs-forward
2 parents b653078 + 05fac9f commit 6dee51e

File tree

2 files changed

+72
-66
lines changed

2 files changed

+72
-66
lines changed

pipeline/outputs/forward.md

Lines changed: 71 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
11
# Forward
22

3-
_Forward_ is the protocol used by [Fluentd](http://www.fluentd.org) to route messages between peers. The **forward** output plugin provides interoperability between [Fluent Bit](http://fluentbit.io) and [Fluentd](http://fluentd.org).
3+
_Forward_ is the protocol used by [Fluentd](http://www.fluentd.org) to route messages between peers. The `forward` output plugin provides interoperability between [Fluent Bit](http://fluentbit.io) and [Fluentd](http://fluentd.org).
44
There are no configuration steps required besides specifying where [Fluentd](http://fluentd.org) is located, which can be a local or a remote destination.
55

6-
This plugin offers two different transports and modes:
6+
This plugin offers the following transports and modes:
77

8-
* Forward (TCP): It uses a plain TCP connection.
9-
* Secure Forward (TLS): when TLS is enabled, the plugin switch to Secure Forward mode.
8+
- Forward (TCP): Uses a plain TCP connection.
9+
- Secure Forward (TLS): When TLS is enabled, the plugin switches to Secure Forward mode.
1010

11-
## Configuration Parameters
11+
## Configuration parameters
1212

13-
The following parameters are mandatory for either Forward for Secure Forward modes:
13+
The following parameters are mandatory for both Forward and Secure Forward modes:
1414

15-
| Key | Description | Default |
16-
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
17-
| Host | Target host where Fluent-Bit or Fluentd are listening for Forward messages. | 127.0.0.1 |
18-
| Port | TCP Port of the target service. | 24224 |
19-
| Time_as_Integer | Set timestamps in integer format, it enable compatibility mode for Fluentd v0.12 series. | False |
20-
| Upstream | If Forward will connect to an _Upstream_ instead of a simple host, this property defines the absolute path for the Upstream configuration file, for more details about this refer to the [Upstream Servers ](../../administration/configuring-fluent-bit/classic-mode/upstream-servers.md)documentation section. | |
21-
| Unix_Path | Specify the path to unix socket to send a Forward message. If set, `Upstream` is ignored. | |
22-
| Tag | Overwrite the tag as we transmit. This allows the receiving pipeline start fresh, or to attribute source. | |
23-
| Send_options | Always send options (with "size"=count of messages) | False |
24-
| Require_ack_response | Send "chunk"-option and wait for "ack" response from server. Enables at-least-once and receiving server can control rate of traffic. (Requires Fluentd v0.14.0+ server) | False |
25-
| Compress | Set to 'gzip' to enable gzip compression. Incompatible with `Time_as_Integer=True` and tags set dynamically using the [Rewrite Tag](../filters/rewrite-tag.md) filter. Requires Fluentd server v0.14.7 or later. | _none_ |
26-
| Workers | The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. | `2` |
15+
| Key | Description | Default |
16+
| --- | ------------ | --------- |
17+
| `Host` | Target host where Fluent Bit or Fluentd are listening for Forward messages. | `127.0.0.1` |
18+
| `Port` | TCP Port of the target service. | `24224` |
19+
| `Time_as_Integer` | Set timestamps in integer format, it enables compatibility mode for Fluentd v0.12 series. | `False` |
20+
| `Upstream` | If Forward will connect to an `Upstream` instead of a basic host, this property defines the absolute path for the Upstream configuration file, for more details about this, see [Upstream Servers ](../../administration/configuring-fluent-bit/classic-mode/upstream-servers.md). | _none_ |
21+
| `Unix_Path` | Specify the path to a Unix socket to send a Forward message. If set, `Upstream` is ignored. | _none_ |
22+
| `Tag` | Overwrite the tag as Fluent Bit transmits. This allows the receiving pipeline start fresh, or to attribute a source. | _none_ |
23+
| `Send_options` | Always send options (with `"size"=count of messages`) | `False` |
24+
| `Require_ack_response` | Send `chunk` option and wait for an `ack` response from the server. Enables at-least-once and receiving server can control rate of traffic. Requires Fluentd v0.14.0+ or later | `False` |
25+
| `Compress` | Set to `gzip` to enable gzip compression. Incompatible with `Time_as_Integer=True` and tags set dynamically using the [Rewrite Tag](../filters/rewrite-tag.md) filter. Requires Fluentd server v0.14.7 or later. | _none_ |
26+
| `Workers` | The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. | `2` |
2727

28-
## Secure Forward Mode Configuration Parameters
28+
## Secure Forward mode configuration parameters
2929

30-
When using Secure Forward mode, the [TLS](../../administration/transport-security.md) mode requires to be enabled. The following additional configuration parameters are available:
30+
When using Secure Forward mode, the [TLS](../../administration/transport-security.md) mode must be enabled. The following additional configuration parameters are available:
3131

32-
| Key | Description | Default |
33-
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | --------- |
34-
| Shared_Key | A key string known by the remote Fluentd used for authorization. | |
35-
| Empty_Shared_Key | Use this option to connect to Fluentd with a zero-length secret. | False |
36-
| Username | Specify the username to present to a Fluentd server that enables `user_auth`. | |
37-
| Password | Specify the password corresponding to the username. | |
38-
| Self_Hostname | Default value of the auto-generated certificate common name (CN). | localhost |
39-
| tls | Enable or disable TLS support | Off |
40-
| tls.verify | Force certificate validation | On |
41-
| tls.debug | Set TLS debug verbosity level. It accept the following values: 0 (No debug), 1 (Error), 2 (State change), 3 (Informational) and 4 Verbose | 1 |
42-
| tls.ca_file | Absolute path to CA certificate file | |
43-
| tls.crt_file | Absolute path to Certificate file. | |
44-
| tls.key_file | Absolute path to private Key file. | |
45-
| tls.key_passwd | Optional password for tls.key_file file. | |
32+
| Key | Description | Default |
33+
| --- | ----------- | ------- |
34+
| `Shared_Key` | A key string known by the remote Fluentd used for authorization. | _none_ |
35+
| `Empty_Shared_Key` | Use this option to connect to Fluentd with a zero-length secret. | `False` |
36+
| `Username` | Specify the username to present to a Fluentd server that enables `user_auth`. | _none_ |
37+
| `Password` | Specify the password corresponding to the username. | _none_ |
38+
| `Self_Hostname` | Default value of the auto-generated certificate common name (CN). | `localhost` |
39+
| `tls` | Enable or disable TLS support. | `Off` |
40+
| `tls.verify` | Force certificate validation. | `On` |
41+
| `tls.debug` | Set TLS debug verbosity level. Allowed values: `0` (No debug), `1` (Error), `2` (State change), `3` (Informational), and `4` (Verbose). | `1` |
42+
| `tls.ca_file` | Absolute path to CA certificate file. | _none_ |
43+
| `tls.crt_file` | Absolute path to Certificate file. | _none_ |
44+
| `tls.key_file` | Absolute path to private Key file. | _none_ |
45+
| `tls.key_passwd` | Optional password for `tls.key_file`. | _none_ |
4646

47-
## Forward Setup
47+
## Forward setup
4848

49-
Before proceeding, make sure that [Fluentd](http://fluentd.org) is installed, if it's not the case please refer to the following [Fluentd Installation](http://docs.fluentd.org/v0.12/categories/installation) document and go ahead with that.
49+
Before proceeding, ensure that [Fluentd](http://fluentd.org) is installed. If it's not, refer to the [Fluentd Installation](http://docs.fluentd.org/installation) document.
5050

51-
Once [Fluentd](http://fluentd.org) is installed, create the following configuration file example that will allow us to stream data into it:
51+
After installing Fluentd, create the following configuration file example which lets you to stream data into it:
5252

5353
```text
5454
<source>
@@ -62,14 +62,19 @@ Once [Fluentd](http://fluentd.org) is installed, create the following configurat
6262
</match>
6363
```
6464

65-
That configuration file specifies that it will listen for _TCP_ connections on the port _24224_ through the **forward** input type.
66-
Then for every message with a _fluent_bit_ **TAG**, will print the message to the standard output.
65+
That configuration file specifies that it will listen for TCP connections on port `24224` through the `forward` input type.
6766

68-
In one terminal launch [Fluentd](http://fluentd.org) specifying the new configuration file created:
67+
Every message with a `fluent_bit` tag will print a message to the standard output.
68+
69+
In one terminal, launch Fluentd while specifying the new configuration file created:
6970

7071
```shell
71-
$ fluentd -c test.conf
72+
fluentd -c test.conf
73+
```
74+
75+
Which should return a response similar to the following:
7276

77+
```text
7378
...
7479
2017-03-23 11:50:43 -0600 [info]: reading config file path="test.conf"
7580
...
@@ -103,24 +108,24 @@ $ fluentd -c test.conf
103108
...
104109
```
105110

106-
## Fluent Bit + Forward Setup <a href="forward_setup" id="forward_setup"></a>
111+
## Fluent Bit and Forward setup
107112

108-
Now that [Fluentd](http://fluentd.org) is ready to receive messages, we need to specify where the **forward** output plugin will flush the information using the following format:
113+
When Fluentd is ready to receive messages, specify where the `forward` output plugin will flush the information using the following format:
109114

110115
```shell
111116
fluent-bit -i INPUT -o forward://HOST:PORT
112117
```
113118

114-
If the **TAG** parameter is not set, the plugin will retain the tag.
115-
Keep in mind that **TAG** is important for routing rules inside [Fluentd](http://fluentd.org).
119+
If the `tag` parameter isn't set, the plugin will retain the tag.
120+
The `tag` is important for routing rules inside Fluentd.
116121

117-
Using the [CPU](../inputs/cpu-metrics.md) input plugin as an example we will flush CPU metrics to [Fluentd](http://fluentd.org) with tag _fluent_bit_:
122+
Using the [CPU](../inputs/cpu-metrics.md) input plugin as an example, you can flush `cpu` metrics with the `tag` `fluent_bit` to Fluentd:
118123

119124
```shell
120125
fluent-bit -i cpu -t fluent_bit -o forward://127.0.0.1:24224
121126
```
122127

123-
Now on the [Fluentd](http://fluentd.org) side, you will see the CPU metrics gathered in the last seconds:
128+
In Fluentd, you will see the CPU metrics gathered in the last seconds:
124129

125130
```text
126131
...
@@ -131,13 +136,13 @@ Now on the [Fluentd](http://fluentd.org) side, you will see the CPU metrics gath
131136
...
132137
```
133138

134-
So we gathered [CPU](../inputs/cpu-metrics.md) metrics and flushed them out to [Fluentd](http://fluentd.org) properly.
139+
This shows that [CPU](../inputs/cpu-metrics.md) metrics were gathered and flushed out to Fluentd properly.
135140

136-
## Fluent Bit + Secure Forward Setup <a href="secure_forward_setup" id="secure_forward_setup"></a>
141+
## Fluent Bit and Secure Forward setup
137142

138-
> DISCLAIMER: the following example does not consider the generation of certificates for best practice on production environments.
143+
The following example doesn't consider the generation of certificates for best practice on production environments.
139144

140-
Secure Forward aims to provide a secure channel of communication with the remote Fluentd service using [TLS](../../administration/transport-security.md).
145+
Secure Forward provides a secure channel of communication with the remote Fluentd service using [TLS](../../administration/transport-security.md).
141146

142147
### Fluent Bit
143148

@@ -151,12 +156,12 @@ service:
151156
flush: 5
152157
daemon: off
153158
log_level: info
154-
159+
155160
pipeline:
156161
inputs:
157162
- name: cpu
158163
tag: cpu_usage
159-
164+
160165
outputs:
161166
- name: forward
162167
match: '*'
@@ -212,23 +217,23 @@ Paste this content in a file called `fld.conf`:
212217
</match>
213218
```
214219

215-
### Test Communication
220+
### Test communication
216221

217-
Start Fluentd:
222+
1. Start Fluentd:
218223

219-
```shell
220-
fluentd -c fld.conf
221-
```
224+
```shell
225+
fluentd -c fld.conf
226+
```
222227

223-
Start Fluent Bit:
228+
1. Start Fluent Bit:
224229

225-
```shell
226-
# For YAML configuration.
227-
fluent-bit --config flb.yaml
230+
```shell
231+
# For YAML configuration.
232+
fluent-bit --config flb.yaml
228233

229-
# For classic configuration
230-
fluent-bit --config flb.conf
231-
```
234+
# For classic configuration
235+
fluent-bit --config flb.conf
236+
```
232237

233238
After five seconds, Fluent Bit will write records to Fluentd.
234239
In Fluentd output you will see a message like this:
@@ -251,4 +256,4 @@ In Fluentd output you will see a message like this:
251256
2017-03-23 13:34:43 -0600 cpu_usage: {"cpu_p":1.75,"user_p":1.25,"system_p":0.5,"cpu0.p_cpu":3.0,"cpu0.p_user":3.0,"cpu0.p_system":0.0,"cpu1.p_cpu":2.0,"cpu1.p_user":2.0,"cpu1.p_system":0.0,"cpu2.p_cpu":0.0,"cpu2.p_user":0.0,"cpu2.p_system":0.0,"cpu3.p_cpu":1.0,"cpu3.p_user":0.0,"cpu3.p_system":1.0}
252257
2017-03-23 13:34:44 -0600 cpu_usage: {"cpu_p":5.0,"user_p":3.25,"system_p":1.75,"cpu0.p_cpu":4.0,"cpu0.p_user":2.0,"cpu0.p_system":2.0,"cpu1.p_cpu":8.0,"cpu1.p_user":5.0,"cpu1.p_system":3.0,"cpu2.p_cpu":4.0,"cpu2.p_user":3.0,"cpu2.p_system":1.0,"cpu3.p_cpu":4.0,"cpu3.p_user":2.0,"cpu3.p_system":2.0}
253258
...
254-
```
259+
```

vale-styles/FluentBit/Headings.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ exceptions:
3434
- Emmet
3535
- EventBridge
3636
- Fluent Bit
37+
- Forward
3738
- GCP
3839
- GitLab
3940
- GitHub

0 commit comments

Comments
 (0)