-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathelasticsearch-output.html
1212 lines (1178 loc) · 53.8 KB
/
elasticsearch-output.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>Configure the Elasticsearch output | Fleet and Elastic Agent Guide [8.18] | Elastic</title>
<meta class="elastic" name="content" content="Configure the Elasticsearch output | Fleet and Elastic Agent Guide [8.18]">
<link rel="home" href="index.html" title="Fleet and Elastic Agent Guide [8.18]"/>
<link rel="up" href="elastic-agent-output-configuration.html" title="Configure outputs for standalone Elastic Agents"/>
<link rel="prev" href="elastic-agent-output-configuration.html" title="Configure outputs for standalone Elastic Agents"/>
<link rel="next" href="kafka-output.html" title="Kafka output"/>
<meta class="elastic" name="product_version" content="8.18"/>
<meta class="elastic" name="product_name" content="Fleet and Elastic Agent"/>
<meta class="elastic" name="website_area" content="documentation"/>
<meta name="DC.type" content="Learn/Docs/Fleet/Guide/Elastic Agent/8.18"/>
<meta name="DC.subject" content="Fleet and Elastic Agent"/>
<meta name="DC.identifier" content="8.18"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdn.optimizely.com/js/18132920325.js"></script>
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/manifest.json">
<meta name="apple-mobile-web-app-title" content="Elastic">
<meta name="application-name" content="Elastic">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
<meta name="theme-color" content="#ffffff">
<meta name="naver-site-verification" content="936882c1853b701b3cef3721758d80535413dbfd" />
<meta name="yandex-verification" content="d8a47e95d0972434" />
<meta name="localized" content="true" />
<meta name="st:robots" content="follow,index" />
<meta property="og:image" content="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt280217a63b82a734/6202d3378b1f312528798412/elastic-logo.svg" />
<meta property="og:image:width" content="500" />
<meta property="og:image:height" content="172" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon-precomposed" sizes="64x64" href="/favicon_64x64_16bit.png">
<link rel="apple-touch-icon-precomposed" sizes="32x32" href="/favicon_32x32.png">
<link rel="apple-touch-icon-precomposed" sizes="16x16" href="/favicon_16x16.png">
<!-- Give IE8 a fighting chance -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/guide/static/styles-v1.css" />
</head>
<!--© 2015-2025 Elasticsearch B.V. -->
<!-- All Elastic documentation is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. -->
<!-- http://creativecommons.org/licenses/by-nc-nd/4.0/ -->
<body>
<!-- Google Tag Manager -->
<script>dataLayer = [];</script><noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-58RLH5" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-58RLH5');</script>
<!-- End Google Tag Manager -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-12395217-16"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-12395217-16');
</script>
<!-- Google Tag Manager for GA4 -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-KNJMG2M');</script>
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KNJMG2M" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager for GA4-->
<div id='elastic-nav' style="display:none;"></div>
<script src='https://www.elastic.co/elastic-nav.js'></script>
<div class="main-container">
<section id="content" >
<div class="content-wrapper">
<section id="guide" lang="en">
<div class="container-fluid">
<div class="row pb-3">
<div class="col-12 order-2 col-md-4 order-md-1 col-lg-3 h-almost-full-md sticky-top-md" id="left_col">
<!-- The TOC is appended here -->
</div>
<div class="col-12 order-1 col-md-8 order-md-2 col-lg-7 order-lg-2 guide-section" id="middle_col">
<!-- start body -->
<div class="navheader">
<span class="prev">
<a href="elastic-agent-output-configuration.html">« Configure outputs for standalone Elastic Agents</a>
</span>
<span class="next">
<a href="kafka-output.html">Kafka output »</a>
</span>
</div>
<div class="book" lang="en">
<div class="titlepage">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="/guide/">Elastic Docs</a></span>
<span class="chevron-right">›</span><span class="breadcrumb-link"><a href="index.html">Fleet and Elastic Agent Guide [8.18]</a></span>
<span class="chevron-right">›</span><span class="breadcrumb-link"><a href="elastic-agent-configuration.html">Configure standalone Elastic Agents</a></span>
<span class="chevron-right">›</span><span class="breadcrumb-link"><a href="elastic-agent-output-configuration.html">Configure outputs for standalone Elastic Agents</a></span>
</div>
<div>
<div><h1 class="title"><a id="id-1"></a>Configure the Elasticsearch output</h1><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/outputs/output-elasticsearch.asciidoc">edit</a></div>
</div>
<!--EXTRA-->
</div>
<div id="content">
<div id="url-to-v3" class="version-warning">
A newer version is available. Check out the <a href="https://www.elastic.co/docs/reference/fleet/elasticsearch-output">latest documentation</a>.
</div>
<div class="section">
<div class="titlepage"><div><div>
<div class="position-relative"><h3 class="title"><a id="elasticsearch-output"></a>Configure the Elasticsearch output</h3><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/outputs/output-elasticsearch.asciidoc">edit</a></div>
</div></div></div>
<p>The Elasticsearch output sends events directly to Elasticsearch by using the Elasticsearch HTTP API.</p>
<p><span class="strong strong"><strong>Compatibility:</strong></span> This output works with all compatible versions of Elasticsearch. See the
<a href="/support/matrix#matrix_compatibility" class="ulink" target="_top">Elastic Support
Matrix</a>.</p>
<p>This example configures an Elasticsearch output called <code class="literal">default</code> in the
<code class="literal">elastic-agent.yml</code> file:</p>
<div class="pre_wrapper lang-yaml">
<div class="console_code_copy" title="Copy to clipboard"></div>
<pre class="programlisting prettyprint lang-yaml">outputs:
default:
type: elasticsearch
hosts: [127.0.0.1:9200]
username: elastic
password: changeme</pre>
</div>
<p>This example is similar to the previous one, except that it uses the recommended
<a class="xref" href="elasticsearch-output.html#output-elasticsearch-apikey-authentication-settings" title="Token-based (API key) authentication">token-based (API key) authentication</a>:</p>
<div class="pre_wrapper lang-yaml">
<div class="console_code_copy" title="Copy to clipboard"></div>
<pre class="programlisting prettyprint lang-yaml">outputs:
default:
type: elasticsearch
hosts: [127.0.0.1:9200]
api_key: "my_api_key"</pre>
</div>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>Token-based authentication is required in an
<a href="https://docs.elastic.co/serverless" class="ulink" target="_top">Elastic Cloud Serverless</a> environment.</p>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div>
<div class="position-relative"><h4 class="title"><a id="_elasticsearch_output_configuration_settings"></a>Elasticsearch output configuration settings</h4><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/outputs/output-elasticsearch.asciidoc">edit</a></div>
</div></div></div>
<p>The <code class="literal">elasticsearch</code> output type supports the following settings, grouped by
category. Many of these settings have sensible defaults that allow you to run
Elastic Agent with minimal configuration.</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<a class="xref" href="elasticsearch-output.html#output-elasticsearch-commonly-used-settings" title="Commonly used settings">Commonly used settings</a>
</li>
<li class="listitem">
<a class="xref" href="elasticsearch-output.html#output-elasticsearch-authentication-settings" title="Authentication settings">Authentication settings</a>
</li>
<li class="listitem">
<a class="xref" href="elasticsearch-output.html#output-elasticsearch-compatibility-setting" title="Compatibility setting">Compatibility setting</a>
</li>
<li class="listitem">
<a class="xref" href="elasticsearch-output.html#output-elasticsearch-data-parsing-settings" title="Data parsing, filtering, and manipulation settings">Data parsing, filtering, and manipulation settings</a>
</li>
<li class="listitem">
<a class="xref" href="elasticsearch-output.html#output-elasticsearch-http-settings" title="HTTP settings">HTTP settings</a>
</li>
<li class="listitem">
<a class="xref" href="elasticsearch-output.html#output-elasticsearch-memory-queue-settings" title="Memory queue settings">Memory queue settings</a>
</li>
<li class="listitem">
<a class="xref" href="elasticsearch-output.html#output-elasticsearch-performance-tuning-settings" title="Performance tuning settings">Performance tuning settings</a>
</li>
</ul>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div>
<div class="position-relative"><h4 class="title"><a id="output-elasticsearch-commonly-used-settings"></a>Commonly used settings</h4><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/outputs/output-elasticsearch.asciidoc">edit</a></div>
</div></div></div>
<div class="informaltable">
<table border="1" cellpadding="4px">
<colgroup>
<col class="col_1"/>
<col class="col_2"/>
</colgroup>
<thead>
<tr>
<th align="left" valign="top">
Setting
</th>
<th align="left" valign="top">
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-enabled-setting"></a><code class="literal">enabled</code></p>
</td>
<td align="left" valign="top">
<p>(boolean) Enables or disables the output. If set to <code class="literal">false</code>, the output is
disabled.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">true</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-hosts-setting"></a><code class="literal">hosts</code></p>
</td>
<td align="left" valign="top">
<p>(list) The list of Elasticsearch nodes to connect to. The events are distributed to
these nodes in round robin order. If one node becomes unreachable, the event is
automatically sent to another node. Each Elasticsearch node can be defined as a <code class="literal">URL</code> or
<code class="literal">IP:PORT</code>. For example: <code class="literal">http://192.15.3.2</code>, <code class="literal">https://es.found.io:9230</code> or
<code class="literal">192.24.3.2:9300</code>. If no port is specified, <code class="literal">9200</code> is used.</p>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>When a node is defined as an <code class="literal">IP:PORT</code>, the <em>scheme</em> and <em>path</em> are taken
from the <code class="literal">protocol</code> and <code class="literal">path</code> settings.</p>
</div>
</div>
<div class="pre_wrapper lang-yaml">
<div class="console_code_copy" title="Copy to clipboard"></div>
<pre class="programlisting prettyprint lang-yaml">outputs:
default:
type: elasticsearch
hosts: ["10.45.3.2:9220", "10.45.3.1:9230"] <a id="CO20-1"></a><i class="conum" data-value="1"></i>
protocol: https
path: /elasticsearch</pre>
</div>
<div class="calloutlist">
<table border="0" summary="Callout list">
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO20-1"><i class="conum" data-value="1"></i></a></p>
</td>
<td align="left" valign="top">
<p>In this example, the Elasticsearch nodes are available at
<code class="literal">https://10.45.3.2:9220/elasticsearch</code> and
<code class="literal">https://10.45.3.1:9230/elasticsearch</code>.</p>
</td>
</tr>
</table>
</div>
<p>Note that Elasticsearch Nodes in the <a href="https://docs.elastic.co/serverless" class="ulink" target="_top">Elastic Cloud Serverless</a> environment are exposed on port 443.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-protocol-setting"></a><code class="literal">protocol</code></p>
</td>
<td align="left" valign="top">
<p>(string) The name of the protocol Elasticsearch is reachable on. The options are:
<code class="literal">http</code> or <code class="literal">https</code>. The default is <code class="literal">http</code>. However, if you specify a URL for
<code class="literal">hosts</code>, the value of <code class="literal">protocol</code> is overridden by whatever scheme you specify in
the URL.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-proxy_disable-setting"></a><code class="literal">proxy_disable</code></p>
</td>
<td align="left" valign="top">
<p>(boolean) If set to <code class="literal">true</code>, all proxy settings, including <code class="literal">HTTP_PROXY</code> and
<code class="literal">HTTPS_PROXY</code> variables, are ignored.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">false</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-proxy_headers-setting"></a><code class="literal">proxy_headers</code></p>
</td>
<td align="left" valign="top">
<p>(string) Additional headers to send to proxies during CONNECT requests.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-proxy_url-setting"></a><code class="literal">proxy_url</code></p>
</td>
<td align="left" valign="top">
<p>(string) The URL of the proxy to use when connecting to the Elasticsearch servers. The
value may be either a complete URL or a <code class="literal">host[:port]</code>, in which case the <code class="literal">http</code>
scheme is assumed. If a value is not specified through the configuration file
then proxy environment variables are used. See the
<a href="https://golang.org/pkg/net/http/#ProxyFromEnvironment" class="ulink" target="_top">Go documentation</a>
for more information about the environment variables.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div>
<div class="position-relative"><h4 class="title"><a id="output-elasticsearch-authentication-settings"></a>Authentication settings</h4><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/outputs/output-elasticsearch.asciidoc">edit</a></div>
</div></div></div>
<p>When sending data to a secured cluster through the <code class="literal">elasticsearch</code>
output, Elastic Agent can use any of the following authentication methods:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<a class="xref" href="elasticsearch-output.html#output-elasticsearch-basic-authentication-settings" title="Basic authentication credentials">Basic authentication credentials</a>
</li>
<li class="listitem">
<a class="xref" href="elasticsearch-output.html#output-elasticsearch-apikey-authentication-settings" title="Token-based (API key) authentication">Token-based (API key) authentication</a>
</li>
<li class="listitem">
<a class="xref" href="elasticsearch-output.html#output-elasticsearch-pki-certs-authentication-settings" title="Public Key Infrastructure (PKI) certificates">Public Key Infrastructure (PKI) certificates</a>
</li>
<li class="listitem">
<a class="xref" href="elasticsearch-output.html#output-elasticsearch-kerberos-authentication-settings" title="Kerberos">Kerberos</a>
</li>
</ul>
</div>
<div class="section">
<div class="titlepage"><div><div>
<div class="position-relative"><h5 class="title"><a id="output-elasticsearch-basic-authentication-settings"></a>Basic authentication credentials</h5><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/outputs/output-elasticsearch.asciidoc">edit</a></div>
</div></div></div>
<div class="pre_wrapper lang-yaml">
<div class="console_code_copy" title="Copy to clipboard"></div>
<pre class="programlisting prettyprint lang-yaml">outputs:
default:
type: elasticsearch
hosts: ["https://myEShost:9200"]
username: "your-username"
password: "your-password"</pre>
</div>
<div class="informaltable">
<table border="1" cellpadding="4px">
<colgroup>
<col class="col_1"/>
<col class="col_2"/>
</colgroup>
<thead>
<tr>
<th align="left" valign="top">
Setting
</th>
<th align="left" valign="top">
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-password-setting"></a><code class="literal">password</code></p>
</td>
<td align="left" valign="top">
<p>(string) The basic authentication password for connecting to Elasticsearch.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-username-setting"></a><code class="literal">username</code></p>
</td>
<td align="left" valign="top">
<p>(string) The basic authentication username for connecting to Elasticsearch.</p>
<p>This user needs the privileges required to publish events to Elasticsearch.</p>
<p>Note that in an <a href="https://docs.elastic.co/serverless" class="ulink" target="_top">Elastic Cloud Serverless</a> environment you need to use <a class="xref" href="elasticsearch-output.html#output-elasticsearch-apikey-authentication-settings" title="Token-based (API key) authentication">token-based (API key) authentication</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div>
<div class="position-relative"><h5 class="title"><a id="output-elasticsearch-apikey-authentication-settings"></a>Token-based (API key) authentication</h5><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/outputs/output-elasticsearch.asciidoc">edit</a></div>
</div></div></div>
<div class="pre_wrapper lang-yaml">
<div class="console_code_copy" title="Copy to clipboard"></div>
<pre class="programlisting prettyprint lang-yaml">outputs:
default:
type: elasticsearch
hosts: ["https://myEShost:9200"]
api_key: "KnR6yE41RrSowb0kQ0HWoA"</pre>
</div>
<div class="informaltable">
<table border="1" cellpadding="4px">
<colgroup>
<col class="col_1"/>
<col class="col_2"/>
</colgroup>
<thead>
<tr>
<th align="left" valign="top">
Setting
</th>
<th align="left" valign="top">
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-api_key-setting"></a><code class="literal">api_key</code></p>
</td>
<td align="left" valign="top">
<p>(string) Instead of using a username and password, you can use <a href="/guide/en/kibana/8.18/api-keys.html" class="ulink" target="_top">API keys</a> to
secure communication with Elasticsearch. The value must be the ID of the API key and the
API key joined by a colon: <code class="literal">id:api_key</code>. Token-based authentication is required in an <a href="https://docs.elastic.co/serverless" class="ulink" target="_top">Elastic Cloud Serverless</a> environment.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div>
<div class="position-relative"><h5 class="title"><a id="output-elasticsearch-pki-certs-authentication-settings"></a>Public Key Infrastructure (PKI) certificates</h5><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/outputs/output-elasticsearch.asciidoc">edit</a></div>
</div></div></div>
<div class="pre_wrapper lang-yaml">
<div class="console_code_copy" title="Copy to clipboard"></div>
<pre class="programlisting prettyprint lang-yaml">outputs:
default:
type: elasticsearch
hosts: ["https://myEShost:9200"]
ssl.certificate: "/etc/pki/client/cert.pem"
ssl.key: "/etc/pki/client/cert.key"</pre>
</div>
<p>For a list of available settings, refer to <a class="xref" href="elastic-agent-ssl-configuration.html" title="Configure SSL/TLS for standalone Elastic Agents">SSL/TLS</a>,
specifically the settings under <a class="xref" href="elastic-agent-ssl-configuration.html#common-ssl-options" title="Common configuration options">Table 7, “Common configuration options”</a> and
<a class="xref" href="elastic-agent-ssl-configuration.html#client-ssl-options" title="Client configuration options">Table 8, “Client configuration options”</a>.</p>
</div>
<div class="section">
<div class="titlepage"><div><div>
<div class="position-relative"><h5 class="title"><a id="output-elasticsearch-kerberos-authentication-settings"></a>Kerberos</h5><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/outputs/output-elasticsearch.asciidoc">edit</a></div>
</div></div></div>
<p>The following encryption types are supported:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
aes128-cts-hmac-sha1-96
</li>
<li class="listitem">
aes128-cts-hmac-sha256-128
</li>
<li class="listitem">
aes256-cts-hmac-sha1-96
</li>
<li class="listitem">
aes256-cts-hmac-sha384-192
</li>
<li class="listitem">
des3-cbc-sha1-kd
</li>
<li class="listitem">
rc4-hmac
</li>
</ul>
</div>
<p>Example output config with Kerberos password-based authentication:</p>
<div class="pre_wrapper lang-yaml">
<div class="console_code_copy" title="Copy to clipboard"></div>
<pre class="programlisting prettyprint lang-yaml">outputs:
default:
type: elasticsearch
hosts: ["http://my-elasticsearch.elastic.co:9200"]
kerberos.auth_type: password
kerberos.username: "elastic"
kerberos.password: "changeme"
kerberos.config_path: "/etc/krb5.conf"
kerberos.realm: "ELASTIC.CO"</pre>
</div>
<p>The service principal name for the Elasticsearch instance is constructed from these
options. Based on this configuration, the name would be:</p>
<p><code class="literal">HTTP/[email protected]</code></p>
<div class="informaltable">
<table border="1" cellpadding="4px">
<colgroup>
<col class="col_1"/>
<col class="col_2"/>
</colgroup>
<thead>
<tr>
<th align="left" valign="top">
Setting
</th>
<th align="left" valign="top">
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-kerberos.auth_type-setting"></a><code class="literal">kerberos.auth_type</code></p>
</td>
<td align="left" valign="top">
<p>(string) The type of authentication to use with Kerberos KDC:</p>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">password</code>
</span>
</dt>
<dd>
When specified, also set <code class="literal">kerberos.username</code> and <code class="literal">kerberos.password</code>.
</dd>
<dt>
<span class="term">
<code class="literal">keytab</code>
</span>
</dt>
<dd>
When specified, also set <code class="literal">kerberos.username</code> and <code class="literal">kerberos.keytab</code>. The keytab
must contain the keys of the selected principal, or authentication fails.
</dd>
</dl>
</div>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">password</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-kerberos.config_path"></a><code class="literal">kerberos.config_path</code></p>
</td>
<td align="left" valign="top">
<p>(string) Path to the <code class="literal">krb5.conf</code>. Elastic Agent uses this setting to find the
Kerberos KDC to retrieve a ticket.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-kerberos.enabled-setting"></a><code class="literal">kerberos.enabled</code></p>
</td>
<td align="left" valign="top">
<p>(boolean) Enables or disables the Kerberos configuration.</p>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>Kerberos settings are disabled if either <code class="literal">enabled</code> is set to <code class="literal">false</code> or the
<code class="literal">kerberos</code> section is missing.</p>
</div>
</div>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-kerberos.enable_krb5_fast"></a><code class="literal">kerberos.enable_krb5_fast</code></p>
</td>
<td align="left" valign="top">
<p>(boolean) If <code class="literal">true</code>, enables Kerberos FAST authentication. This may conflict
with some Active Directory installations.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">false</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-kerberos.keytab"></a><code class="literal">kerberos.keytab</code></p>
</td>
<td align="left" valign="top">
<p>(string) If <code class="literal">kerberos.auth_type</code> is <code class="literal">keytab</code>, provide the path to the keytab
of the selected principal.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-kerberos.password"></a><code class="literal">kerberos.password</code></p>
</td>
<td align="left" valign="top">
<p>(string) If <code class="literal">kerberos.auth_type</code> is <code class="literal">password</code>, provide a password for the
selected principal.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-kerberos.realm"></a><code class="literal">kerberos.realm</code></p>
</td>
<td align="left" valign="top">
<p>(string) Name of the realm where the output resides.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-kerberos.username"></a><code class="literal">kerberos.username</code></p>
</td>
<td align="left" valign="top">
<p>(string) Name of the principal used to connect to the output.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div>
<div class="position-relative"><h5 class="title"><a id="output-elasticsearch-compatibility-setting"></a>Compatibility setting</h5><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/outputs/output-elasticsearch.asciidoc">edit</a></div>
</div></div></div>
<div class="informaltable">
<table border="1" cellpadding="4px">
<colgroup>
<col class="col_1"/>
<col class="col_2"/>
</colgroup>
<thead>
<tr>
<th align="left" valign="top">
Setting
</th>
<th align="left" valign="top">
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-allow_older_versions-setting"></a><code class="literal">allow_older_versions</code></p>
</td>
<td align="left" valign="top">
<p>Allow Elastic Agent to connect and send output to an Elasticsearch instance that is running an earlier version than the agent version.</p>
<p>Note that this setting does not affect Elastic Agent’s ability to connect to Fleet Server.
Fleet Server will not accept a connection from an agent at a later major or minor version.
It will accept a connection from an agent at a later patch version.
For example, an Elastic Agent at version 8.14.3 can connect to a Fleet Server on version 8.14.0, but an agent at version 8.15.0 or later is not able to connect.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">true</code></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div>
<div class="position-relative"><h5 class="title"><a id="output-elasticsearch-data-parsing-settings"></a>Data parsing, filtering, and manipulation settings</h5><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/outputs/output-elasticsearch.asciidoc">edit</a></div>
</div></div></div>
<p>Settings used to parse, filter, and transform data.</p>
<div class="informaltable">
<table border="1" cellpadding="4px">
<colgroup>
<col class="col_1"/>
<col class="col_2"/>
</colgroup>
<thead>
<tr>
<th align="left" valign="top">
Setting
</th>
<th align="left" valign="top">
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-escape_html-setting"></a><code class="literal">escape_html</code></p>
</td>
<td align="left" valign="top">
<p>(boolean) Configures escaping of HTML in strings. Set to <code class="literal">true</code> to enable
escaping.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">false</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-pipeline-setting"></a><code class="literal">pipeline</code></p>
</td>
<td align="left" valign="top">
<p>(string) A format string value that specifies the
<a href="/guide/en/elasticsearch/reference/8.18/ingest.html" class="ulink" target="_top">ingest pipeline</a> to write events to.</p>
<div class="pre_wrapper lang-yaml">
<div class="console_code_copy" title="Copy to clipboard"></div>
<pre class="programlisting prettyprint lang-yaml">outputs:
default:
type: elasticsearchoutput.elasticsearch:
hosts: ["http://localhost:9200"]
pipeline: my_pipeline_id</pre>
</div>
<p>You can set the ingest pipeline dynamically by using a format string to
access any event field. For example, this configuration uses a custom field,
<code class="literal">fields.log_type</code>, to set the pipeline for each event:</p>
<div class="pre_wrapper lang-yaml">
<div class="console_code_copy" title="Copy to clipboard"></div>
<pre class="programlisting prettyprint lang-yaml">outputs:
default:
type: elasticsearch hosts: ["http://localhost:9200"]
pipeline: "%{[fields.log_type]}_pipeline"</pre>
</div>
<p>With this configuration, all events with <code class="literal">log_type: normal</code> are sent to a
pipeline named <code class="literal">normal_pipeline</code>, and all events with <code class="literal">log_type: critical</code> are
sent to a pipeline named <code class="literal">critical_pipeline</code>.</p>
<div class="tip admon">
<div class="icon"></div>
<div class="admon_content">
<p>To learn how to add custom fields to events, see the <code class="literal">fields</code> option.</p>
</div>
</div>
<p>See the <code class="literal">pipelines</code> setting for other ways to set the ingest pipeline
dynamically.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-pipelines-setting"></a><code class="literal">pipelines</code></p>
</td>
<td align="left" valign="top">
<p>An array of pipeline selector rules. Each rule specifies the <a href="/guide/en/elasticsearch/reference/8.18/ingest.html" class="ulink" target="_top">ingest pipeline</a>
to use for events that match the rule. During publishing, Elastic Agent uses the first
matching rule in the array. Rules can contain conditionals, format string-based
fields, and name mappings. If the <code class="literal">pipelines</code> setting is missing or no rule
matches, the <code class="literal">pipeline</code> setting is used.</p>
<p>Rule settings:</p>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<span class="strong strong"><strong><code class="literal">pipeline</code></strong></span>
</span>
</dt>
<dd>
The pipeline format string to use. If this string contains field
references, such as <code class="literal">%{[fields.name]}</code>, the fields must exist, or the rule
fails.
</dd>
<dt>
<span class="term">
<span class="strong strong"><strong><code class="literal">mappings</code></strong></span>
</span>
</dt>
<dd>
A dictionary that takes the value returned by <code class="literal">pipeline</code> and maps
it to a new name.
</dd>
<dt>
<span class="term">
<span class="strong strong"><strong><code class="literal">default</code></strong></span>
</span>
</dt>
<dd>
The default string value to use if <code class="literal">mappings</code> does not find a
match.
</dd>
<dt>
<span class="term">
<span class="strong strong"><strong><code class="literal">when</code></strong></span>
</span>
</dt>
<dd>
A condition that must succeed in order to execute the current rule.
</dd>
</dl>
</div>
<p>All the conditions supported by processors are also supported here.</p>
<p>The following example sends events to a specific pipeline based on whether the
<code class="literal">message</code> field contains the specified string:</p>
<div class="pre_wrapper lang-yaml">
<div class="console_code_copy" title="Copy to clipboard"></div>
<pre class="programlisting prettyprint lang-yaml">outputs:
default:
type: elasticsearch hosts: ["http://localhost:9200"]
pipelines:
- pipeline: "warning_pipeline"
when.contains:
message: "WARN"
- pipeline: "error_pipeline"
when.contains:
message: "ERR"</pre>
</div>
<p>The following example sets the pipeline by taking the name returned by the
<code class="literal">pipeline</code> format string and mapping it to a new name that’s used for the
pipeline:</p>
<div class="pre_wrapper lang-yaml">
<div class="console_code_copy" title="Copy to clipboard"></div>
<pre class="programlisting prettyprint lang-yaml">outputs:
default:
type: elasticsearch
hosts: ["http://localhost:9200"]
pipelines:
- pipeline: "%{[fields.log_type]}"
mappings:
critical: "sev1_pipeline"
normal: "sev2_pipeline"
default: "sev3_pipeline"</pre>
</div>
<p>With this configuration, all events with <code class="literal">log_type: critical</code> are sent to
<code class="literal">sev1_pipeline</code>, all events with <code class="literal">log_type: normal</code> are sent to a
<code class="literal">sev2_pipeline</code>, and all other events are sent to <code class="literal">sev3_pipeline</code>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div>
<div class="position-relative"><h4 class="title"><a id="output-elasticsearch-http-settings"></a>HTTP settings</h4><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/outputs/output-elasticsearch.asciidoc">edit</a></div>
</div></div></div>
<p>Settings that modify the HTTP requests sent to Elasticsearch.</p>
<div class="informaltable">
<table border="1" cellpadding="4px">
<colgroup>
<col class="col_1"/>
<col class="col_2"/>
</colgroup>
<thead>
<tr>
<th align="left" valign="top">
Setting
</th>
<th align="left" valign="top">
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-headers-setting"></a><code class="literal">headers</code></p>
</td>
<td align="left" valign="top">
<p>Custom HTTP headers to add to each request created by the Elasticsearch output.</p>
<p>Example:</p>
<div class="pre_wrapper lang-yaml">
<div class="console_code_copy" title="Copy to clipboard"></div>
<pre class="programlisting prettyprint lang-yaml">outputs:
default:
type: elasticsearch
headers:
X-My-Header: Header contents</pre>
</div>
<p>Specify multiple header values for the same header name by separating them with
a comma.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-parameters-setting"></a><code class="literal">parameters</code></p>
</td>
<td align="left" valign="top">
<p>Dictionary of HTTP parameters to pass within the URL with index operations.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-path-setting"></a><code class="literal">path</code></p>
</td>
<td align="left" valign="top">
<p>(string) An HTTP path prefix that is prepended to the HTTP API calls. This is
useful for the cases where Elasticsearch listens behind an HTTP reverse proxy that
exports the API under a custom prefix.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div>
<div class="position-relative"><h4 class="title"><a id="output-elasticsearch-memory-queue-settings"></a>Memory queue settings</h4><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/outputs/output-elasticsearch.asciidoc">edit</a></div>
</div></div></div>
<p>The memory queue keeps all events in memory.</p>
<p>The memory queue waits for the output to acknowledge or drop events. If the queue is full, no new
events can be inserted into the memory queue. Only after the signal from the output will the queue
free up space for more events to be accepted.</p>
<p>The memory queue is controlled by the parameters <code class="literal">flush.min_events</code> and <code class="literal">flush.timeout</code>.
<code class="literal">flush.min_events</code> gives a limit on the number of events that can be included in a single batch, and
<code class="literal">flush.timeout</code> specifies how long the queue should wait to completely fill an event request. If the
output supports a <code class="literal">bulk_max_size</code> parameter, the maximum batch size will be the smaller of
<code class="literal">bulk_max_size</code> and <code class="literal">flush.min_events</code>.</p>
<p><code class="literal">flush.min_events</code> is a legacy parameter, and new configurations should prefer to control batch size
with <code class="literal">bulk_max_size</code>. As of 8.13, there is never a performance advantage to limiting batch size with
<code class="literal">flush.min_events</code> instead of <code class="literal">bulk_max_size</code>.</p>
<p>In synchronous mode, an event request is always filled as soon as events are available, even if
there are not enough events to fill the requested batch. This is useful when latency must be
minimized. To use synchronous mode, set <code class="literal">flush.timeout</code> to 0.</p>
<p>For backwards compatibility, synchronous mode can also be activated by setting <code class="literal">flush.min_events</code> to 0
or 1. In this case, batch size will be capped at 1/2 the queue capacity.</p>
<p>In asynchronous mode, an event request will wait up to the specified timeout to try and fill the
requested batch completely. If the timeout expires, the queue returns a partial batch with all
available events. To use asynchronous mode, set <code class="literal">flush.timeout</code> to a positive duration, for example 5s.</p>
<p>This sample configuration forwards events to the output when there are enough events to fill the
output’s request (usually controlled by <code class="literal">bulk_max_size</code>, and limited to at most 512 events by
<code class="literal">flush.min_events</code>), or when events have been waiting for</p>
<div class="pre_wrapper lang-yaml">
<div class="console_code_copy" title="Copy to clipboard"></div>
<pre class="programlisting prettyprint lang-yaml"> queue.mem.events: 4096
queue.mem.flush.min_events: 512
queue.mem.flush.timeout: 5s</pre>
</div>
<div class="informaltable">
<table border="1" cellpadding="4px">
<colgroup>
<col class="col_1"/>
<col class="col_2"/>
</colgroup>
<thead>
<tr>
<th align="left" valign="top">
Setting
</th>
<th align="left" valign="top">
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-queue.mem.events-setting"></a><code class="literal">queue.mem.events</code></p>
</td>
<td align="left" valign="top">
<p>The number of events the queue can store. This value should be evenly divisible by the smaller of <code class="literal">queue.mem.flush.min_events</code> or <code class="literal">bulk_max_size</code> to avoid sending partial batches to the output.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">3200 events</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-queue.mem.flush.min_events-setting"></a><code class="literal">queue.mem.flush.min_events</code></p>
</td>
<td align="left" valign="top">
<p><code class="literal">flush.min_events</code> is a legacy parameter, and new configurations should prefer to control batch size with <code class="literal">bulk_max_size</code>. As of 8.13, there is never a performance advantage to limiting batch size with <code class="literal">flush.min_events</code> instead of <code class="literal">bulk_max_size</code></p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">1600 events</code></p>
</td>
</tr>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-queue.mem.flush.timeout-setting"></a><code class="literal">queue.mem.flush.timeout</code></p>
</td>
<td align="left" valign="top">
<p>(int) The maximum wait time for <code class="literal">queue.mem.flush.min_events</code> to be fulfilled. If set to 0s, events are available to the output immediately.</p>
<p><span class="strong strong"><strong>Default:</strong></span> <code class="literal">10s</code></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div>
<div class="position-relative"><h4 class="title"><a id="output-elasticsearch-performance-tuning-settings"></a>Performance tuning settings</h4><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/ingest-docs/edit/8.18/docs/en/ingest-management/elastic-agent/configuration/outputs/output-elasticsearch.asciidoc">edit</a></div>
</div></div></div>
<p>Settings that may affect performance when sending data through the Elasticsearch output.</p>
<p>Use the <code class="literal">preset</code> option to automatically configure the group of performance tuning settings to optimize for <code class="literal">throughput</code>, <code class="literal">scale</code>, <code class="literal">latency</code>, or you can select a <code class="literal">balanced</code> set of performance specifications.</p>
<p>The performance tuning <code class="literal">preset</code> values take precedence over any settings that may be defined separately. If you want to change any setting, set <code class="literal">preset</code> to <code class="literal">custom</code> and specify the performance tuning settings individually.</p>
<div class="informaltable">
<table border="1" cellpadding="4px">
<colgroup>
<col class="col_1"/>
<col class="col_2"/>
</colgroup>
<thead>
<tr>
<th align="left" valign="top">
Setting
</th>
<th align="left" valign="top">
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">
<p><a id="output-elasticsearch-backoff.init-setting"></a><code class="literal">backoff.init</code></p>
</td>
<td align="left" valign="top">
<p>(string) The number of seconds to wait before trying to reconnect to Elasticsearch