Closed PhanNN closed 5 years ago
I believe that some (older) versions of ElasticSearch support per-index TTLs, but that's all server-side (i.e. not from the individual log entries). At least for logs, most people end up with time-based indices, like maybe one index per date (logs-20190121) and then just drop entire dates once they are no longer needed.
@abatkin : and we need cronjob or something handle this job instead of ES?
There are a few ways to handle this - a cron job and API calls could certainly work. In past lives, I have used Curator, and there is also a good blog entry from the ES blog about techniques to handle the whole lifecycle of time-based indices.
Oh, Thanks @abatkin 👍
As title, does logback-elasticsearch-appender suport TTL? We don't need to save all logs and I can't find any attribute related to doc or index TTL.