Deleting indices older than 30 days with policy problem

I am using an application that creates daily indices, using legacy index template. Two types of indices are created: jaeger-spans-date and jaeger-services-date (where date is the date produced).

Using the kibana UI, I created a very simple policy, to delete indices older than 30 days. I then added the two templates (they are legacy templates). I did this by selecting the plus sign on the right of the policy (see screenshot) and then selecting the legacy templates. However the policy shows again zero templates (see screenshot)

As probably expected, the already created indices that are older than 30 days are not deleted.

here are the settings of one of the legacy jaeger templates:
(note that it mentions the policy in the overview section)


{
  "index": {
    "lifecycle": {
      "name": "jaeger"
    },
    "mapping": {
      "nested_fields": {
        "limit": "50"
      }
    },
    "requests": {
      "cache": {
        "enable": "true"
      }
    },
    "number_of_shards": "5",
    "number_of_replicas": "1"
  }
}

{
  "_doc": {
    "dynamic_templates": [
      {
        "span_tags_map": {
          "path_match": "tag.*",
          "mapping": {
            "ignore_above": 256,
            "type": "keyword"
          }
        }
      },
      {
        "process_tags_map": {
          "path_match": "process.tag.*",
          "mapping": {
            "ignore_above": 256,
            "type": "keyword"
          }
        }
      }
    ],
    "properties": {
      "operationName": {
        "ignore_above": 256,
        "type": "keyword"
      },
      "serviceName": {
        "ignore_above": 256,
        "type": "keyword"
      }
    }
  }
}

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