Hi Team,
we want to delete documents which are older than 30 days for an index from Kibana. Please suggest us how can we do this better. We tried below
POST elastalert_status_status/_delete_by_query
{
"query": {
"range" : {
"@timestamp" : {
"lte" : “now-30d”,
"format": "MM/dd/yyyy||yyyy"
}
}
}
}
Deleting documents only flags these as deleted, so they would not be searched. To reclaim disk space we are running below
POST /ielastalert_status_status/_forcemerge?only_expunge_deletes=true
Is there any way that we can schedule to run in Kibana or do we need to manually run them everytime?