Enable debug/trace logs for ISM

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

2.11.0

Describe the issue:

ISM policies get applied intermittently , sometime works and other time it doesn’t . No errors or warning in opensearch logs.

How to enable debug/tracing for ISM only to get more insight into why the policy is not applied all the time. ?

Configuration:

Policy

{
    "id": "dev-clusters-cleanup-20days",
    "seqNo": 19911607,
    "primaryTerm": 68,
    "policy": {
        "policy_id": "dev-clusters-cleanup-20days",
        "description": "A sample description of the policy",
        "last_updated_time": 1697118924759,
        "schema_version": 18,
        "error_notification": {
            "channel": {
                "id": "vhtfI4kBanvl1499-UFq"
            },
            "message_template": {
                "source": "",
                "lang": "mustache"
            }
        },
        "default_state": "initial_state",
        "states": [
            {
                "name": "initial_state",
                "actions": [],
                "transitions": [
                    {
                        "state_name": "delete_state",
                        "conditions": {
                            "min_index_age": "20d"
                        }
                    }
                ]
            },
            {
                "name": "delete_state",
                "actions": [
                    {
                        "retry": {
                            "count": 3,
                            "backoff": "exponential",
                            "delay": "1m"
                        },
                        "delete": {}
                    }
                ],
                "transitions": []
            }
        ],
        "ism_template": [
            {
                "index_patterns": [
                    "dev-*"
                ],
                "priority": 1,
                "last_updated_time": 1696283220647
            }
        ]
    }
}

Relevant Logs or Screenshots:

You can enable debug/trace logs for ISM by configuring this:

PUT _cluster/settings
{
  "persistent": {
    "logger.org.opensearch.indexmanagement": "DEBUG"
  }
}
1 Like

I applied debug setting , I don’t get enough information or errors on logs as to why ISM policies are implemented at times .