From d279a5cb570dd16e829edb37636e0945d708d059 Mon Sep 17 00:00:00 2001 From: Fae Charlton Date: Tue, 5 Dec 2023 11:01:26 -0500 Subject: [PATCH] Add presets to default / reference beat configs --- .../output-elasticsearch.reference.yml.tmpl | 21 ++++++++++++++++--- .../config/output-elasticsearch.yml.tmpl | 4 ++++ x-pack/filebeat/filebeat.reference.yml | 21 ++++++++++++++++--- x-pack/filebeat/filebeat.yml | 4 ++++ x-pack/heartbeat/heartbeat.reference.yml | 21 ++++++++++++++++--- x-pack/heartbeat/heartbeat.yml | 4 ++++ x-pack/metricbeat/metricbeat.reference.yml | 21 ++++++++++++++++--- x-pack/metricbeat/metricbeat.yml | 4 ++++ .../enterprisesearch-xpack.yml.disabled | 11 ---------- 9 files changed, 88 insertions(+), 23 deletions(-) delete mode 100644 x-pack/metricbeat/modules.d/enterprisesearch-xpack.yml.disabled diff --git a/libbeat/_meta/config/output-elasticsearch.reference.yml.tmpl b/libbeat/_meta/config/output-elasticsearch.reference.yml.tmpl index d6ebe03ada5..91ac37513d6 100644 --- a/libbeat/_meta/config/output-elasticsearch.reference.yml.tmpl +++ b/libbeat/_meta/config/output-elasticsearch.reference.yml.tmpl @@ -9,7 +9,15 @@ output.elasticsearch: # IPv6 addresses should always be defined as: https://[2001:db8::1]:9200 hosts: ["localhost:9200"] + # Performance presets configure other output fields to recommended values + # based on a performance priority. + # Options are "balanced", "throughput", "scale", "latency" and "custom". + # Default if unspecified: "custom" + preset: balanced + # Set gzip compression level. Set to 0 to disable compression. + # This field may conflict with performance presets. To set it + # manually use "preset: custom". # The default is 1. #compression_level: 1 @@ -30,6 +38,8 @@ output.elasticsearch: #param2: value2 # Number of workers per Elasticsearch host. + # This field may conflict with performance presets. To set it + # manually use "preset: custom". #worker: 1 # If set to true and multiple hosts are configured, the output plugin load @@ -67,8 +77,10 @@ output.elasticsearch: #max_retries: 3 # The maximum number of events to bulk in a single Elasticsearch bulk API index request. - # The default is 50. - #bulk_max_size: 50 + # This field may conflict with performance presets. To set it + # manually use "preset: custom". + # The default is 1600. + #bulk_max_size: 1600 # The number of seconds to wait before trying to reconnect to Elasticsearch # after a network error. After waiting backoff.init seconds, the Beat @@ -84,7 +96,10 @@ output.elasticsearch: # The maximum amount of time an idle connection will remain idle # before closing itself. Zero means use the default of 60s. The # format is a Go language duration (example 60s is 60 seconds). - # idle_connection_timeout: 60s + # This field may conflict with performance presets. To set it + # manually use "preset: custom". + # The default is 3s. + # idle_connection_timeout: 3s # Configure HTTP request timeout before failing a request to Elasticsearch. #timeout: 90 diff --git a/libbeat/_meta/config/output-elasticsearch.yml.tmpl b/libbeat/_meta/config/output-elasticsearch.yml.tmpl index 7c1287e01a1..c81a7f337f7 100644 --- a/libbeat/_meta/config/output-elasticsearch.yml.tmpl +++ b/libbeat/_meta/config/output-elasticsearch.yml.tmpl @@ -3,6 +3,10 @@ output.elasticsearch: # Array of hosts to connect to. hosts: ["localhost:9200"] + # Performance preset - one of "balanced", "throughput", "scale", + # "latency", or "custom". + preset: balanced + # Protocol - either `http` (default) or `https`. #protocol: "https" diff --git a/x-pack/filebeat/filebeat.reference.yml b/x-pack/filebeat/filebeat.reference.yml index 06b8bc2b588..b3c9ee5b7fb 100644 --- a/x-pack/filebeat/filebeat.reference.yml +++ b/x-pack/filebeat/filebeat.reference.yml @@ -3922,7 +3922,15 @@ output.elasticsearch: # IPv6 addresses should always be defined as: https://[2001:db8::1]:9200 hosts: ["localhost:9200"] + # Performance presets configure other output fields to recommended values + # based on a performance priority. + # Options are "balanced", "throughput", "scale", "latency" and "custom". + # Default if unspecified: "custom" + preset: balanced + # Set gzip compression level. Set to 0 to disable compression. + # This field may conflict with performance presets. To set it + # manually use "preset: custom". # The default is 1. #compression_level: 1 @@ -3943,6 +3951,8 @@ output.elasticsearch: #param2: value2 # Number of workers per Elasticsearch host. + # This field may conflict with performance presets. To set it + # manually use "preset: custom". #worker: 1 # If set to true and multiple hosts are configured, the output plugin load @@ -3980,8 +3990,10 @@ output.elasticsearch: #max_retries: 3 # The maximum number of events to bulk in a single Elasticsearch bulk API index request. - # The default is 50. - #bulk_max_size: 50 + # This field may conflict with performance presets. To set it + # manually use "preset: custom". + # The default is 1600. + #bulk_max_size: 1600 # The number of seconds to wait before trying to reconnect to Elasticsearch # after a network error. After waiting backoff.init seconds, the Beat @@ -3997,7 +4009,10 @@ output.elasticsearch: # The maximum amount of time an idle connection will remain idle # before closing itself. Zero means use the default of 60s. The # format is a Go language duration (example 60s is 60 seconds). - # idle_connection_timeout: 60s + # This field may conflict with performance presets. To set it + # manually use "preset: custom". + # The default is 3s. + # idle_connection_timeout: 3s # Configure HTTP request timeout before failing a request to Elasticsearch. #timeout: 90 diff --git a/x-pack/filebeat/filebeat.yml b/x-pack/filebeat/filebeat.yml index d4080e9cccb..aa50779b922 100644 --- a/x-pack/filebeat/filebeat.yml +++ b/x-pack/filebeat/filebeat.yml @@ -140,6 +140,10 @@ output.elasticsearch: # Array of hosts to connect to. hosts: ["localhost:9200"] + # Performance preset - one of "balanced", "throughput", "scale", + # "latency", or "custom". + preset: balanced + # Protocol - either `http` (default) or `https`. #protocol: "https" diff --git a/x-pack/heartbeat/heartbeat.reference.yml b/x-pack/heartbeat/heartbeat.reference.yml index fe6a72cd474..fd372c0ce95 100644 --- a/x-pack/heartbeat/heartbeat.reference.yml +++ b/x-pack/heartbeat/heartbeat.reference.yml @@ -542,7 +542,15 @@ output.elasticsearch: # IPv6 addresses should always be defined as: https://[2001:db8::1]:9200 hosts: ["localhost:9200"] + # Performance presets configure other output fields to recommended values + # based on a performance priority. + # Options are "balanced", "throughput", "scale", "latency" and "custom". + # Default if unspecified: "custom" + preset: balanced + # Set gzip compression level. Set to 0 to disable compression. + # This field may conflict with performance presets. To set it + # manually use "preset: custom". # The default is 1. #compression_level: 1 @@ -563,6 +571,8 @@ output.elasticsearch: #param2: value2 # Number of workers per Elasticsearch host. + # This field may conflict with performance presets. To set it + # manually use "preset: custom". #worker: 1 # If set to true and multiple hosts are configured, the output plugin load @@ -600,8 +610,10 @@ output.elasticsearch: #max_retries: 3 # The maximum number of events to bulk in a single Elasticsearch bulk API index request. - # The default is 50. - #bulk_max_size: 50 + # This field may conflict with performance presets. To set it + # manually use "preset: custom". + # The default is 1600. + #bulk_max_size: 1600 # The number of seconds to wait before trying to reconnect to Elasticsearch # after a network error. After waiting backoff.init seconds, the Beat @@ -617,7 +629,10 @@ output.elasticsearch: # The maximum amount of time an idle connection will remain idle # before closing itself. Zero means use the default of 60s. The # format is a Go language duration (example 60s is 60 seconds). - # idle_connection_timeout: 60s + # This field may conflict with performance presets. To set it + # manually use "preset: custom". + # The default is 3s. + # idle_connection_timeout: 3s # Configure HTTP request timeout before failing a request to Elasticsearch. #timeout: 90 diff --git a/x-pack/heartbeat/heartbeat.yml b/x-pack/heartbeat/heartbeat.yml index 76876b9c7ff..8accb212db4 100644 --- a/x-pack/heartbeat/heartbeat.yml +++ b/x-pack/heartbeat/heartbeat.yml @@ -102,6 +102,10 @@ output.elasticsearch: # Array of hosts to connect to. hosts: ["localhost:9200"] + # Performance preset - one of "balanced", "throughput", "scale", + # "latency", or "custom". + preset: balanced + # Protocol - either `http` (default) or `https`. #protocol: "https" diff --git a/x-pack/metricbeat/metricbeat.reference.yml b/x-pack/metricbeat/metricbeat.reference.yml index bfb13acc660..85f4d12612a 100644 --- a/x-pack/metricbeat/metricbeat.reference.yml +++ b/x-pack/metricbeat/metricbeat.reference.yml @@ -1846,7 +1846,15 @@ output.elasticsearch: # IPv6 addresses should always be defined as: https://[2001:db8::1]:9200 hosts: ["localhost:9200"] + # Performance presets configure other output fields to recommended values + # based on a performance priority. + # Options are "balanced", "throughput", "scale", "latency" and "custom". + # Default if unspecified: "custom" + preset: balanced + # Set gzip compression level. Set to 0 to disable compression. + # This field may conflict with performance presets. To set it + # manually use "preset: custom". # The default is 1. #compression_level: 1 @@ -1867,6 +1875,8 @@ output.elasticsearch: #param2: value2 # Number of workers per Elasticsearch host. + # This field may conflict with performance presets. To set it + # manually use "preset: custom". #worker: 1 # If set to true and multiple hosts are configured, the output plugin load @@ -1904,8 +1914,10 @@ output.elasticsearch: #max_retries: 3 # The maximum number of events to bulk in a single Elasticsearch bulk API index request. - # The default is 50. - #bulk_max_size: 50 + # This field may conflict with performance presets. To set it + # manually use "preset: custom". + # The default is 1600. + #bulk_max_size: 1600 # The number of seconds to wait before trying to reconnect to Elasticsearch # after a network error. After waiting backoff.init seconds, the Beat @@ -1921,7 +1933,10 @@ output.elasticsearch: # The maximum amount of time an idle connection will remain idle # before closing itself. Zero means use the default of 60s. The # format is a Go language duration (example 60s is 60 seconds). - # idle_connection_timeout: 60s + # This field may conflict with performance presets. To set it + # manually use "preset: custom". + # The default is 3s. + # idle_connection_timeout: 3s # Configure HTTP request timeout before failing a request to Elasticsearch. #timeout: 90 diff --git a/x-pack/metricbeat/metricbeat.yml b/x-pack/metricbeat/metricbeat.yml index 8b974c6c020..a148cfb3b51 100644 --- a/x-pack/metricbeat/metricbeat.yml +++ b/x-pack/metricbeat/metricbeat.yml @@ -93,6 +93,10 @@ output.elasticsearch: # Array of hosts to connect to. hosts: ["localhost:9200"] + # Performance preset - one of "balanced", "throughput", "scale", + # "latency", or "custom". + preset: balanced + # Protocol - either `http` (default) or `https`. #protocol: "https" diff --git a/x-pack/metricbeat/modules.d/enterprisesearch-xpack.yml.disabled b/x-pack/metricbeat/modules.d/enterprisesearch-xpack.yml.disabled deleted file mode 100644 index 0af7916573a..00000000000 --- a/x-pack/metricbeat/modules.d/enterprisesearch-xpack.yml.disabled +++ /dev/null @@ -1,11 +0,0 @@ -# Module: enterprisesearch -# Docs: https://www.elastic.co/guide/en/beats/metricbeat/main/metricbeat-module-enterprisesearch.html - -- module: enterprisesearch - xpack.enabled: true - metricsets: ["health", "stats"] - enabled: true - period: 10s - hosts: ["http://localhost:3002"] - #username: "user" - #password: "secret"