Skip to content

Commit

Permalink
Set latency preset in the default ES output (#1996)
Browse files Browse the repository at this point in the history
Set for Elastic Stack versions >=8.12 the Elasticsearch output preset
latency as the default value. For Elastic Stack versions >=8.0 & < 8.12,
those settings that latency preset configures are added directly to the
output via the config key.
  • Loading branch information
mrodm authored Jul 31, 2024
1 parent 1281de5 commit 64d55ef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions internal/stack/_static/kibana.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,20 @@ xpack.fleet.outputs:
ca_trusted_fingerprint: "${ELASTIC_PACKAGE_CA_TRUSTED_FINGERPRINT}"
is_default: true
is_default_monitoring: true
{{- if semverLessThan $version "8.12.0" }}
# performance tuning preset values optimized for latency
# values retrieved from https://www.elastic.co/guide/en/fleet/8.14/es-output-settings.html#es-output-settings-performance-tuning-settings
config:
bulk_max_size: 50
worker: 1
queue.mem.events: 4100
queue.mem.flush.min_events: 2050
queue.mem.flush.timeout: 1s
compression_level: 1
connection_idle_timeout: 60
{{ else }}
preset: latency
{{ end }}

{{ $logstash_enabled := fact "logstash_enabled" }}
{{ if eq $logstash_enabled "true" }}
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-check-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if [ "${PACKAGE_TEST_TYPE:-other}" == "with-logstash" ]; then
echo "stack.logstash_enabled: true" >> ~/.elastic-package/profiles/logstash/config.yml
fi

# In case it is tested with Elatic serverless, there should be just one Elastic stack
# In case it is tested with Elastic serverless, there should be just one Elastic stack
# started to test all packages. In our CI, this Elastic serverless stack is started
# at the beginning of the pipeline and must be running for all packages.
if [[ "${SERVERLESS}" != "true" ]]; then
Expand Down

0 comments on commit 64d55ef

Please sign in to comment.