Skip to content

Commit cf53d48

Browse files
authored
Merge pull request #1934 from fluent/lynettemiles/sc-136237/update-fluent-bit-docs-pipeline-outputs-elasticsearch
2 parents 62bbc93 + 9fef968 commit cf53d48

File tree

3 files changed

+33
-55
lines changed

3 files changed

+33
-55
lines changed

pipeline/outputs/elasticsearch.md

Lines changed: 31 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ description: Send logs to Elasticsearch (including Amazon OpenSearch Service)
44

55
# Elasticsearch
66

7-
The **es** output plugin lets you ingest your records into an
8-
[Elasticsearch](http://www.elastic.co) database. To use this plugin, you must have an
9-
operational Elasticsearch service running in your environment.
7+
The _Elasticsearch_ (`es`) output plugin lets you ingest your records into an [Elasticsearch](http://www.elastic.co) database. To use this plugin, you must have an operational Elasticsearch service running in your environment.
108

11-
## Configuration Parameters
9+
## Configuration parameters
10+
11+
This plugin has the following configuration parameters:
1212

1313
| Key | Description | Default |
1414
| :--- | :--- | :--- |
@@ -56,8 +56,7 @@ be compared to the `database` and `table` concepts.
5656

5757
### TLS / SSL
5858

59-
The Elasticsearch output plugin supports TLS/SSL.
60-
For more details about the properties available and general configuration, see [TLS/SSL](../../administration/transport-security.md).
59+
The Elasticsearch output plugin supports TLS/SSL. For more details about the properties available and general configuration, see [TLS/SSL](../../administration/transport-security.md).
6160

6261
### `write_operation`
6362

@@ -78,12 +77,11 @@ The `write_operation` can be any of:
7877

7978
## Get started
8079

81-
To insert records into an Elasticsearch service, you run the plugin from the
82-
command line or through the configuration file:
80+
To insert records into an Elasticsearch service, run the plugin from the command line or through the configuration file.
8381

84-
### Command Line
82+
### Command line
8583

86-
The **es** plugin can read the parameters from the command line in two ways:
84+
The `es` plugin can read the parameters from the command line in the following ways:
8785

8886
- Through the `-p` argument (property).
8987
- Setting them directly through the service URI.
@@ -108,9 +106,9 @@ fluent-bit -i cpu -t cpu -o es -p Host=192.168.2.3 -p Port=9200 \
108106
-p Index=my_index -p Type=my_type -o stdout -m '*'
109107
```
110108

111-
### Configuration File
109+
### Configuration file
112110

113-
In your main configuration file append the following `Input` and `Output` sections.
111+
In your main configuration file append the following sections.
114112

115113
{% tabs %}
116114
{% tab title="fluent-bit.yaml" %}
@@ -120,7 +118,7 @@ pipeline:
120118
inputs:
121119
- name: cpu
122120
tag: cpu
123-
121+
124122
outputs:
125123
- name: es
126124
match: '*'
@@ -151,11 +149,10 @@ pipeline:
151149
{% endtab %}
152150
{% endtabs %}
153151

154-
## About Elasticsearch field names
152+
## Elasticsearch field names
155153

156-
Some input plugins can generate messages where the field names contains dots. For
157-
Elasticsearch 2.0, this isn't allowed. The current **es** plugin replaces
158-
them with an underscore:
154+
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
155+
a dot with an underscore (`_`):
159156

160157
```text
161158
{"cpu0.p_cpu"=>17.000000}
@@ -173,9 +170,7 @@ Connect to Amazon OpenSearch or Elastic Cloud with the ElasticSearch plugin.
173170

174171
### Amazon OpenSearch Service
175172

176-
The Amazon OpenSearch Service adds an extra security layer where HTTP requests must
177-
be signed with AWS Sigv4. Fluent Bit v1.5 introduced full support for Amazon
178-
OpenSearch Service with IAM Authentication.
173+
The Amazon OpenSearch Service adds an extra security layer where HTTP requests must be signed with AWS Sigv4. Fluent Bit v1.5 introduced full support for Amazon OpenSearch Service with IAM Authentication.
179174

180175
See [details](https://github.com/fluent/fluent-bit-docs/tree/43c4fe134611da471e706b0edb2f9acd7cdfdbc3/administration/aws-credentials.md) on how AWS credentials are fetched.
181176

@@ -186,7 +181,7 @@ Example configuration:
186181

187182
```yaml
188183
pipeline:
189-
184+
190185
outputs:
191186
- name: es
192187
match: '*'
@@ -222,21 +217,15 @@ Be aware that the `Port` is set to `443`, `tls` is enabled, and `AWS_Region` is
222217

223218
### Use Fluent Bit with Elastic Cloud
224219

225-
Fluent Bit supports connecting to
226-
[Elastic Cloud](https://www.elastic.co/guide/en/cloud/current/ec-getting-started.html)
227-
by providing the `cloud_id` and the `cloud_auth` settings. `cloud_auth` uses the
228-
`elastic` user and password provided when the cluster was created. For details refer
229-
to the
230-
[Cloud ID usage page](https://www.elastic.co/guide/en/cloud/current/ec-cloud-id.html).
231-
220+
Fluent Bit supports connecting to [Elastic Cloud](https://www.elastic.co/guide/en/cloud/current/ec-getting-started.html) by providing the `cloud_id` and the `cloud_auth` settings. `cloud_auth` uses the `elastic` user and password provided when the cluster was created. For details refer to the [Cloud ID usage page](https://www.elastic.co/guide/en/cloud/current/ec-cloud-id.html).
232221
Example configuration:
233222

234223
{% tabs %}
235224
{% tab title="fluent-bit.yaml" %}
236225

237226
```yaml
238227
pipeline:
239-
228+
240229
outputs:
241230
- name: es
242231
include_tag_key: true
@@ -281,9 +270,7 @@ Use the following information to help resolve errors using the ElasticSearch plu
281270

282271
### Using multiple types in a single index
283272

284-
Elasticsearch 6.0 can't create multiple types in a single index. An error message
285-
like the following indicates you need to update your configuration to use a single
286-
type on each index.
273+
Elasticsearch 6.0 can't create multiple types in a single index. An error message like the following indicates you need to update your configuration to use a single type on each index.
287274

288275
```text
289276
Rejecting mapping update to [products] as the final mapping would have more than 1 type:
@@ -296,7 +283,7 @@ This means that you can't set up your configuration like the following:.
296283

297284
```yaml
298285
pipeline:
299-
286+
300287
outputs:
301288
- name: es
302289
match: 'foo.*'
@@ -333,23 +320,18 @@ For details, read [the official blog post on that issue](https://www.elastic.co/
333320

334321
### Mapping type names can't start with underscores (`_`)
335322

336-
Fluent Bit v1.5 changed the default mapping type from `flb_type` to `_doc`, matching
337-
the recommendation from Elasticsearch for version 6.2 and greater
338-
([see commit with
339-
rationale](https://github.com/fluent/fluent-bit/commit/04ed3d8104ca8a2f491453777ae6e38e5377817e#diff-c9ae115d3acaceac5efb949edbb21196)).
323+
Fluent Bit v1.5 changed the default mapping type from `flb_type` to `_doc`, matching the recommendation from Elasticsearch for version 6.2 and greater ([see commit with rationale](https://github.com/fluent/fluent-bit/commit/04ed3d8104ca8a2f491453777ae6e38e5377817e#diff-c9ae115d3acaceac5efb949edbb21196)).
340324

341-
This doesn't work in Elasticsearch versions 5.6 through 6.1
342-
([discussion and fix](https://discuss.elastic.co/t/cant-use-doc-as-type-despite-it-being-declared-the-preferred-method/113837/9)).
325+
This doesn't work in Elasticsearch versions 5.6 through 6.1 ([discussion and fix](https://discuss.elastic.co/t/cant-use-doc-as-type-despite-it-being-declared-the-preferred-method/113837/9)).
343326

344-
Ensure you set an explicit map such as `doc` or `flb_type` in the configuration,
345-
as seen on the last line:
327+
Ensure you set an explicit map such as `doc` or `flb_type` in the configuration, as seen on the last line:
346328

347329
{% tabs %}
348330
{% tab title="fluent-bit.yaml" %}
349331

350332
```yaml
351333
pipeline:
352-
334+
353335
outputs:
354336
- name: es
355337
match: '*'
@@ -383,24 +365,20 @@ pipeline:
383365

384366
### Validation failures
385367

386-
In Fluent Bit v1.8.2 and greater, Fluent Bit started using `create` method (instead
387-
of `index`) for data submission. This makes Fluent Bit compatible with `Datastream`,
388-
introduced in Elasticsearch 7.9. You might see errors like:
368+
In Fluent Bit v1.8.2 and greater, Fluent Bit started using `create` method (instead of `index`) for data submission. This makes Fluent Bit compatible with `Datastream`, introduced in Elasticsearch 7.9. You might see errors like:
389369

390370
```text
391371
Validation Failed: 1: an id must be provided if version type or value are set
392372
```
393373

394-
If you see `action_request_validation_exception` errors on your pipeline with
395-
Fluent Bit versions greater than v1.8.2, correct them by turning on `Generate_ID`
396-
as follows:
374+
If you see `action_request_validation_exception` errors on your pipeline with Fluent Bit versions greater than v1.8.2, correct them by turning on `Generate_ID` as follows:
397375

398376
{% tabs %}
399377
{% tab title="fluent-bit.yaml" %}
400378

401379
```yaml
402380
pipeline:
403-
381+
404382
outputs:
405383
- name: es
406384
match: '*'
@@ -424,21 +402,20 @@ pipeline:
424402

425403
### `Logstash_Prefix_Key`
426404

427-
The following snippet demonstrates using the namespace name as extracted by the
428-
`kubernetes` filter as `logstash` prefix:
405+
The following snippet demonstrates using the namespace name as extracted by the `kubernetes` filter as `logstash` prefix:
429406

430407
{% tabs %}
431408
{% tab title="fluent-bit.yaml" %}
432409

433410
```yaml
434411
pipeline:
435-
412+
436413
outputs:
437414
- name: es
438415
match: '*'
439416
# ...
440417
logstash_prefix: logstash
441-
logstash_prefix_key: $kubernetes['namespace_name']
418+
logstash_prefix_key: $kubernetes['namespace_name']
442419
# ...
443420
```
444421

@@ -458,5 +435,4 @@ pipeline:
458435
{% endtab %}
459436
{% endtabs %}
460437

461-
For records that don't have the field `kubernetes.namespace_name`, the default prefix
462-
`logstash` will be used.
438+
For records that don't have the field `kubernetes.namespace_name`, the default prefix `logstash` will be used.

vale-styles/FluentBit/Headings.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ exceptions:
1313
- Amazon Kinesis Data Firehose
1414
- Amazon Kinesis Firehose
1515
- Amazon Kinesis Streams
16+
- Amazon OpenSearch Service
1617
- API
1718
- APIs
1819
- Azure

vale-styles/FluentBit/Spelling-exceptions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ Queryable
148148
Raspbian
149149
rdkafka
150150
Redpanda
151+
reindexed
151152
rollup
152153
Rollup
153154
rollups

0 commit comments

Comments
 (0)