I’m currently working with Camunda 8.7 (self-managed) and I’m looking for a proper way to automatically delete old completed process instances, along with their related Elasticsearch indexes.
Specifically, I want to:
Clean up Zeebe data from completed process instances to free up disk space.
Remove the corresponding Elasticsearch indexes (e.g., zeebe-*, operate-*) to reduce storage usage and improve search performance.
I understand that it’s possible to configure zeebe.data.retentionPeriod, but it seems this only affects Zeebe logs and not the data stored in Elasticsearch (used by Operate, Tasklist, Optimize, etc.).
So my question is:
What is the recommended approach to clean up both completed process instances in Zeebe and their corresponding Elasticsearch indexes?
Is there a best practice for this, or maybe ILM policy examples/scripts?