Why failed OpenSearch ISM policies silently stop retention
When an index keeps growing or never gets deleted even though the retention policy says it should, the usual cause is a managed index that stopped moving through its policy and nobody was alerted. Index State Management (ISM) is the OpenSearch feature that automates this lifecycle. It is part of the open-source OpenSearch project under the Apache License, Version 2.0, so there is no paid tier to check before you rely on it. An ISM policy defines states such as hot, warm, cold and delete, and each state contains actions such as rollover, transition, delete and notification. Once a policy is attached, every index it manages is tracked as a managed index that moves from state to state as its conditions are met. A failure does not usually stop the cluster or raise a red status. The managed index simply sits in one state, and the retention you designed never runs.
You need to look at policy failures as soon as storage use diverges from the retention plan, before disk pressure forces a more visible incident. Typical signals include indexes older than the retention window that still exist, a write index that keeps growing past its expected size, or policy metadata showing an index that has not changed state for longer than its schedule allows. The first place to look is the Index Explain API, which reports each managed index's current state, the action it is on, and any failure information. Teams should also confirm which policies are attached to which indexes, since a template or alias change can attach a policy to indexes it was never meant to manage. Plan for this check as part of routine operations, and confirm with your own environment how often ISM job runs and failure states are reviewed and alerted on, because the defaults your team relies on should be verified in your version of the OpenSearch documentation.
How to find the stuck managed index with the explain API
This sequence moves from a list of managed indexes to a single diagnosis of why one index stopped progressing, so the team picks the right fix and confirms the index is back on its expected path. It is the diagnostic step that comes before any policy, alias or retry change.
List the managed indexes and their status
Run the Managed Indexes API (
GET _plugins/_ism/explain) against the cluster, using a wildcard pattern if the affected indexes share a naming scheme. Someone with the ISM admin rights on the cluster runs it, usually from the Dev Tools console in OpenSearch Dashboards or with curl. Note which indexes show a policy ID but have not advanced through their states for longer than your retention schedule expects. The step is done when you have a short list of candidate indexes and the policy each one is attached to.Call the Index Explain API for the affected index
Run
GET _plugins/_ism/explain/<index-name>for the index you selected. The response shows the policy ID, the current state, the current action and its status, and any failure information the ISM plugin recorded. Save the full response in your change ticket so the diagnosis can be reviewed later. The step is done when you can name the state and action where the index stopped.Read the failure information and error type
Read the failure block in the explain output and classify the problem. Validation failures from ISM error prevention are reported here, which covers rollover attempts on an index that is not the write index, an index without an alias, or an index without the rollover_alias setting. Other failures, such as a missing policy, a blocked index or a failed snapshot, show different messages. The step is done when you have a single written cause that matches the failure text, not a guess from the policy name.
Check the policy definition and the alias state
Fetch the policy with
GET _plugins/_ism/policies/<policy-id>and compare the rollover conditions and action settings with what the failing state expects. Then check the aliases on the index withGET <index-name>/_alias, and confirm which index carries the write flag for the alias named in rollover_alias. The step is done when you know whether the policy definition, the alias configuration or the index's runtime state is the source of the failure.Choose the fix: policy change, alias change or state retry
Use the diagnosis to pick one path. A policy change fits when the action settings or conditions are wrong, and it is applied through the policy update API with the sequence number and primary term that the policy currently holds. An alias change fits when the index has no alias or the wrong write index, and it is made with the aliases API. A state retry fits when the cause is fixed and the managed index is stuck on a failed action, and it is made with the retry API. Record which path you chose and why before you make the change. The step is done when the change request names one path.
Apply the change and retry the managed index
Make only the change chosen in the previous step, then run the retry call if that path requires it. Keep the same index and policy names so the explain output stays comparable before and after. Avoid making several changes at once, because a later result will not show which one helped. The step is done when the change call returns a successful acknowledgement and the change is recorded in the ticket.
Confirm the index is back on its expected state
Run the explain call again for the same index and check that the policy ID is unchanged, the state and action have moved past the failed point, and the failure block is cleared or no longer repeats. Then check the index again after the next scheduled ISM job interval, because a single improved response does not prove the policy is progressing. Confirm the alias and write index are still correct, and check that the retention step you expected, such as rollover or deletion, has happened or is scheduled. The step is done when the explain output shows normal progress and the owner signs off the ticket.
What ISM action validation checks before a rollover runs
ISM error prevention checks an action before it runs, and it reports the outcome in the Index Explain API. For rollover, that check decides whether the action can proceed at all. Before you change anything, run the Index Explain API against the affected index and read the reported information for the managed index, not only the policy state. The validation result is where you see why the action did or did not happen, so it should be your first stop when a rollover is not occurring.
Rollover is skipped in three situations covered by the supplied facts: the index is not the write index, the index has no alias, or the rollover_alias setting is missing from the index settings. Check each one. Confirm with GET _alias that the alias points to the index you expect, that the index is marked with is_write_index set to true, and that the index settings include index.plugins.index_state_management.rollover_alias with the same alias name. A rollover target that is a plain index without an alias, or an alias with no designated write index, will never roll.
A skipped rollover can look like a policy that simply does nothing. The managed index moves through its states, the policy shows as attached, and no error appears in the place operators usually look, so the retention schedule seems to be running while indexes keep growing. The fix is to treat a skip as a configuration fault on the index or alias, not as a timing issue, and to confirm the skip reason through the explain output before you wait for the next policy cycle. Ask your platform team to add a check on these three conditions to any index template that uses ISM rollover.
Common rollover failures and what each one needs
This table compares five situations where an ISM rollover is skipped or fails, with the symptom to look for in the explain output, the underlying cause and the fix. Use it after you have confirmed the policy action itself is valid, since the rollover conditions are only evaluated once the index is set up correctly. Confirm any other causes against the ISM docs for your exact OpenSearch version.
| Failure situation | Symptom in the explain output | Cause and fix |
|---|---|---|
| Missing alias | Rollover is skipped and the reported reason points to the index having no alias | The index has no alias named in the rollover action. Add the alias to the index, or create the index with the alias set as its write alias, then rerun the policy step. |
| Index not the write index | Rollover is skipped because the index is not the write index of its alias | An older backing index still carries the alias but a newer index is the write target. Confirm which index holds the write index flag, then set the intended index as the write index or let the newest index take over. |
| Missing rollover_alias setting | Rollover is skipped because the rollover_alias setting is absent from the index | The index settings do not name the alias that rollover should use. Set rollover_alias on the index to the alias you rely on, then reapply the policy so the managed index picks it up. |
| Wrong policy attached to a template | Indexes match the template but the explain output shows an unexpected policy or no rollover action | The index template points at a policy that does not contain the rollover step you expect. Update the template to reference the correct policy, then check new indexes, since existing indexes keep the policy they already received. |
| Index created outside the template | The index shows no managed policy or a policy that differs from the intended one | The index was created by a client or script before or without the template matching it. Attach the policy to that index explicitly, then fix the creation path so future indexes match the template. |
Fixing stuck indexes by situation: rollover, delete or retry
A rollover action that never completes usually means the index does not meet the conditions ISM expects before it rolls. The most common causes are that the index is not the write index, the alias named in the policy does not point to it, or the rollover_alias setting is missing. ISM checks these before it runs the action and reports the outcome in the Index Explain API, so start there rather than changing the policy first.
- Confirm the alias: Check that the alias in the policy exists and resolves to the index you expect, using the alias APIs.
- Confirm the write index: The index must carry
is_write_indexset to true under the alias. Without it, rollover is skipped. - Set
rollover_alias: Add theindex.plugins.index_state_management.rollover_aliassetting to the index if it is absent, then rerun the explain call. - Fix the alias or write index first: Repair the alias before editing the policy, since a policy change does not repair the index it manages.
- Retry after the fix: Use the retry operation only after the explain output no longer reports the rollover precondition as failed.
After each change, rerun the Index Explain API and confirm the managed index advances to the next state before you close the ticket.
A delete step that never runs is often a policy condition that is never met, a state transition that is blocked by an earlier action, or an index that another process keeps writing to. Deletion is irreversible, so confirm the cause before anything is removed. Check the policy's conditions, such as minimum age or document count, against the index's actual creation date and contents.
- Read the conditions: Compare the policy's age or size thresholds with the index metadata reported by the explain output.
- Check for blocking actions: An earlier action that is stuck in a failed or waiting state prevents the delete step from starting.
- Confirm no writers remain: Verify that applications and pipelines no longer write to the alias before deleting anything, or you may delete data still in use.
- Confirm retention is intended: Ask the data owner whether the index is covered by a legal hold or an audit retention requirement before it is removed.
- Snapshot before deletion: Where a snapshot repository exists, take a snapshot of the index first so that a mistaken delete can be recovered.
Record the explain output and the approval for the delete in your change record, because retention decisions are often reviewed later.
A managed index in a failed state has stopped at an action that returned an error. The explain output names the step and the failure reason. Treat the error as the diagnosis, and correct the underlying condition before retrying, because a retry that repeats the same failing condition will fail again and may leave the index in a worse position.
- Read the failure reason: Identify the failed action and its message in the explain output before changing anything.
- Correct the cause: Fix the alias, write index, setting, mapping or resource problem that produced the error.
- Retry the failed step: Use the managed index retry operation once the cause is corrected, and confirm the step completes.
- Change the policy only when needed: Edit the policy only if the policy itself is wrong, and apply the change to the affected indexes in a controlled way.
- Do not remove the policy blindly: Before removing a policy or detaching it, list every index it manages, because removal can leave indexes without the lifecycle rules their owners expect.
Finish by confirming the managed index reports a running or completed state and that no other indexes are attached to a policy you changed.
How an ISM policy moves an index through its states
The diagram starts where ISM evaluates a managed index against its policy on each job interval. Before a rollover action runs, ISM validates it: the index must be the write index, must sit behind an alias, and must carry the rollover_alias setting. When validation passes, the index moves on to the next state. When it fails, the failure is recorded and surfaces in the Index Explain API, where an operator checks the reason and fixes the alias, write index or setting before the index can continue.
ISM validates each rollover before it runs and reports failures in the Explain API.
How to keep retention policies from failing again
Most ISM failures trace back to a few repeatable gaps: index templates that drift from the policy, unclear ownership of the write index, and policy edits that reach production untested. The cards below cover the controls that close those gaps and make failures visible before retention falls behind.
Standardize rollover aliases in templates
Set index.plugins.index_state_management.rollover_alias and the matching alias in the index template that creates each new index, not by hand after creation. Rollover is skipped when the alias or setting is missing, so a template that omits them produces indexes that look healthy but never roll over. Check a sample of newly created indexes after each template change, and confirm the alias points to exactly one write index.
Assign write index ownership
Name one team or service as the owner of each rollover alias and document which index currently holds the write flag. Applications that write through an alias should never address a concrete index name, because a manual rollover or a restored snapshot can leave two indexes claiming the write role. Ownership matters most when a retention policy is applied to a shared alias used by several teams.
Test policies on a non-production index
Before attaching an ISM policy to production data, apply it to a disposable index that has the same mapping, alias and template settings. Use the Index Explain API to confirm each state transition, the action results and the step that runs next. Testing against a clone with the same naming pattern catches validation errors that would otherwise appear only after the first rollover date.
Monitor managed index failures
Track indexes whose policy info reports a failed step, and alert on them instead of waiting for storage to fill. Query the Explain API on a schedule and export the failure reason and step name to your monitoring stack. A failed retention step is quiet by default, so an alert on the first failure saves the investigation of several weeks of unexpected index growth.
Put policy edits under change control
Store ISM policy definitions and index templates in version control and promote them through the same review path as application code. Record who changed a policy, why, and which indexes it applies to, and note that changing a policy does not always rewrite the state of indexes already managed. Roll back by reapplying the previous reviewed definition, not by editing a live policy in place.
Questions teams ask before fixing ISM policies themselves or hiring help
How much effort does one stuck ISM policy take compared with a fleet-wide review?
A single stuck policy is usually a bounded task: read the Index Explain output, confirm the failing action, fix the alias, write index or setting, and verify the index moves on. A fleet-wide review takes longer because it repeats that check across every policy, index pattern and template, and looks for the same fault before it fails in production. The effort for either depends on how many policies exist, how consistently they were written, and whether the cluster has other problems such as disk pressure. No figure applies across clusters, so ask for the number of policies and index patterns in your estimate.
What drives the scope of an ISM policy review?
The main drivers are the number of ISM policies and index templates, how many indexes each policy manages, and whether policies were applied by hand or through templates. Scope also grows with the number of rollover aliases, the mix of OpenSearch versions in use, and any custom actions. Teams should expect the review to cover retention rules tied to compliance or legal holds, because a wrong delete action can remove data that must be kept. Ask the provider which of these drivers it measured before quoting.
What does the work need from our team?
The work needs read access to the cluster and its ISM and index APIs, exports of current policies and index templates, and the naming conventions used for indexes and aliases. It also needs an owner who can explain why each retention period exists and who approves changes to deletion behavior. Access should follow your security policy, so ask whether a read-only role is enough for the diagnosis phase and which write permissions are needed for the fix phase.
Can our internal team fix ISM policies without outside help?
Often yes, for a small number of policies, if an engineer can read the Index Explain API output, understand rollover conditions and test changes outside production. The harder cases are fleets with inconsistent naming, policies that delete data under regulatory retention, or failures that come from disk watermarks or cluster health rather than the policy itself. Internal teams should test each change on a non-production copy first. The OpenSearch ISM error prevention documentation describes how actions are validated and reported, which is a good baseline for an internal review.
How is a fixed-scope engagement agreed in writing?
DeployOpen agrees scope, deliverables and timelines in writing before work starts, so the quote follows from a defined scope rather than an open-ended hourly arrangement. A written scope for an ISM review usually lists the clusters and policies covered, the access used, the findings format, the fixes included and any retest. Ask that the document name what is out of scope, such as changes to retention periods that need a business decision, and who signs off on production changes.
Does DeployOpen offer ongoing retainers for ISM policy health?
Yes. DeployOpen offers ongoing support, upgrades and continuous testing as retainers, so policy health checks can continue after an initial fix. A retainer suits teams whose indexes, templates or OpenSearch versions change often, because new policies can introduce the same rollover or alias faults. Ask what the retainer includes, how often checks run, how changes are requested and how fixes are tested before they reach production.
What should we check in our own environment before asking for a quote?
Collect the policy count, the index patterns each policy targets, the rollover aliases in use and the OpenSearch version. Note which indexes have stopped rolling over or deleting and any compliance rules that govern retention. Confirm whether a staging cluster exists for testing. These details let a provider estimate the work from your environment rather than from a generic figure, and they show whether the problem is limited to policies or also involves cluster health.
How DeployOpen reviews and repairs ISM policies in your cluster
DeployOpen starts an ISM repair with a scoping conversation, not a change to the cluster. We agree in writing which clusters, index patterns and policies are in scope, who in your team owns retention decisions, and which change windows and approvals apply. DeployOpen implements, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure, so the review runs in your accounts, data centers or air-gapped network, and your team keeps control of the credentials and admin access used for it. Confirm early whether any policies feed legal hold, audit or retention commitments, because those change what counts as an acceptable fix.
The read-only review covers every policy attached to the affected indexes, the index templates and aliases that assign those policies, and the managed index state reported for each index through the Index Explain API. For each stuck index we record the current action and step, the error message, whether the index is the write index, whether it has the alias named in the rollover_alias setting, and whether the policy actions passed the validation described in the ISM error prevention documentation. The review also checks who can change policies, so the root cause of a repeated failure is not left in place.
The fix plan lists each change, its expected effect and a rollback step before anything is applied. Typical changes include correcting an alias or write index assignment, adding the missing setting to a template, or retrying a failed step once its cause is removed. Each change is tested on a copy of the policy or on a non-production index where possible, and the plan records the exact _plugins/_ism calls and the policy version to restore. Verification then uses the explain output again: the index should move to the expected state and action, and the next scheduled transition should run without an error. Agree with your team which indexes are checked for a set period after the fix, and who signs off that retention behavior matches the written policy.
How DeployOpen scopes, delivers and supports OpenSearch operations
DeployOpen approaches failed ISM policies as an operational fix with a written scope. We start by reading the policies, index patterns and aliases actually in use, then work through the explain output and the cluster's configuration to find the cause before changing anything. Every change is documented so your own team can repeat the fix.
How we scope
- Inventory every ISM policy, its index patterns and the indexes currently stuck in a managed state.
- Confirm the OpenSearch version and which rollover and retention actions your policies depend on.
- Agree in writing which policies, indexes and clusters are in scope, and what is handed over at the end.
How we build
- Work through the Index Explain API output for each stuck index to identify the failed step and its message.
- Check rollover prerequisites such as write index status, alias presence and the rollover_alias setting before editing policies.
- Test corrected policies on a non-production copy of the affected indexes, then apply them with a documented rollback plan.
How we hand over
- Deliver a written record of each root cause, the policy or alias change made and the verification steps run.
- Document a checklist your team can run with the Index Explain API when a managed index stops advancing.
- Walk your operators through the fixes and the naming and alias conventions that prevent repeat failures.
How we support
- Engagements are fixed-scope, and ongoing support, upgrades and continuous testing are available as a retainer.
- Confirm with DeployOpen what response and review arrangements a retainer includes before signing.
- Re-check policy health after cluster upgrades or new index template rollouts that could change rollover behavior.

