Actually, I have a question on patterns.
Reading the 7.7 version of "Automate rollover with ILM" (my first link), I noticed that it's possible to specify an
"index.lifecycle.rollover_alias" field under
"settings" in the template.
The example uses a pattern for the index with a wildcard in the end, so that it can match all indices of the form
<number> that increments automatically on rollover).
In my case I would need to be general (use wildcards) both in the middle and at the end of the index name.
Imagine my indices are of the form
project_name.city.responsibility. For example
ml for Machine Learning and
eval for Evaluation (real-time stream of performance metrics on some ML predictions, for a given city). The
eval part are fixed, while the
city can change (I have multiple cities, and all the
eval streams for them have the same structure, hence my need for using a pattern of the form
I also need rollover on all of them, though. Therefore, if I understood the way to "impose a retention window" in elasticsearch, I should activate automatic rollover on my indices, plus some ILM policy with deletion for old data (I would have indices like
ml.paris.eval-0003, and after X days I would have
ml.paris.eval-0003 is moved to deletion). Finally, I would need an alias over them, so that I can refer to whatever is the current rolled-over index without specifying the numeric part at the end (I can always use
ml.paris.eval in place of
I hope my scenario is clear. Basically I need to be generic both in the middle of indices' names (variability over
city) and at the end of them (for matching automatically rolled-over indices).
So now my question is: is there a way to specify a "generic alias" in
I would like to have in my template:
but this is not possible.
Do I have to create a different template for every city? (All templates would be identical, except for the index name and the alias, which would contain the city "hardcoded" inside, and I would use the pattern there only for the rollover & alias functionality)
Or is this a use case for template inheritance that you were advocating for? (A template to match generic cities and a template to match the final numeric part that comes from rollover and impose aliases? I'm not sure how would I mix them in this case. Perhaps you can help here).