@@ -31,40 +31,23 @@ To receive Forward messages, you can run the plugin from the command line or thr
3131
3232From the command line you can let Fluent Bit listen for Forward messages with the following options:
3333
34- ``` bash
35- fluent-bit -i forward -o stdout
34+ ``` shell
35+ $ fluent-bit -i forward -o stdout
3636```
3737
3838By 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
40- ``` bash
41- fluent-bit -i forward -p listen=" 192.168.3.2" -p port=9090 -o stdout
40+ ``` shell
41+ $ fluent-bit -i forward -p listen=" 192.168.3.2" -p port=9090 -o stdout
4242```
4343
4444In the example, the Forward messages arrive only through network interface ` 192.168.3.2 ` address and TCP Port ` 9090 ` .
4545
4646### Configuration file
4747
48- In your main configuration file append the following ` Input ` and ` Output ` sections :
48+ In your main configuration file append the following:
4949
5050{% tabs %}
51- {% tab title="fluent-bit.conf" %}
52-
53- ``` python
54- [INPUT ]
55- Name forward
56- Listen 0.0 .0.0
57- Port 24224
58- Buffer_Chunk_Size 1M
59- Buffer_Max_Size 6M
60-
61- [OUTPUT ]
62- Name stdout
63- Match *
64- ```
65-
66- {% endtab %}
67-
6851{% tab title="fluent-bit.yaml" %}
6952
7053``` yaml
@@ -75,43 +58,40 @@ pipeline:
7558 port : 24224
7659 buffer_chunk_size : 1M
7760 buffer_max_size : 6M
61+
7862 outputs :
7963 - name : stdout
8064 match : ' *'
8165` ` `
8266
8367{% endtab %}
84- {% endtabs %}
85-
86- ## Fluent Bit and Secure Forward Setup
87-
88- In Fluent Bit v3 or later, ` in_forward` can handle secure forward protocol.
89-
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.
93-
94- {% tabs %}
95- {% tab title="fluent-bit-secure-forward.conf" %}
68+ {% tab title="fluent-bit.conf" %}
9669
97- ` ` ` python
70+ ` ` ` text
9871[INPUT]
9972 Name forward
10073 Listen 0.0.0.0
10174 Port 24224
10275 Buffer_Chunk_Size 1M
10376 Buffer_Max_Size 6M
104- Security.Users fluentbit changeme
105- Shared_Key secret
106- Self_Hostname flb.server.local
10777
10878[OUTPUT]
10979 Name stdout
11080 Match *
11181```
11282
11383{% endtab %}
84+ {% endtabs %}
85+
86+ ## Fluent Bit and Secure Forward Setup
87+
88+ In Fluent Bit v3 or later, ` in_forward ` can handle secure forward protocol.
89+
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.
11493
94+ {% tabs %}
11595{% tab title="fluent-bit-secure-forward.yaml" %}
11696
11797``` yaml
@@ -125,26 +105,46 @@ pipeline:
125105 security.users : fluentbit changeme
126106 shared_key : secret
127107 self_hostname : flb.server.local
108+
128109 outputs :
129110 - name : stdout
130111 match : ' *'
131112` ` `
132113
114+ {% endtab %}
115+ {% tab title="fluent-bit-secure-forward.conf" %}
116+
117+ ` ` ` text
118+ [INPUT]
119+ Name forward
120+ Listen 0.0.0.0
121+ Port 24224
122+ Buffer_Chunk_Size 1M
123+ Buffer_Max_Size 6M
124+ Security.Users fluentbit changeme
125+ Shared_Key secret
126+ Self_Hostname flb.server.local
127+
128+ [OUTPUT]
129+ Name stdout
130+ Match *
131+ ```
132+
133133{% endtab %}
134134{% endtabs %}
135135
136136## Testing
137137
138138After Fluent Bit is running, you can send some messages using the ` fluent-cat ` tool, provided by [ Fluentd] ( http://www.fluentd.org ) :
139139
140- ` ` ` bash
141- echo '{"key 1": 123456789, "key 2": "abcdefg"}' | fluent-cat my_tag
140+ ``` shell
141+ $ echo ' {"key 1": 123456789, "key 2": "abcdefg"}' | fluent-cat my_tag
142142```
143143
144144When you run the plugin with the following command:
145145
146- ` ` ` bash
147- bin/ fluent-bit -i forward -o stdout
146+ ``` shell
147+ $ fluent-bit -i forward -o stdout
148148```
149149
150150In [ Fluent Bit] ( http://fluentbit.io ) you should see the following output:
@@ -156,4 +156,4 @@ Copyright (C) Treasure Data
156156[2016/10/07 21:49:40] [ info] [engine] started
157157[2016/10/07 21:49:40] [ info] [in_fw] binding 0.0.0.0:24224
158158[0] my_tag: [1475898594, {"key 1"=>123456789, "key 2"=>"abcdefg"}]
159- ` ` `
159+ ```
0 commit comments