diff --git a/internal/stack/_static/elasticsearch.yml.tmpl b/internal/stack/_static/elasticsearch.yml.tmpl index 43a8a981a..d796e9824 100644 --- a/internal/stack/_static/elasticsearch.yml.tmpl +++ b/internal/stack/_static/elasticsearch.yml.tmpl @@ -28,8 +28,14 @@ script.context.template.cache_max_size: 2000 {{- end -}} {{ $apm_enabled := fact "apm_enabled" }} -{{ if eq $apm_enabled "true" }} +{{ if (and (eq $apm_enabled "true") (not (semverLessThan $version "8.5.0"))) }} +{{ if semverLessThan $version "8.14.0" }} tracing.apm.enabled: true tracing.apm.agent.server_url: "http://fleet-server:8200" tracing.apm.agent.environment: "dev" +{{- else -}} +telemetry.tracing.enabled: true +telemetry.agent.server_url: "http://fleet-server:8200" +telemetry.agent.environment: "dev" +{{- end -}} {{- end -}} diff --git a/internal/stack/_static/kibana.yml.tmpl b/internal/stack/_static/kibana.yml.tmpl index d83b7e1af..6020c2592 100644 --- a/internal/stack/_static/kibana.yml.tmpl +++ b/internal/stack/_static/kibana.yml.tmpl @@ -101,7 +101,9 @@ xpack.fleet.agentPolicies: vars: - name: custom value: | + {{ if not (semverLessThan $version "8.8.0") }} server: + {{ end }} instrumentation: enabled: true hosts: ["http://fleet-server:8200"]