@@ -31,40 +31,23 @@ To receive Forward messages, you can run the plugin from the command line or thr
31
31
32
32
From the command line you can let Fluent Bit listen for Forward messages with the following options:
33
33
34
- ``` bash
35
- fluent-bit -i forward -o stdout
34
+ ``` shell
35
+ $ fluent-bit -i forward -o stdout
36
36
```
37
37
38
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:
39
39
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
42
42
```
43
43
44
44
In the example, the Forward messages arrive only through network interface ` 192.168.3.2 ` address and TCP Port ` 9090 ` .
45
45
46
46
### Configuration file
47
47
48
- In your main configuration file append the following ` Input ` and ` Output ` sections :
48
+ In your main configuration file append the following:
49
49
50
50
{% 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
-
68
51
{% tab title="fluent-bit.yaml" %}
69
52
70
53
``` yaml
@@ -75,43 +58,40 @@ pipeline:
75
58
port : 24224
76
59
buffer_chunk_size : 1M
77
60
buffer_max_size : 6M
61
+
78
62
outputs :
79
63
- name : stdout
80
64
match : ' *'
81
65
` ` `
82
66
83
67
{% 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" %}
96
69
97
- ` ` ` python
70
+ ` ` ` text
98
71
[INPUT]
99
72
Name forward
100
73
Listen 0.0.0.0
101
74
Port 24224
102
75
Buffer_Chunk_Size 1M
103
76
Buffer_Max_Size 6M
104
- Security.Users fluentbit changeme
105
- Shared_Key secret
106
- Self_Hostname flb.server.local
107
77
108
78
[OUTPUT]
109
79
Name stdout
110
80
Match *
111
81
```
112
82
113
83
{% 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.
114
93
94
+ {% tabs %}
115
95
{% tab title="fluent-bit-secure-forward.yaml" %}
116
96
117
97
``` yaml
@@ -125,26 +105,46 @@ pipeline:
125
105
security.users : fluentbit changeme
126
106
shared_key : secret
127
107
self_hostname : flb.server.local
108
+
128
109
outputs :
129
110
- name : stdout
130
111
match : ' *'
131
112
` ` `
132
113
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
+
133
133
{% endtab %}
134
134
{% endtabs %}
135
135
136
136
## Testing
137
137
138
138
After Fluent Bit is running, you can send some messages using the ` fluent-cat ` tool, provided by [ Fluentd] ( http://www.fluentd.org ) :
139
139
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
142
142
```
143
143
144
144
When you run the plugin with the following command:
145
145
146
- ` ` ` bash
147
- bin/ fluent-bit -i forward -o stdout
146
+ ``` shell
147
+ $ fluent-bit -i forward -o stdout
148
148
```
149
149
150
150
In [ Fluent Bit] ( http://fluentbit.io ) you should see the following output:
@@ -156,4 +156,4 @@ Copyright (C) Treasure Data
156
156
[2016/10/07 21:49:40] [ info] [engine] started
157
157
[2016/10/07 21:49:40] [ info] [in_fw] binding 0.0.0.0:24224
158
158
[0] my_tag: [1475898594, {"key 1"=>123456789, "key 2"=>"abcdefg"}]
159
- ` ` `
159
+ ```
0 commit comments