Skip to content

Commit 312b9a1

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

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
@@ -166,12 +166,14 @@ pipeline:
166166

167167
### Configuration File with Upstream
168168

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

171173
```text
172174
[INPUT]
173-
Name cpu
174-
Tag cpu
175+
Name dummy
176+
Dummy { "message" : "this is dummy data" }
175177
176178
[OUTPUT]
177179
Name es
@@ -204,6 +206,54 @@ configuration file can be similar to the following:
204206
port 9203
205207
```
206208

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

0 commit comments

Comments
 (0)