diff --git a/src/platform/packages/shared/kbn-apm-synthtrace/src/lib/logs/custom_logsdb_index_templates.ts b/src/platform/packages/shared/kbn-apm-synthtrace/src/lib/logs/custom_logsdb_index_templates.ts index df864078658df..a2894305abedc 100644 --- a/src/platform/packages/shared/kbn-apm-synthtrace/src/lib/logs/custom_logsdb_index_templates.ts +++ b/src/platform/packages/shared/kbn-apm-synthtrace/src/lib/logs/custom_logsdb_index_templates.ts @@ -13,6 +13,7 @@ export enum IndexTemplateName { LogsDb = 'logsdb', Synht2 = 'synth.2', SomeFailureStore = 'synth.fs', + NoFailureStore = 'synth.no-fs', } export const indexTemplates: { @@ -49,7 +50,7 @@ export const indexTemplates: { default_pipeline: 'synth.2@pipeline', }, }, - priority: 500, + priority: 501, index_patterns: ['logs-synth.2-*'], composed_of: ['logs@mappings', 'logs@settings', 'ecs@mappings', 'synth.2@custom'], allow_auto_create: true, @@ -57,6 +58,30 @@ export const indexTemplates: { hidden: false, }, }, + [IndexTemplateName.NoFailureStore]: { + name: IndexTemplateName.NoFailureStore, + _meta: { + managed: false, + description: 'custom index template created by synthtrace tool', + }, + template: { + settings: { + default_pipeline: 'logs@default-pipeline', + data_stream_options: { + failure_store: { + enabled: false, + }, + }, + }, + }, + priority: 500, + index_patterns: ['logs-*'], + composed_of: ['logs@mappings', 'logs@settings', 'ecs@mappings'], + allow_auto_create: true, + data_stream: { + hidden: false, + }, + }, [IndexTemplateName.SomeFailureStore]: { name: IndexTemplateName.SomeFailureStore, _meta: { diff --git a/x-pack/solutions/observability/test/functional/apps/dataset_quality/dataset_quality_table.ts b/x-pack/solutions/observability/test/functional/apps/dataset_quality/dataset_quality_table.ts index 40768752aa190..6cf3871fce198 100644 --- a/x-pack/solutions/observability/test/functional/apps/dataset_quality/dataset_quality_table.ts +++ b/x-pack/solutions/observability/test/functional/apps/dataset_quality/dataset_quality_table.ts @@ -48,6 +48,10 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid // Install Integration and ingest logs for it await PageObjects.observabilityLogsExplorer.installPackage(pkg); + // Disable failure store for logs-* + await synthtrace.createIndexTemplate(IndexTemplateName.NoFailureStore); + + // Enable failure store only for logs-synth.2-* await synthtrace.createCustomPipeline(processors, 'synth.2@pipeline'); await synthtrace.createComponentTemplate({ name: 'synth.2@custom', @@ -95,6 +99,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid after(async () => { await synthtrace.clean(); await PageObjects.observabilityLogsExplorer.uninstallPackage(pkg); + await synthtrace.deleteIndexTemplate(IndexTemplateName.NoFailureStore); await synthtrace.deleteIndexTemplate(IndexTemplateName.Synht2); await synthtrace.deleteComponentTemplate('synth.2@custom'); await synthtrace.deleteCustomPipeline('synth.2@pipeline');