Configure persistent storage for the ActiveGate

  • 1-min read
  • Published Apr 16, 2025

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.

Adding a PersistentVolumeClaim

The following snippet shows how you can attach the PersistentVolumeClaim to the ActiveGate in the DynaKube.

apiVersion: dynatrace.com/v1beta5
kind: DynaKube
metadata:
name: dynakube
namespace: dynatrace
spec:
activeGate:
volumeClaimTemplate:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi

Adjusting ActiveGate shutdown grace period

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/v1beta4
kind: DynaKube
metadata:
name: dynakube
namespace: dynatrace
spec:
activeGate:
terminationGracePeriodSeconds: 120s