Will legacy index template work after version 8 upgrade?

Hello team,
I currently working on cluster with version 7.17.7 and now I am thinking of upgrading it to version 8.x. I received an API deprecation log that Legacy index templates are deprecated in favor of composable templates. Now at the moment in my cluster I have quite a few of legacy index templates working and they are used in receiving data as well. Now if I upgrade the cluster to version 8.x will these templates still work or I have to scrap all of these templates first and configure Composable templates and then upgrade the cluster.

Regards.

1 Like

Yes. Having just gone through an upgrade from 7.17.7 to 8.4.1 I can confidently say that the legacy templates will continue to be work. But...

You will have a hard time deploying/update your existing templates using Logstash and the logstash-elasticsearch-output plugin with its manage_template => true setting (if you use that) since Logstash will insist on using the new _index_template REST API which will fail horribly. There is supposed to be new template_api => legacy in 8.6, but my tests did not impress me. I do not remember the details but I did not get it work. Could be an error on my part, or it could be an implementation error when combined with ilm_enabled => true.

Thanks for your input. But we actually do use this manage_template => true plugin in our logstash-elasticsearch-output plugin and if what you are saying is true then we are in a pickle. So can anybody from Elastic team suggest the best approach regarding this.
Regards

I think I can share a little script, a combination of Bash, a JQ filter, and Perl, that can transform legacy templates to the new format, but it will have to wait until I am in the office. It is what we have used. The Perl part is not strictly necessary, it just makes the output looks nicer (more compact).

1 Like

Just to be clear: Existing legacy templates that are already defined/deployed in the system will continue to work, and you can still update them trough other means, like the Kibana Dev Tools, or with curl, it is just Logstash that is being stubborn about using the new API.

You can deploy the new format templates on a stepwise manner. Just remember that the new templates will override legacy templates with the same index pattern. And beware of priority versus order. In the new template format a higher PRIORITY actually means a higher priority. In the old format, a low ORDER means higher priority.

1 Like

Thanks,
Will surely take a look at those. Really appreciate the help.

Regards

Ok,
Will take this information into account and work around that accordingly.
Thanks for the update regarding this.

thanks & Regards

I finally got around to put the files up on my GitHub account. Have a look and see if it works for you.

1 Like

Thanks, I'll take a look
Appreciate the help

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