Hey there im testing arround with the Index Lifecycle Management and have some problems with it which i don't know how to handle them.
I have a Template to assing the ILM-Policy, which are for multiple Indices.
PUT _template/pms_test_netzwerk
{
"order" : 0,
"index_patterns" : [
"pms_netzwerk_monti1*"
],
"settings" : {
"index" : {
"lifecycle" : {
"name" : "pms_test",
"rollover_alias" : "pms_netzwerk_monti1"
},
"codec" : "best_compression",
"refresh_interval" : "5s",
"number_of_shards" : "1"
}
},
"mappings" : {
"properties" : {
"Station" : {
"type" : "keyword"
},
"Bereich" : {
"type" : "keyword"
},
"techn_Platz" : {
"type" : "keyword"
},
"Anlage" : {
"type" : "keyword"
}
}
},
"aliases" : { }
}
And this is my Index i created
PUT /%3Cpms_test_netzwerk_monti1-%7Bnow%2FM%7Byyyy.MM%7D%7D-0001%3E
{
"aliases": {
"pms_netzwerk_monti1": {
"is_write_index": true
}
}
As far as i know the "rollover_alias" has to be the same as the "alias" assigned to the Index is that correct ?
When they are not the same i get the following error-message
index.lifecycle.rollover_alias [pms_netzwerk_monti1] does not point to index [pms_netzwerk_monti1-2019.07-0001]
So my question. Is it possible to assign the rollover alias with a template snippet like so ?
"rollover_alias" : "pms_netzwerk_{my_field}"
Because i have more indices with differnt names and i need different alias for each index.