Clean old indexes automatically in elasticsearch

Hello friends,

I'm having problems with the storage where elasticsearch is installed... I'm constantly having a full disk. What can I do to delete or clean up old indexes?

Hi @Joao_Malebo

What version are you on?

The problem you describe is exactly what Index Lifecycle Management is for.

2 Likes

How are indices named? indexnam_yyyy.dd perhaps? In that case, you could use curl or job to delete index directly on ES via APIs. This is a workaround.

However, ILM is only solution if you want to be a human. :slight_smile:

The Elasticsearch version is: 8.4.3.

Your link looks good, I'll check it out to be sure.

The indexes are named as follows:

green open .monitoring-kibana-7-2023.01.18
yellow open .ds-metricbeat-8.4.3-2023.01.13-000004

Can you share a script you've already made

Solved:

1 Like

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