Skip to content

Commit d318151

Browse files
committed
pipeline: outputs: es: YAML format Upstream servers configuration
Signed-off-by: Marat Abrarov <[email protected]>
1 parent 8448868 commit d318151

File tree

1 file changed

+53
-3
lines changed

1 file changed

+53
-3
lines changed

pipeline/outputs/elasticsearch.md

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,14 @@ In your main configuration file append the following `Input` and `Output` sectio
145145

146146
### Configuration File with Upstream
147147

148-
In your main configuration file append the following `Input` and `Output` sections:
148+
#### Classic mode Configuration File with Upstream
149+
150+
In your main classic mode configuration file append the following `Input` and `Output` sections:
149151

150152
```text
151153
[INPUT]
152-
Name cpu
153-
Tag cpu
154+
Name dummy
155+
Dummy { "message" : "this is dummy data" }
154156
155157
[OUTPUT]
156158
Name es
@@ -183,6 +185,54 @@ configuration file can be similar to the following:
183185
port 9203
184186
```
185187

188+
#### YAML Configuration File with Upstream
189+
190+
In your main YAML configuration file (fluent-bit.yaml) put the following `Input` and `Output` sections:
191+
192+
```yaml
193+
pipeline:
194+
inputs:
195+
- name: dummy
196+
dummy: "{ \"message\" : \"this is dummy data\" }"
197+
outputs:
198+
- name: es
199+
match: *
200+
index: fluent-bit
201+
type: my_type
202+
upstream: ./upstream.yaml
203+
```
204+
205+
Your Upstream Servers configuration file can use
206+
[classic mode](../../administration/configuring-fluent-bit/classic-mode/upstream-servers.md)
207+
(refer to "Classic mode Configuration File with Upstream" section at this page) or
208+
[YAML format](../../administration/configuring-fluent-bit/yaml/upstream-servers-section.md).
209+
If Upstream Servers configuration uses YAML format, then it can be placed in the same file as main configuration (e.g. in fluent-bit.yaml), like:
210+
211+
```yaml
212+
pipeline:
213+
inputs:
214+
- name: dummy
215+
dummy: "{ \"message\" : \"this is dummy data\" }"
216+
outputs:
217+
- name: es
218+
match: *
219+
index: fluent-bit
220+
type: my_type
221+
upstream: ./fluent-bit.yaml
222+
upstream_servers:
223+
- name: es-balancing
224+
nodes:
225+
- name: node-1
226+
host: localhost
227+
port: 9201
228+
- name: node-2
229+
host: localhost
230+
port: 9202
231+
- name: node-3
232+
host: localhost
233+
port: 9203
234+
```
235+
186236
## About Elasticsearch field names
187237
188238
Some input plugins can generate messages where the field names contains dots. For

0 commit comments

Comments
 (0)