u/Alerintek

Automatically deleting old data to avoid storage getting full.

I am in a situation where I have deployed elastic via ECK onto some kubernetes clusters and I am getting a large volume of logs that is somewhat un-predictable. I want to both delete data when it is past a certain age (easy) and also delete the oldest data when my PVC storage is 80% full (hard / not possible?).

Does anyone know how to do this? I can't come up with a good way to delete the oldest data that doesn't involve leaving elastic and writing some script to query how full my storage is and then query the oldest indices and delete them, but this feels hacky.

reddit.com
u/Alerintek — 12 days ago