Is it possible to use a scripted condition in an ISM policy?

I’d like to snapshot and then delete an index only after it has gone X days without any writes (i.e., “idle for X days”).

I don’t see a way to reference “last-write time” with the standard ISM transition keys (min_index_age, min_size, etc.). Can ISM accept a Painless script (or similar) in the conditions block, or is an external job/Lambda the only solution?

Any examples or pointers would be appreciated—thanks!

@offirsarid As far as I’m aware conditions in the ISM are declarative. They don’t support any scripting.

The available options are listed in the UI and OpenSearch documentation. ISM doesn’t transition based on the last index write.

Did you consider Job Scheduler?

I used some internal schedular for this, thanks anyway!

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