<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Limit log timeframe in Troubleshooting</title>
    <link>https://community.dynatrace.com/t5/Troubleshooting/Limit-log-timeframe/ta-p/230209</link>
    <description>&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="tag"&gt;cloudNativeFullStack&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="tag"&gt;applicationMonitoring&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="versiontag"&gt;Dynatrace Operator version 0.10.0+&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;If there's &lt;CODE&gt;DiskPressure&lt;/CODE&gt; 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 &lt;CODE&gt;7&lt;/CODE&gt; (days). To edit this timeframe, select one of the options below, depending on your deployment mode.&lt;/P&gt;
&lt;DIV class="callout"&gt;
&lt;LI-SPOILER&gt;Be careful when setting this value; you might need the logs to investigate problems.&lt;/LI-SPOILER&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;H3&gt;Manual (kubectl/oc)&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;Edit the manifests of the CSI driver daemonset (&lt;CODE&gt;kubernetes-csi.yaml&lt;/CODE&gt;, &lt;CODE&gt;openshift-csi.yaml&lt;/CODE&gt;), by replacing the placeholders (&lt;CODE&gt;&amp;lt;your_value&amp;gt;&lt;/CODE&gt;) with your value.
&lt;PRE&gt;&lt;CODE&gt;apiVersion: apps/v1
kind: DaemonSet
...
spec:
  ...
  template:
    ...
    spec:
      ...
      containers:
        ...
      - name: provisioner
      ...
        env:
          - name: MAX_UNMOUNTED_VOLUME_AGE
            value: &amp;lt;your_value&amp;gt; # defined in days, must be a plain number. `0` means logs are immediately deleted. If not set, defaults to `7`.
        &lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Apply the changes.&lt;/LI&gt;
&lt;/OL&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;H3&gt;helm&lt;/H3&gt;
&lt;P&gt;Edit &lt;CODE&gt;values.yaml&lt;/CODE&gt; to set the &lt;CODE&gt;maxUnmountedVolumeAge&lt;/CODE&gt; parameter under the &lt;CODE&gt;csidriver&lt;/CODE&gt; section.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;csidriver:
  enabled: true
  ...
  maxUnmountedVolumeAge: "" # defined in days, must be a plain number. `0` means logs are immediately deleted. If not set, defaults to `7`.
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 30 Nov 2023 13:40:00 GMT</pubDate>
    <dc:creator>darynakovyrina</dc:creator>
    <dc:date>2023-11-30T13:40:00Z</dc:date>
    <item>
      <title>Limit log timeframe</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Limit-log-timeframe/ta-p/230209</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="tag"&gt;cloudNativeFullStack&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="tag"&gt;applicationMonitoring&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="versiontag"&gt;Dynatrace Operator version 0.10.0+&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;If there's &lt;CODE&gt;DiskPressure&lt;/CODE&gt; 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 &lt;CODE&gt;7&lt;/CODE&gt; (days). To edit this timeframe, select one of the options below, depending on your deployment mode.&lt;/P&gt;
&lt;DIV class="callout"&gt;
&lt;LI-SPOILER&gt;Be careful when setting this value; you might need the logs to investigate problems.&lt;/LI-SPOILER&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;H3&gt;Manual (kubectl/oc)&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;Edit the manifests of the CSI driver daemonset (&lt;CODE&gt;kubernetes-csi.yaml&lt;/CODE&gt;, &lt;CODE&gt;openshift-csi.yaml&lt;/CODE&gt;), by replacing the placeholders (&lt;CODE&gt;&amp;lt;your_value&amp;gt;&lt;/CODE&gt;) with your value.
&lt;PRE&gt;&lt;CODE&gt;apiVersion: apps/v1
kind: DaemonSet
...
spec:
  ...
  template:
    ...
    spec:
      ...
      containers:
        ...
      - name: provisioner
      ...
        env:
          - name: MAX_UNMOUNTED_VOLUME_AGE
            value: &amp;lt;your_value&amp;gt; # defined in days, must be a plain number. `0` means logs are immediately deleted. If not set, defaults to `7`.
        &lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Apply the changes.&lt;/LI&gt;
&lt;/OL&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;H3&gt;helm&lt;/H3&gt;
&lt;P&gt;Edit &lt;CODE&gt;values.yaml&lt;/CODE&gt; to set the &lt;CODE&gt;maxUnmountedVolumeAge&lt;/CODE&gt; parameter under the &lt;CODE&gt;csidriver&lt;/CODE&gt; section.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;csidriver:
  enabled: true
  ...
  maxUnmountedVolumeAge: "" # defined in days, must be a plain number. `0` means logs are immediately deleted. If not set, defaults to `7`.
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 30 Nov 2023 13:40:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Limit-log-timeframe/ta-p/230209</guid>
      <dc:creator>darynakovyrina</dc:creator>
      <dc:date>2023-11-30T13:40:00Z</dc:date>
    </item>
  </channel>
</rss>

