The log_analytics_collector
ActiveGate module utilizes disk buffers to temporarily store data. To avoid data loss across ActiveGate restarts, we recommend attaching a PersistentVolumeClaim (PVC) to the ActiveGate.
The following snippet shows how you can attach the PersistentVolumeClaim to the ActiveGate in the DynaKube.
apiVersion: dynatrace.com/v1beta5kind: DynaKubemetadata:name: dynakubenamespace: dynatracespec:activeGate:volumeClaimTemplate:accessModes:- ReadWriteOnceresources:requests:storage: 1Gi
When the ActiveGate performs a graceful shutdown (for example, in a scale-in scenario), it needs to flush buffers to avoid data loss. In large environments, this can take longer than the default grace period of Kubernetes, which is 30s. To avoid this, setting a longer terminationGracePeriodSeconds
on the ActiveGate pods can be helpful. You can change it as shown in the following snippet.
apiVersion: dynatrace.com/v1beta4kind: DynaKubemetadata:name: dynakubenamespace: dynatracespec:activeGate:terminationGracePeriodSeconds: 120s