Placeholders within `index.lifecycle.rollover_alias` to generalize index templates?

Our data is indexed on a per customer basis... for example, customer abc, xyz, etc...

We are trying to use ILM rollover on these indices. The data is mutable nor is it strictly time based, so we are not using data streams.

As such, we need to include index.lifecycle.rollover_alias in the template.

I have the "static" format working:

PUT _index_template/test-ilm
{
  "priority": 300,
  "index_patterns": [
    "abc-*"
  ],
  "template": {
    "settings": {
      "number_of_shards": 1,
      "number_of_replicas": 1,
      "index.lifecycle.name": "test_policy",
      "index.lifecycle.rollover_alias": "abc"
    }
  }
}

But this requires an _index_template per customer which is rather impractical (and I'm not sure if there is a performance consideration from having a large number of them) - Wondering if there was a way to generalize it down to a single template definition?

I am aware of the {index} placeholder - but that doesn't help in this scenario. Unless there is a way to extract parts of that placeholder?

I have found past discussions on this very topic but can't determine where things currently stand as of v7.16

Thanks,

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.