Skip to content

Commit d504ee7

Browse files
committed
pipeline: outputs: es: YAML format Upstream servers configuration
Signed-off-by: Marat Abrarov <abrarov@gmail.com>
1 parent 21681ad commit d504ee7

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
@@ -168,12 +168,14 @@ pipeline:
168168

169169
### Configuration File with Upstream
170170

171-
In your main configuration file append the following `Input` and `Output` sections:
171+
#### Classic mode Configuration File with Upstream
172+
173+
In your main classic mode configuration file append the following `Input` and `Output` sections:
172174

173175
```text
174176
[INPUT]
175-
Name cpu
176-
Tag cpu
177+
Name dummy
178+
Dummy { "message" : "this is dummy data" }
177179
178180
[OUTPUT]
179181
Name es
@@ -206,6 +208,54 @@ configuration file can be similar to the following:
206208
port 9203
207209
```
208210

211+
#### YAML Configuration File with Upstream
212+
213+
In your main YAML configuration file (fluent-bit.yaml) put the following `Input` and `Output` sections:
214+
215+
```yaml
216+
pipeline:
217+
inputs:
218+
- name: dummy
219+
dummy: "{ \"message\" : \"this is dummy data\" }"
220+
outputs:
221+
- name: es
222+
match: *
223+
index: fluent-bit
224+
type: my_type
225+
upstream: ./upstream.yaml
226+
```
227+
228+
Your Upstream Servers configuration file can use
229+
[classic mode](../../administration/configuring-fluent-bit/classic-mode/upstream-servers.md)
230+
(refer to "Classic mode Configuration File with Upstream" section at this page) or
231+
[YAML format](../../administration/configuring-fluent-bit/yaml/upstream-servers-section.md).
232+
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:
233+
234+
```yaml
235+
pipeline:
236+
inputs:
237+
- name: dummy
238+
dummy: "{ \"message\" : \"this is dummy data\" }"
239+
outputs:
240+
- name: es
241+
match: *
242+
index: fluent-bit
243+
type: my_type
244+
upstream: ./fluent-bit.yaml
245+
upstream_servers:
246+
- name: es-balancing
247+
nodes:
248+
- name: node-1
249+
host: localhost
250+
port: 9201
251+
- name: node-2
252+
host: localhost
253+
port: 9202
254+
- name: node-3
255+
host: localhost
256+
port: 9203
257+
```
258+
209259
## About Elasticsearch field names
210260
211261
Some input plugins can generate messages where the field names contains dots. For

0 commit comments

Comments
 (0)