Hello Team,
I hope you are doing well.
I am currently facing an issue related to Wazuh indices retention.
Earlier, I had configured the indices retention policy for 90 days. Later, I changed the retention period to 30 days. However, after updating the policy, the indices older than 30 days are not being deleted automatically.
Additionally, I noticed an error related to index management, which I have pasted below. The error indicates a high disk usage issue. However, the Wazuh server is currently utilizing only about 66% of the total disk capacity.
[2026-03-29T03:44:59,323][ERROR][o.o.i.i.ManagedIndexCoordinator] [node-1] Failed to clear ManagedIndexMetadata for index uuid: [tVGHjt6WSU6bqtSncOrOLg#metadata], failureMessage: ClusterBlockException[index [.opendistro-ism-config] blocked by: [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block];]

Could you please help me understand why the indices are not being deleted according to the updated retention policy and advise on how to resolve this issue?
Thank you for your assistance. I look forward to your guidance.
Regards,
Chandra
Could you please share the output of the following commands?
1. Cluster health
3. Verify whether indices are still blocked
Your 67% current usage is real and fine, but it's the current state, not the state when the watermark tripped. The block is a leftover, not a live reflection of disk usage right now.
The fix 1. Remove the read-only block manually (this is the actual unblock step)This clears the block cluster-wide. Specifically target .opendistro-ism-config too if you want to be surgical first:
Confirm read_only_allow_delete no longer appears (or shows false/absent).
Please share the requested outputs, and we will help you investigate further.
1. Cluster health

3. Verify whether indices are still blocked
Hello Chandra,
Thank you for sharing the outputs.
From the cluster health output, I can see that the cluster is currently in a yellow state:
Since this is a single-node cluster, the yellow status is expected if replica shards cannot be allocated.
The 403 error — this is the important one for your original ISM problem
This is not a normal RBAC permission gap — .opendistro-ism-config is a protected system index in the OpenSearch Security plugin. Even a user with the admin backend role is blocked from directly modifying system indices via the standard REST API + basic auth, by design — this is a hardening feature so that a compromised or misconfigured admin account can't tamper with security-critical internal indices.
To modify a protected system index, you need to use the actual TLS admin certificate:
System index protection requires authenticating with the admin client certificate configured in opensearch.yml under plugins.security.authcz.admin_dn, not just basic auth with an admin role. Find your admin cert/key (usually named something like admin.pem / admin-key.pem in /etc/wazuh-indexer/certs/ or similar):
This bypasses the basic-auth RBAC layer entirely and authenticates as the actual cluster admin identity trusted at the transport/TLS level — this is the account that's allowed to touch protected system indices.
Regards,


Thank you for sharing the screenshots.
Based on the errors shown, there are actually two different issues:
1. Using the private IP addressThe error: curl: (7) Failed to connect to <IP> port 9200: Couldn't connect to server
indicates that nothing is listening on port 9200 for that IP address, or the connection is being blocked by a firewall/security group.
Please first verify that the Indexer service is running and listening on port 9200:
The error: curl: (60) SSL: no alternative certificate subject name matches target host name 'localhost'
indicates that the certificate was not issued for the hostname localhost. To bypass hostname verification for testing purposes, please use the -k option:
Alternatively, use the node hostname that matches the certificate Subject Alternative Name (SAN) instead of localhost.
Please share the output of the following commands:
This will help us confirm:
Once you share the outputs, we can provide the exact command required for your environment.



Hello Chandra,
Thank you. This confirms the fix was applied successfully. The {"acknowledged":true} response means the read-only block has been cleared cluster-wide, and the indexer service itself is healthy and stable.
Next step — please verify ISM is now actively processing the retention policy:
Please share the output specifically; look for each index's policy_id (should show alert-retention-policy) and whether it's actively stepping through states rather than stuck. This will confirm that indices older than 30 days are now being picked up for deletion on the next ISM check cycle.
If any older indices are still present after the next cycle completes, we can manually force a retry with:
Regards,
Hello Chandra,
Thank you. This output confirms everything is working correctly now.
All 30 currently managed indices show step_status: "condition_not_met", which simply means ISM is actively evaluating each index against the 30-day retention rule, and none of the remaining indices have crossed that threshold yet — the oldest one (wazuh-alerts-4.x-2026.06.10) is exactly 30 days old as of today, so it's right at the edge and should transition to deletion on the next check cycle.
This is the expected, healthy state — not an error. The manual deletion of the older indices via the UI was a helpful one-time cleanup of the backlog that had built up while ISM was blocked; going forward, you shouldn't need to do that again, since ISM is now correctly tracking and will automatically delete each index once it passes 30 days old.
Please re-check the explain output tomorrow — you should see wazuh-alerts-4.x-2026.06.10 disappear from the list on its own (transitioning to the delete_alerts state and being removed), without any manual action needed. If that happens as expected, this issue is fully resolved.
Regards,
Hello,
Thanks for the details "configured correctly" and "not deleting automatically" is a very common combination, and it's usually one of a handful of underlying causes.
Could you share the explain output along with current CPU/RAM/heap usage? That should tell us whether this is a policy-attachment gap or resource starvation on the indexer.
Regards,




Thanks for sending these over. Looking at the top, free -h, and _nodes/stats output:
So resource exhaustion is not why the index isn't being deleted.
From the ISM, explain the output (Image 1), it shows "step_status" : "condition_not_met" for the index 2026.06.20 so can you share the output for the 30-day-old index that should be deleted by policy?
curl -k -u <user>:<pass> "https://<indexer-host>:9200/_plugins/_ism/explain/wazuh-alerts-4.x-2026.06.10?pretty"
Can you share the actual policy definition? Run:
I want to see the exact min_index_age value (and units) configured on the transition condition under the initial state
Once I see the policy JSON, I can pinpoint exactly which condition is blocking the transition.


Run the ISM Update Managed Index API against the affected indexes:
This tells ISM: "drop your cached version, re-fetch the current policy document, and re-evaluate against it." After running this, re-check the explain endpoint — it should now show policy_seq_no: 20399194 and policy_primary_term: 111, and since the index is already 36 days old, it should transition to delete_alerts on its next ISM cycle (ISM runs on a scheduled interval, typically every few minutes by default).
In the future, whenever this policy is edited, the update call above should be run against wazuh-alerts-* to keep all managed indices in sync — otherwise this same drift will just recur silently.

Following up on the retention policy issue — please try the approach below to force the index to re-sync with the current policy version.
Remove the policy, then re-apply it fresh:
This is a harder reset — it fully detaches and reattaches the index to the policy, so it picks up the current version with no old reference left behind.
Verify the fix (run after either approach)Please confirm the output shows:
Since this index is already past the 30-day threshold, it should transition to delete_alerts on ISM's next scheduled evaluation cycle once it's synced correctly.
Best regards,
Hi Team,
Could you please share the latest output of the explain command so I can see exactly where it's stuck now?
Specifically, I need to check:
Also, please confirm:
Once I see the fresh explain output, I can pinpoint whether this is still a sync issue, a different condition blocking the transition, or something at the ISM job scheduler level (e.g., the job interval not having run yet, or being disabled).
Best regards,
Hello Himanshu,
The issue is resolved now. Sorry, the mistake was on my side. I had applied the policy only to the latest alert indices, so it wasn't working as expected. The policy would have started working only after 30 days from the date it was applied to those latest indices, which is why the transition state was not working as we expected.
Later, I detached the policy and applied it to all the previous indices as well, and now it is working fine as expected.
Thanks for your support.