Calculate accumulated storage size instead of each index size

OpenSearch 2.5.0

Describe the issue:
min_size condition in Index Management is used to calculate storage size of all primary shards of one index. Is there any way to calculate accumulated storage size used by all indices starting with name debug_ and delete those indices if it crosses specific size ?

1 Like

This isn’t exactly your use case, but I have a python script that is sort of approaching what you’re trying to do. Given an index pattern, it will check to see if the indices exceed a threshold and then delete the oldest indices in the pattern until it goes underneath that size. You might be able to adapt it to fit your needs.

1 Like

Thanks for the script @tlacuache .I’ll give it a try.

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