Automatically remove old reports

Hi the community.

I've alerters that generates multiple report once per week sent per mail automatically. Reports older than 2 weeks are not necessary and I want to be able to setup an automatic cleaning of those reports.

Is there an easy way to do it rather than manually doing the cleaning in the interface or launching manually a command?

The safest way to delete Reports from ES directly is:

POST /.reporting-<>/_delete_by_query
{ "query": { "match_all": {} } }

That deletes the documents, but not the index completely, making the mappings still correct for the index. That's the safe thing to do if you need to delete recent reports.


With respect to @dadiasish, delete by query is not the best approach.

If your reports are time based then you should look at suign ILM.

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