diff --git a/elastic/logs/README.md b/elastic/logs/README.md index d68b52bf..4d5fed01 100644 --- a/elastic/logs/README.md +++ b/elastic/logs/README.md @@ -221,6 +221,7 @@ The following parameters are available: * `lifecycle` (default: unset to fall back on Serverless detection) - Specifies the lifecycle management feature to use for data streams. Use `ilm` for index lifecycle management or `dlm` for data lifecycle management. By default, `dlm` will be used for benchmarking Serverless Elasticsearch. * `workflow-request-cache` (default: `true`) - Explicit control of request cache query parameter in searches executed in a workflow. This can be further overriden at an operation level with `request-cache` parameter. * `synthetic_source_keep` (default: unset) - Allows overriding the default synthetic source behaviour for all field types with the following values: `none` (equivalent to unset) - no source is stored, `arrays` - source stored as is only for multi-value (array) fields. +* `source_mode` (default: unset) - Specifies the source mode to be used. ### Data Download Parameters diff --git a/elastic/logs/templates/component/track-shared-logsdb-mode.json b/elastic/logs/templates/component/track-shared-logsdb-mode.json index 05754531..8ae129fb 100644 --- a/elastic/logs/templates/component/track-shared-logsdb-mode.json +++ b/elastic/logs/templates/component/track-shared-logsdb-mode.json @@ -5,12 +5,17 @@ "index": { "mode": {{ index_mode | tojson }} {% if synthetic_source_keep and synthetic_source_keep != 'none' %} - ,"mapping": { - "synthetic_source_keep": "{{ synthetic_source_keep }}" - } + ,"mapping.synthetic_source_keep": {{ synthetic_source_keep | tojson }} {% endif %} } {% endif %} + }, + "mappings": { + {% if source_mode %} + "_source": { + "mode": {{ source_mode | tojson }} + } + {% endif %} } } } diff --git a/elastic/security/README.md b/elastic/security/README.md index 63594859..5e3cfcf8 100644 --- a/elastic/security/README.md +++ b/elastic/security/README.md @@ -85,6 +85,7 @@ The following parameters are available: * `corpora_uri_base` (default: `https://rally-tracks.elastic.co`) - Specify the base location of the datasets used by this track. * `index_mode` (default: unset) - A parameter meant to be used internally which defines one of the available indexing modes, "standard", "logsdb" or "time_series". If not set, "standard" is used. * `synthetic_source_keep` (default: unset) - Allows overriding the default synthetic source behaviour for all field types with the following values: `none` (equivalent to unset) - no source is stored, `arrays` - source stored as is only for multi-value (array) fields. +* `source_mode` (default: unset) - Specifies the source mode to be used. ### Data Generation Parameters diff --git a/elastic/security/templates/component/track-shared-logsdb-mode.json b/elastic/security/templates/component/track-shared-logsdb-mode.json index adc476be..eb2b7f23 100644 --- a/elastic/security/templates/component/track-shared-logsdb-mode.json +++ b/elastic/security/templates/component/track-shared-logsdb-mode.json @@ -5,15 +5,20 @@ "index": { "mode": {{ index_mode | tojson }}, {% if synthetic_source_keep and synthetic_source_keep != 'none' %} - "mapping": { - "synthetic_source_keep": "{{ synthetic_source_keep }}" - }, + "mapping.synthetic_source_keep": {{ synthetic_source_keep | tojson}}, {% endif %} "sort.field": [ "host.hostname", "@timestamp" ], "sort.order": [ "asc", "desc" ], "sort.missing": ["_first", "_last"] } {% endif %} + }, + "mappings": { + {% if source_mode %} + "_source": { + "mode": {{ source_mode | tojson }} + } + {% endif %} } } } diff --git a/http_logs/README.md b/http_logs/README.md index 2f0123f5..1de782f5 100644 --- a/http_logs/README.md +++ b/http_logs/README.md @@ -52,6 +52,7 @@ node pipeline to run. Valid options are `'baseline'` (default), `'grok'` and `' * `enable_logsdb` (default: false) Determines whether the logsdb index mode gets used. If set then index sorting is configured to only use `@timestamp` field and the `source_enabled` parameter will have no effect. * `force_merge_max_num_segments` (default: unset): An integer specifying the max amount of segments the force-merge operation should use. * `synthetic_source_keep` (default: unset): If specified, configures the `index.mapping.synthetic_source_keep` index setting. +* `source_mode` (default: unset) - Specifies the source mode to be used. ### License diff --git a/http_logs/index.json b/http_logs/index.json index 50db9088..1e696e5a 100644 --- a/http_logs/index.json +++ b/http_logs/index.json @@ -20,6 +20,9 @@ {%- else %} "_source": { "enabled": {{ source_enabled | default(true) | tojson }} + {% if source_mode %} + "mode": {{ source_mode | tojson }}, + {% endif %} }, {%- endif %} "properties": {