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 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: v1kind: PersistentVolumeClaimmetadata:name: activegate-storagenamespace: dynatracespec:accessModes:- ReadWriteOnceresources:requests:storage: 1Gi
The following snippet shows how you can attach the PersistentVolumeClaim to the ActiveGate in the DynaKube.
apiVersion: dynatrace.com/v1beta4kind: DynaKubemetadata:name: dynakubenamespace: dynatracespec:activeGate:persistentVolumeClaim: activegate-storage
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