# Audit log rolling file retention question

**URL:** <https://discuss.elastic.co/t/audit-log-rolling-file-retention-question/283796>\
**Category:** Elasticsearch\
**Created:** [September 9, 2021, 2:49pm UTC](https://discuss.elastic.co/t/audit-log-rolling-file-retention-question/283796 "2021-09-09T14:49:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)\
**Post date:** [September 9, 2021, 2:49pm UTC](https://discuss.elastic.co/t/audit-log-rolling-file-retention-question/283796/1 "2021-09-09T14:49:12Z")

</div>

Our elasticsearch \_audit.json files get rolled over daily to -audit-YYYY-MM-DD.json files and appear to be kept for 8 days. For some test nodes, I'd like to reduce the number of days these are kept for disk space usage. I can't find any place in the audit options or settings that controls the retention, is there a retention days option?

This in version 7.13.2

Thanks

---

<div class="post-metadata">

**Author:** ![sholzhauer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sholzhauer/32/110282_2.png) [@sholzhauer](https://discuss.elastic.co/u/sholzhauer)\
**Post date:** [October 4, 2021, 7:30am UTC](https://discuss.elastic.co/t/audit-log-rolling-file-retention-question/283796/2 "2021-10-04T07:30:23Z")

</div>

Hi rugenl,

Did you have a look at the log4j configuration options noted in [the documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/logging.html)?

Possibly the `appender.rolling.strategy.action.condition.nested_condition.age` option can help you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 1, 2021, 7:30am UTC](https://discuss.elastic.co/t/audit-log-rolling-file-retention-question/283796/3 "2021-11-01T07:30:59Z")

</div>

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