# Dynatrace OneAgent log rotation

**URL:** <https://community.dynatrace.com/t/dynatrace-oneagent-log-rotation/13207>\
**Category:** Logs\
**Tags:** log-monitoring-class, oneagent\
**Created:** [June 28, 2018, 9:35am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-log-rotation/13207 "2018-06-28T09:35:59Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![muthukumar\_peri](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/muthukumar_peri/32/8740_2.png) [@muthukumar\_peri](https://community.dynatrace.com/u/muthukumar_peri)\
**Post date:** [June 28, 2018, 9:35am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-log-rotation/13207/1 "2018-06-28T09:35:59Z")

</div>

Hi,

Does OneAgent logs rotate automatically with any retention period or do we need to put log rotation?

Regards

Muthu

---

<div class="post-metadata">

**Author:** ![Pawel\_Popielars](https://avatars.discourse-cdn.com/v4/letter/p/51bf81/32.png) [@Pawel\_Popielars](https://community.dynatrace.com/u/Pawel_Popielars)\
**Post date:** [July 19, 2018, 9:46am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-log-rotation/13207/2 "2018-07-19T09:46:31Z")

</div>

Hi,

OneAgent rotates logs automatically, plus there are rules for removing older logs so that a disk space is not taken needlessly.

In extreme circumstances, when free space becomes less than configured and an alert will be presented for the host, OneAgent will perform full cleanup. That means almost all its logs will be removed. Only installation logs remain plus the one log, which explains why the purge happend.

---

<div class="post-metadata">

**Author:** ![muthukumar\_peri](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/muthukumar_peri/32/8740_2.png) [@muthukumar\_peri](https://community.dynatrace.com/u/muthukumar_peri)\
**Post date:** [July 19, 2018, 11:15am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-log-rotation/13207/3 "2018-07-19T11:15:19Z")

</div>

Thanks, Pawel.

Could you please let me know on which configuration file I can see the default values defined for one agent?

Regards

Muthu

---

<div class="post-metadata">

**Author:** ![Pawel\_Popielars](https://avatars.discourse-cdn.com/v4/letter/p/51bf81/32.png) [@Pawel\_Popielars](https://community.dynatrace.com/u/Pawel_Popielars)\
**Post date:** [July 19, 2018, 12:16pm UTC](https://community.dynatrace.com/t/dynatrace-oneagent-log-rotation/13207/4 "2018-07-19T12:16:42Z")

</div>

Hi,

Could you specify what default values you are referring to?

We usually keep 5 files, which are at most 10 MB in size.

“Low disk space” threshold, when logs will be purged, can be configured through the UI for each host.

Click on host, click on edit, click on “Anomaly detection” and you can set thresholds for different events including low disk space.

---

<div class="post-metadata">

**Author:** ![muthukumar\_peri](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/muthukumar_peri/32/8740_2.png) [@muthukumar\_peri](https://community.dynatrace.com/u/muthukumar_peri)\
**Post date:** [August 1, 2018, 12:43pm UTC](https://community.dynatrace.com/t/dynatrace-oneagent-log-rotation/13207/5 "2018-08-01T12:43:40Z")

</div>

Hi,

Sorry for the delayed response. As you are saying “_We usually keep 5 files, which are at most 10 MB in size_”. Where this is defined?

Regards

Muthu

---

<div class="post-metadata">

**Author:** ![Pawel\_Popielars](https://avatars.discourse-cdn.com/v4/letter/p/51bf81/32.png) [@Pawel\_Popielars](https://community.dynatrace.com/u/Pawel_Popielars)\
**Post date:** [August 1, 2018, 1:06pm UTC](https://community.dynatrace.com/t/dynatrace-oneagent-log-rotation/13207/6 "2018-08-01T13:06:12Z")

</div>

Hi,

The “5 files, 10MB each” is not something that is user-configurable at this time.

Regards,

Pawel

---

<div class="post-metadata">

**Author:** ![muthukumar\_peri](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/muthukumar_peri/32/8740_2.png) [@muthukumar\_peri](https://community.dynatrace.com/u/muthukumar_peri)\
**Post date:** [August 1, 2018, 1:32pm UTC](https://community.dynatrace.com/t/dynatrace-oneagent-log-rotation/13207/7 "2018-08-01T13:32:30Z")

</div>

Thanks, Pawel.

---

<div class="post-metadata">

**Author:** ![suresh230591](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suresh230591/32/280_2.png) [@suresh230591](https://community.dynatrace.com/u/suresh230591)\
**Post date:** [October 3, 2018, 11:21am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-log-rotation/13207/8 "2018-10-03T11:21:57Z")

</div>

Pawel,

What is the default rotation period.?

---

<div class="post-metadata">

**Author:** ![Pawel\_Popielars](https://avatars.discourse-cdn.com/v4/letter/p/51bf81/32.png) [@Pawel\_Popielars](https://community.dynatrace.com/u/Pawel_Popielars)\
**Post date:** [October 8, 2018, 8:13am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-log-rotation/13207/9 "2018-10-08T08:13:47Z")

</div>

Hi Suresh,

By “period”, you mean time when logs are rotated?

If yes, OneAgent does not have time-based rotation of logs. Rotation is based on size and number of log files.

---

<div class="post-metadata">

**Author:** ![suresh230591](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suresh230591/32/280_2.png) [@suresh230591](https://community.dynatrace.com/u/suresh230591)\
**Post date:** [October 8, 2018, 8:44am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-log-rotation/13207/10 "2018-10-08T08:44:41Z")

</div>

Thanks Pawel,

What is the limit on size and number of files

---

<div class="post-metadata">

**Author:** ![Pawel\_Popielars](https://avatars.discourse-cdn.com/v4/letter/p/51bf81/32.png) [@Pawel\_Popielars](https://community.dynatrace.com/u/Pawel_Popielars)\
**Post date:** [October 8, 2018, 8:53am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-log-rotation/13207/11 "2018-10-08T08:53:38Z")

</div>

Hi Suresh,

We usually keep 5 files per agent, each of which is at most 10 MB in size.

---

<div class="post-metadata">

**Author:** ![suresh230591](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suresh230591/32/280_2.png) [@suresh230591](https://community.dynatrace.com/u/suresh230591)\
**Post date:** [October 8, 2018, 9:57am UTC](https://community.dynatrace.com/t/dynatrace-oneagent-log-rotation/13207/12 "2018-10-08T09:57:14Z")

</div>

Thanks for the information
