Resolve overlapping index templates for namespace customization
Learn how to interpret and resolve warnings about overlapping index templates when you enable namespace index templates for a Fleet integration. This page helps you decide whether to keep your existing customizations, switch to Fleet-managed namespace index templates, or combine both approaches.
If you previously duplicated an integration's base data stream index template (priority 200), narrowed the index pattern to one namespace, and raised the copy's priority (often to 250 or higher), that copy can overlap with a Fleet-managed namespace index template. For example, you might have copied logs-nginx.error into logs-nginx.error-production-custom with pattern logs-nginx.error-production* and priority 280.
When you enable namespace index templates for that same namespace, Fleet tries to create a managed template such as logs-nginx.error@namespace.production at priority 250 for the same index pattern. Elasticsearch applies only one winning index template per index creation, so those templates overlap. The result depends on the existing template's priority, as described in How Fleet detects and reports overlaps.
The same can happen with any pre-existing index template whose index patterns match the namespace's data streams, not only copies with a custom suffix in the name.
When you enable namespace index templates for a namespace on an integration, Fleet runs a preflight check for each (data stream, namespace) pair. The check uses the Elasticsearch simulate index API (POST _index_template/_simulate_index/<index>) to see which existing template would win for that data stream, then compares priorities with the planned namespace index template.
Fleet sets the namespace index template priority to the base template priority plus 50: 250 for most integrations (base 200), or 200 for integrations with dataset_is_prefix: true data streams (base 150). The examples on this page use 250; if your integration uses dataset_is_prefix data streams, read 200 instead. A user with the manage_index_templates privilege can change this priority with the Elasticsearch index template API, but Fleet restores the default whenever the integration's templates are reinstalled or resynchronized.
Fleet reports overlaps in the UI before changes are applied, and in API responses as warnings. Each overlap falls into one of these cases:
| Situation | What happens |
|---|---|
Existing template priority is higher than 250 |
Fleet creates the namespace index template, but Elasticsearch applies the existing template for new data streams. The namespace index template's composed_of chain (including <namespace>@custom) is not used. |
Existing template priority is exactly 250 |
Fleet cannot create the namespace index template. The existing template continues to govern new data streams for that pair until you change priorities and enable namespace index templates again. |
Existing template priority is lower than 250 |
Fleet creates the namespace index template, and Elasticsearch applies it for new data streams. The existing template no longer affects newly created indices in that namespace. |
Index templates are applied when backing indices are created. Existing indices are not rewritten when you enable or turn off namespace index templates.
Elasticsearch does not merge overlapping index templates. The highest-priority matching template wins as a whole. Component templates are merged only within that winning template's composed_of list.
Pick the path that matches your goal.
Use this path when you want <namespace>@custom and related Fleet namespace features to apply.
Identify overlapping templates in Index Management → Index Templates. Look for templates whose index patterns match the same data streams as the planned
@namespace.<namespace>templates.If any overlapping template has priority
250, lower that priority (for example to200or less) or remove the template before enabling. Same-priority templates block creation of the Fleet-managed namespace index template.How to change an index template's priority- Go to the Index Management page using the navigation menu or the global search field, and open the Index Templates tab.
- Find and select the index template you want to change, then select Manage → Edit.
- On the Logistics step, update the Priority value.
- Continue to the Review step, then save the template.
For more about creating and managing index templates, refer to Index templates.
Enable namespace index templates for the namespace. For UI and API steps, refer to Customize data streams with namespace index templates.
Confirm the managed templates exist (for example, search index templates for
@namespace.<namespace>).Create or update the
<namespace>@customcomponent template with the settings you still need. Copy useful settings from your older custom index templates into<namespace>@customor into the data stream@customtemplates when they should stay data-stream-specific.Optionally delete or further lower the priority of unused custom index templates that no longer win, if you don't need them as a fallback.
Roll over each affected data stream so new backing indices use the managed templates.
If you enabled namespace index templates while a priority-250 overlap blocked some templates, turn them off for that namespace, adjust those priorities, then enable them again so Fleet can create the missing namespace index templates.
Use this path when your custom index templates already do what you need.
- Cancel enabling if the warning appears in the UI, or leave the namespace out of Namespaces with dedicated index templates.
- If you already enabled namespace index templates for the namespace, remove it from Namespaces with dedicated index templates on the integration's Settings tab, or turn off Use dedicated index templates for this namespace in the integration policy editor. Fleet deletes the managed namespace index templates; your existing templates remain.
- Continue managing customization through your existing index templates and component templates.
Use this path only when you understand which template should win for each data stream.
Review every overlapping template's priority against the namespace index template priority (
250for most integrations; refer to the preceding note).For data streams where your custom template must win, set its priority higher than the namespace index template priority. For data streams where the Fleet-managed namespace index template must win, set your custom template's priority lower (but not equal, which blocks creation), or remove the template.
How to change an index template's priority- Go to the Index Management page using the navigation menu or the global search field, and open the Index Templates tab.
- Find and select the index template you want to change, then select Manage → Edit.
- On the Logistics step, update the Priority value.
- Continue to the Review step, then save the template.
For more about creating and managing index templates, refer to Index templates.
Enable namespace index templates and read the warning list to confirm the expected winners.
Verify a sample of new backing indices (settings, mappings, and lifecycle) after rollover.
Leaving overlapping templates at priority 250 or higher means some or all namespace index template customization might be unused or incomplete, even after you enable the feature.