diff --git a/x-pack/plugins/alerting/server/alerts_service/resource_installer_utils.test.ts b/x-pack/plugins/alerting/server/alerts_service/resource_installer_utils.test.ts index f059b77a5c88..1672f1c32941 100644 --- a/x-pack/plugins/alerting/server/alerts_service/resource_installer_utils.test.ts +++ b/x-pack/plugins/alerting/server/alerts_service/resource_installer_utils.test.ts @@ -38,7 +38,13 @@ describe('getIndexTemplateAndPattern', () => { pattern: '.internal.alerts-test.alerts-default-*', basePattern: '.alerts-test.alerts-*', alias: '.alerts-test.alerts-default', - validPrefixes: ['.ds-.alerts-', '.internal.alerts-', '.alerts-'], + validPrefixes: [ + '.ds-.alerts-', + '.internal.alerts-', + '.alerts-', + '.internal.preview.alerts-', + '.preview.alerts-', + ], name: '.internal.alerts-test.alerts-default-000001', }); }); @@ -49,7 +55,13 @@ describe('getIndexTemplateAndPattern', () => { pattern: '.internal.alerts-test.alerts-special-*', basePattern: '.alerts-test.alerts-*', alias: '.alerts-test.alerts-special', - validPrefixes: ['.ds-.alerts-', '.internal.alerts-', '.alerts-'], + validPrefixes: [ + '.ds-.alerts-', + '.internal.alerts-', + '.alerts-', + '.internal.preview.alerts-', + '.preview.alerts-', + ], name: '.internal.alerts-test.alerts-special-000001', }); }); @@ -67,7 +79,13 @@ describe('getIndexTemplateAndPattern', () => { basePattern: '.alerts-test.alerts-*', alias: '.alerts-test.alerts-special', name: '.internal.alerts-test.alerts-special-000001', - validPrefixes: ['.ds-.alerts-', '.internal.alerts-', '.alerts-'], + validPrefixes: [ + '.ds-.alerts-', + '.internal.alerts-', + '.alerts-', + '.internal.preview.alerts-', + '.preview.alerts-', + ], secondaryAlias: `siem.signals-special`, }); }); diff --git a/x-pack/plugins/alerting/server/alerts_service/resource_installer_utils.ts b/x-pack/plugins/alerting/server/alerts_service/resource_installer_utils.ts index 7a1031cdf222..d1c2c2c6e734 100644 --- a/x-pack/plugins/alerting/server/alerts_service/resource_installer_utils.ts +++ b/x-pack/plugins/alerting/server/alerts_service/resource_installer_utils.ts @@ -13,7 +13,13 @@ interface GetComponentTemplateNameOpts { context?: string; name?: string; } -export const VALID_ALERT_INDEX_PREFIXES = ['.ds-.alerts-', '.internal.alerts-', '.alerts-']; +export const VALID_ALERT_INDEX_PREFIXES = [ + '.ds-.alerts-', + '.internal.alerts-', + '.alerts-', + '.internal.preview.alerts-', + '.preview.alerts-', +]; export const getComponentTemplateName = ({ context, name }: GetComponentTemplateNameOpts = {}) => `.alerts-${context ? `${context}.alerts` : name ? name : 'framework'}-mappings`;