Implementation of ISM Policy for Detection of Outdated Indexes

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

Amazon OpenSearch Service 1.2

Describe the issue:

Good morning, I would like to know if there is any direct method or strategy to set up an ISM policy that helps detect indexes that have not been updated for more than 60 days, for example.

Configuration:

{
  "policy": {
    "description": "Policy to close indices after 60 days of inactivity.",
    "error_notification": {
      "destination": {
        "custom_webhook": {
          "header_params": {
            "Content-Type": "application/json"
          },
          "url": ""
        }
      },
      "message_template": {
        "source": "The index {{ctx.index}} failed during policy execution.",
        "lang": "mustache"
      }
    },
    "default_state": "init",
    "states": [
      {
        "name": "init",
        "actions": [],
        "transitions": [
          {
            "state_name": "close",
            "conditions": {
              "min_index_age": "60d"
            }
          }
        ]
      },
      {
        "name": "close",
        "actions": [
          {
            "close": {}
          },
          {
            "notification": {
              "destination": {
                "custom_webhook": {
                  "path": null,
                  "header_params": {
                    "Content-Type": "application/json"
                  },
                  "url": ""
                }
              },
              "message_template": {
                "source": {
                  "@context": "https://schema.org/extensions",
                  "@type": "MessageCard",
                  "summary": "OpenSearch Posted",
                  "themeColor": "0072C6",
                  "title": "Amazon OpenSearch Service Posted",
                  "sections": [
                    {
                      "startGroup": true,
                      "title": "**Index Closure Policy: 60 Days of Inactivity**",
                      "text": "Este índice foi fechado após 60 dias de inatividade, conforme política.",
                      "facts": [
                        {
                          "name": "Nome do índice:",
                          "value": "{{ctx.index}}"
                        },
                        {
                          "name": "UUID do índice:",
                          "value": "{{ctx.index_uuid}}"
                        },
                        {
                          "name": "Nome da política:",
                          "value": "{{ctx.policy_id}}"
                        },
                        {
                          "name": "Região:",
                          "value": "us-east-1 (Framework Arena)"
                        },
                        {
                          "name": "Versão OpenSearch",
                          "value": "v1.2.0"
                        }
                      ]
                    }
                  ]
                },
                "lang": "mustache",
                "options": {
                  "content_type": "application/json; charset=UTF-8"
                }
              }
            }
          }
        ],
        "transitions": []
      }
    ],
    "ism_template": [
      {
        "index_patterns": ["host*"],
        "priority": 1
      }
    ]
  }
}

Relevant Logs or Screenshots:

i thought ISM stands for Index State Management

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