Using Index Life cycle Management

I have created a index life cycle management which is working absolutely fine..now I am planning to attach ilm policy during the indices creation. I guess this can be achieved via creating template but I am confused here so can i get a little help?????

Yep, see https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-index-lifecycle-management.html#ilm-gs-apply-policy

But I will have to run that code. Is there anyway via which I can defined ilm in my logstash (.conf) file?????

If you created your own index template in a file and then referred to that, yes.

When I am trying to create a template I am getting an error. I am using this as a reference: "https://www.elastic.co/guide/en/elasticsearch/reference/6.7/indices-templates.html"

Perhaps if you share the error we can assist in resolving it.

Sure..
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [created_at : {format=EEE MMM dd HH:mm:ss Z yyyy, type=date}] [host_name : {type=keyword}]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [properties]: Root mapping definition has unsupported parameters: [created_at : {format=EEE MMM dd HH:mm:ss Z yyyy, type=date}] [host_name : {type=keyword}]",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [created_at : {format=EEE MMM dd HH:mm:ss Z yyyy, type=date}] [host_name : {type=keyword}]"
}
},
"status": 400
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.