I've created a life cycle policy and added it to an index-template.
In the policy I've enabled the hot phase which will rollover the index if max_docs is 50 or max_age is 1h.
Now the problem is that the new indices are created only when the document count exceeds 150.
Below is my life cycle policy
"logstash-policy" : {
"version" : 4,
"modified_date" : "2019-09-17T12:59:47.001Z",
"policy" : {
"phases" : {
"hot" : {
"min_age" : "0ms",
"actions" : {
"rollover" : {
"max_docs" : "50",
"max_age" : "1h"
}
}
}
}
}
}
Index settings:
"index": {
"lifecycle": {
"name": "logstash-policy",
"rollover_alias": "logstash",
"indexing_complete": "true"
},
"number_of_shards": "5",
"provided_name": "<logstash-000004>",
"creation_date": "1568725169438",
"number_of_replicas": "1",
"uuid": "YJOVjP2UT1etiVF-dYazeA",
"version": {
"created": "6060199"
}
}
}