Apply different ILM per namespace

Hello,

We have many Fleet policies (different data_stream namespaces) with System integration which are currently using the default metrics ILM.

We now want to tailor each policy and define dedicated ILM for each namespace but reading the documentation and it looks like we cannot easily do that without having to clone every template for system integration i.e.: metrics-system.cpu, metrics-system.core, metrics-system.fsstat, metrics-system.process and so on. With hundreds of namespaces this task would be very daunting so is there any easier way to apply different ILMs per namespace ?

Also, I’m reading this in the ELK docs:

Scenario 3: Apply an ILM policy with integrations using multiple namespaces | Fleet and Elastic Agent Guide [8.19] | Elastic

and specifically this statement: “For your changes to continue to be applied in future versions, you must put all custom index settings into a component template. The component template must follow the data stream naming scheme, and end with @custom*“*

but can’t understand why do we need to create a custom component template and add ILM settings to it? Why can’t we just add these settings to the custom index template we are creating (clone of the built-in template with addition of dedicated ILM settings)?

Thank you