Skip to content

Commit 27c5927

Browse files
mergify[bot]faec
andauthored
Document the Elasticsearch output's 'preset' field (#37315) (#37603)
(cherry picked from commit 0c73852) Co-authored-by: Fae Charlton <[email protected]>
1 parent 57f0435 commit 27c5927

File tree

2 files changed

+77
-1
lines changed

2 files changed

+77
-1
lines changed

libbeat/docs/queueconfig.asciidoc

+3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ queue.mem:
6161
You can specify the following options in the `queue.mem` section of the +{beatname_lc}.yml+ config file:
6262

6363
[float]
64+
[[queue-mem-events-option]]
6465
===== `events`
6566

6667
Number of events the queue can store. This value should be evenly divisible by `flush.min_events` to
@@ -69,6 +70,7 @@ avoid sending partial batches to the output.
6970
The default value is 3200 events.
7071

7172
[float]
73+
[[queue-mem-flush-min-events-option]]
7274
===== `flush.min_events`
7375

7476
Minimum number of events required for publishing. If this value is set to 0 or 1, events are
@@ -80,6 +82,7 @@ sent by the output.
8082
The default value is 1600.
8183

8284
[float]
85+
[[queue-mem-flush-timeout-option]]
8386
===== `flush.timeout`
8487

8588
Maximum wait time for `flush.min_events` to be fulfilled. If set to 0s, events are available to the

libbeat/outputs/elasticsearch/docs/elasticsearch.asciidoc

+74-1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ output.elasticsearch:
9898
In the previous example, the Elasticsearch nodes are available at `https://10.45.3.2:9220/elasticsearch` and
9999
`https://10.45.3.1:9230/elasticsearch`.
100100

101+
[[compression-level-option]]
101102
===== `compression_level`
102103

103104
The gzip compression level. Setting this value to `0` disables compression.
@@ -114,6 +115,7 @@ Configure escaping of HTML in strings. Set to `true` to enable escaping.
114115
The default value is `false`.
115116

116117

118+
[[worker-option]]
117119
===== `worker`
118120

119121
The number of workers per configured host publishing events to Elasticsearch. This
@@ -659,6 +661,7 @@ The default is 3.
659661
endif::[]
660662

661663

664+
[[bulk-max-size-option]]
662665
===== `bulk_max_size`
663666

664667
The maximum number of events to bulk in a single Elasticsearch bulk API index request. The default is 1600.
@@ -691,6 +694,7 @@ default is `1s`.
691694
The maximum number of seconds to wait before attempting to connect to
692695
Elasticsearch after a network error. The default is `60s`.
693696

697+
[[idle-connection-timeout-option]]
694698
===== `idle_connection_timeout`
695699

696700
The maximum amount of time an idle connection will remain idle before closing itself.
@@ -701,7 +705,7 @@ The default is 3s.
701705

702706
The http request timeout in seconds for the Elasticsearch request. The default is 90.
703707

704-
==== `allow_older_versions`
708+
===== `allow_older_versions`
705709

706710
By default, {beatname_uc} expects the Elasticsearch instance to be on the same or newer version to provide
707711
optimal experience. We suggest you connect to the same version to make sure all features {beatname_uc} is using are
@@ -759,6 +763,75 @@ output.elasticsearch:
759763
index: "my-dead-letter-index"
760764
------------------------------------------------------------------------------
761765

766+
===== `preset`
767+
768+
The performance preset to apply to the output configuration.
769+
770+
["source","yaml"]
771+
------------------------------------------------------------------------------
772+
output.elasticsearch:
773+
hosts: ["http://localhost:9200"]
774+
preset: balanced
775+
------------------------------------------------------------------------------
776+
777+
Performance presets apply a set of configuration overrides based on a desired performance goal. If set, a performance preset will override other configuration flags to match the recommended settings for that preset. Valid options are:
778+
* `balanced`: good starting point for general efficiency
779+
* `throughput`: good for high data volumes, may increase cpu and memory requirements
780+
* `scale`: reduces ambient resource use in large low-throughput deployments
781+
* `latency`: minimize the time for fresh data to become visible in Elasticsearch
782+
* `custom`: apply user configuration directly with no overrides
783+
784+
The default if unspecified is `custom`.
785+
786+
Presets represent current recommendations based on the intended goal; their effect may change between versions to better suit those goals. Currently the presets have the following effects:
787+
788+
[cols="2,1,1,1,1"]
789+
|===
790+
|preset |balanced |throughput |scale |latency
791+
792+
|<<bulk-max-size-option,`bulk_max_size`>>
793+
|1600
794+
|1600
795+
|1600
796+
|50
797+
798+
|<<worker-option,`worker`>>
799+
|1
800+
|4
801+
|1
802+
|1
803+
804+
|<<queue-mem-events-option,`queue.mem.events`>>
805+
|3200
806+
|12800
807+
|3200
808+
|4100
809+
810+
|<<queue-mem-flush-min-events-option,`queue.mem.flush.min_events`>>
811+
|1600
812+
|1600
813+
|1600
814+
|2050
815+
816+
|<<queue-mem-flush-timeout-option,`queue.mem.flush.timeout`>>
817+
|`10s`
818+
|`5s`
819+
|`20s`
820+
|`1s`
821+
822+
|<<compression-level-option,`compression_level`>>
823+
|1
824+
|1
825+
|1
826+
|1
827+
828+
|<<idle-connection-timeout-option,`idle_connection_timeout`>>
829+
|`3s`
830+
|`15s`
831+
|`1s`
832+
|`60s`
833+
|===
834+
762835
[[es-apis]]
763836
==== Elasticsearch APIs
764837
{beatname_uc} will use the `_bulk` API from {es}, the events are sent

0 commit comments

Comments
 (0)