Rollover alias [mylogs] can point to multiple indices

I am getting above mentioned error, following are the steps which I am doing.

  • Created ILM policy
PUT _ilm/policy/mylogspolicy
{
  "policy": {
    "phases": {
      "hot": {
        "actions": {
          "set_priority" : {
            "priority": 100
          },
          "rollover" : {
            "max_docs": 2
          }
        }
      },
      "cold": {
        "min_age": "1h",
        "actions": {
          "readonly" : { },
          "set_priority" : {
            "priority": 75
          }
        }
      }
    }
  }
}
  • Created Template
PUT _template/mylogs-template
{
  "index_patterns": ["logs-*"],
  "settings": {
    "index.lifecycle.name": "mylogspolicy",
    "index.lifecycle.rollover_alias": "mylogs",
    "number_of_shards": 2,
    "number_of_replicas": 1,
    "index.mapping.ignore_malformed": true
  },
  "mappings": {
    "_source": {
      "enabled": true
    },
    "dynamic_date_formats": ["date_time"],     
    "properties": {
      "title": {
        "type": "keyword"
      },
      "created_at": {
        "type": "date",
        "format": "date_time"
      }
    }
  },
  "aliases": {
    "mylogs": {
      "is_write_index": true
    }
  }  
}
  • Created document(based on template index was created)
POST logs-1/_doc
{
  "created_at": "2019-04-30T02:04:15.050Z",
  "title": "Kuch to chalega"
}
  • Once rollover condition is matched, I am checking the explain status for ILM policy on alias
GET mylogs/_ilm/explain

and I am getting following error.

Rollover alias [mylogs] can point to multiple indices, found duplicated alias [[mylogs]] in index template [mylogs-template]
2 Likes

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