Configure persistent storage for the ActiveGate

  • 1min
  • 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 two steps describe how to add a PersistentVolumeClaim to the ActiveGate:

Below is an example of a PersistentVolumeClaim. Adjust it according to the specific requirements of your environment.

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: activegate-storage
namespace: dynatrace
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi

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

apiVersion: dynatrace.com/v1beta4
kind: DynaKube
metadata:
name: dynakube
namespace: dynatrace
spec:
activeGate:
persistentVolumeClaim: activegate-storage

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