No ILM history template – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.11-8.9

Briefly, this error occurs when Elasticsearch’s Index Lifecycle Management (ILM) history template is missing. The ILM history template is crucial for managing the lifecycle of indices. To resolve this issue, you can manually create the ILM history template. Alternatively, you can enable the ILM history index by setting the “index.lifecycle.history_index_enabled” to true in the Elasticsearch settings. Also, ensure that the Elasticsearch version supports ILM history templates.

This guide will help you check for common problems that cause the log ” no ILM history template ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, template.

Log Context

Log “no ILM history template” class name is ILMHistoryStore.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 new OriginSettingClient(client; INDEX_LIFECYCLE_ORIGIN)::bulk;
 new BulkProcessor2.Listener() {
 @Override
 public void beforeBulk(long executionId; BulkRequest request) {
 if (clusterService.state().getMetadata().templatesV2().containsKey(ILM_TEMPLATE_NAME) == false) {
 ElasticsearchException e = new ElasticsearchException("no ILM history template");
 logger.warn(
 () -> format(
 "unable to index the following ILM history items:\n%s";
 request.requests()
 .stream()

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?