Index Template set rollover alias is doesn't work with {index}
{
"index": {
"lifecycle": {
"name": "k8s-logs",
"rollover_alias": "{index}"
},
"routing": {
"allocation": {
"include": {
"_tier_preference": "data_content"
}
}
},
"refresh_interval": "30s",
"number_of_shards": "2"
}
}
show err
logstash setting:
output {
if [fields][env] == "canary" {
elasticsearch {
hosts => ["elastic-cluster:9200"]
ilm_enabled => true
ilm_policy => "k8s-logs"
index => "k8s-%{[kubernetes][namespace]}-%{[kubernetes][labels][app]}-%{+YYYY.MM.dd}"
ilm_pattern => "%{+YYYY.MM.dd}"
ilm_rollover_alias => "k8s-%{[kubernetes][namespace]}-%{[kubernetes][labels][app]}"
}
#stdout { codec => rubydebug { metadata => true}}
}
}