diff --git a/pipeline/inputs/forward.md b/pipeline/inputs/forward.md index 19bb7e5cf..e12a76923 100644 --- a/pipeline/inputs/forward.md +++ b/pipeline/inputs/forward.md @@ -31,40 +31,23 @@ To receive Forward messages, you can run the plugin from the command line or thr From the command line you can let Fluent Bit listen for Forward messages with the following options: -```bash -fluent-bit -i forward -o stdout +```shell +$ fluent-bit -i forward -o stdout ``` 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: -```bash -fluent-bit -i forward -p listen="192.168.3.2" -p port=9090 -o stdout +```shell +$ fluent-bit -i forward -p listen="192.168.3.2" -p port=9090 -o stdout ``` In the example, the Forward messages arrive only through network interface `192.168.3.2` address and TCP Port `9090`. ### Configuration file -In your main configuration file append the following `Input` and `Output` sections: +In your main configuration file append the following: {% tabs %} -{% tab title="fluent-bit.conf" %} - -```python -[INPUT] - Name forward - Listen 0.0.0.0 - Port 24224 - Buffer_Chunk_Size 1M - Buffer_Max_Size 6M - -[OUTPUT] - Name stdout - Match * -``` - -{% endtab %} - {% tab title="fluent-bit.yaml" %} ```yaml @@ -75,35 +58,22 @@ pipeline: port: 24224 buffer_chunk_size: 1M buffer_max_size: 6M + outputs: - name: stdout match: '*' ``` {% endtab %} -{% endtabs %} - -## Fluent Bit and Secure Forward Setup - -In Fluent Bit v3 or later, `in_forward` can handle secure forward protocol. - -For using user-password authentication, specify `security.users` at least an one-pair. -For using shared key, specify `shared_key` in both of forward output and forward input. -`self_hostname` isn't able to specify with the same hostname between fluent servers and clients. - -{% tabs %} -{% tab title="fluent-bit-secure-forward.conf" %} +{% tab title="fluent-bit.conf" %} -```python +```text [INPUT] Name forward Listen 0.0.0.0 Port 24224 Buffer_Chunk_Size 1M Buffer_Max_Size 6M - Security.Users fluentbit changeme - Shared_Key secret - Self_Hostname flb.server.local [OUTPUT] Name stdout @@ -111,7 +81,17 @@ For using shared key, specify `shared_key` in both of forward output and forward ``` {% endtab %} +{% endtabs %} + +## Fluent Bit and Secure Forward Setup + +In Fluent Bit v3 or later, `in_forward` can handle secure forward protocol. + +For using user-password authentication, specify `security.users` at least an one-pair. +For using shared key, specify `shared_key` in both of forward output and forward input. +`self_hostname` isn't able to specify with the same hostname between fluent servers and clients. +{% tabs %} {% tab title="fluent-bit-secure-forward.yaml" %} ```yaml @@ -125,11 +105,31 @@ pipeline: security.users: fluentbit changeme shared_key: secret self_hostname: flb.server.local + outputs: - name: stdout match: '*' ``` +{% endtab %} +{% tab title="fluent-bit-secure-forward.conf" %} + +```text +[INPUT] + Name forward + Listen 0.0.0.0 + Port 24224 + Buffer_Chunk_Size 1M + Buffer_Max_Size 6M + Security.Users fluentbit changeme + Shared_Key secret + Self_Hostname flb.server.local + +[OUTPUT] + Name stdout + Match * +``` + {% endtab %} {% endtabs %} @@ -137,14 +137,14 @@ pipeline: After Fluent Bit is running, you can send some messages using the `fluent-cat` tool, provided by [Fluentd](http://www.fluentd.org): -```bash -echo '{"key 1": 123456789, "key 2": "abcdefg"}' | fluent-cat my_tag +```shell +$ echo '{"key 1": 123456789, "key 2": "abcdefg"}' | fluent-cat my_tag ``` When you run the plugin with the following command: -```bash -bin/fluent-bit -i forward -o stdout +```shell +$ fluent-bit -i forward -o stdout ``` In [Fluent Bit](http://fluentbit.io) you should see the following output: @@ -156,4 +156,4 @@ Copyright (C) Treasure Data [2016/10/07 21:49:40] [ info] [engine] started [2016/10/07 21:49:40] [ info] [in_fw] binding 0.0.0.0:24224 [0] my_tag: [1475898594, {"key 1"=>123456789, "key 2"=>"abcdefg"}] -``` +``` \ No newline at end of file