I am trying to put template which can be use to rotate index. these are the steps but not working
PUT _index_template/system-fs
{
"template": {
"settings": {
"index": {
"lifecycle": {
"name": "system-fs",
"rollover_alias": "system-fs"
},
"number_of_shards": "7",
"number_of_replicas": "1"
}
}
},
"index_patterns": [
"system-fs-*"
],
"composed_of": []
}
Then ilm policy
PUT _ilm/policy/system-fs
{
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_size": "100gb",
"max_age": "30d"
}
}
},
"warm": {
"min_age": "1d",
"actions": {
"set_priority": {
"priority": 60
},
"allocate": {
"number_of_replicas": 0
}
}
}
}
}
}
But my index which I use via logstash gets created named "system-fs" without any date? how do I put a date
one of my metricbeat index work like that but then all thing is setup via metricbeat.yml file
setup.ilm.pattern: "{now/d}-000001"
Where do I put this setup in my PUT command?