# Limit log timeframe

**URL:** <https://community.dynatrace.com/t/limit-log-timeframe/42903>\
**Category:** Troubleshooting\
**Tags:** kubernetes\
**Created:** [November 30, 2023, 1:40pm UTC](https://community.dynatrace.com/t/limit-log-timeframe/42903 "2023-11-30T13:40:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![darynakovyrina](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/darynakovyrina/32/30846_2.png) [@darynakovyrina](https://community.dynatrace.com/u/darynakovyrina)\
**Post date:** [November 30, 2023, 1:40pm UTC](https://community.dynatrace.com/t/limit-log-timeframe/42903/1 "2023-11-30T13:40:00Z")

</div>

**cloudNativeFullStack**

**applicationMonitoring**

**Dynatrace Operator version 0.10.0+**

If there’s `DiskPressure` on your nodes, you can configure the CSI driver log garbage collection interval to lower the storage usage of the CSI driver. The default value of keeping logs before they are deleted from the file system is `7` (days). To edit this timeframe, select one of the options below, depending on your deployment mode.

SpoilerBe careful when setting this value; you might need the logs to investigate problems.

### Manual (kubectl/oc)

1. Edit the manifests of the CSI driver daemonset (`kubernetes-csi.yaml`, `openshift-csi.yaml`), by replacing the placeholders (`<your_value>`) with your value.

2. Apply the changes.

### helm

Edit `values.yaml` to set the `maxUnmountedVolumeAge` parameter under the `csidriver` section.

```auto
csidriver:
  enabled: true
  ...
  maxUnmountedVolumeAge: "" # defined in days, must be a plain number. `0` means logs are immediately deleted. If not set, defaults to `7`.

```
