Hello all,
We use Prometheus + Alertmanager inside an EKS cluster. The whole setup works fine, except when we turn off the cluster at night, we lose the silences. They are not persisted.
Prometheus and Alertmanager are deployed as StatefulSets, with a volumeClaimTemplates.
Prometheus data is persisted fine in EBS using a StorageClass item in Kubernetes + volumeClaimTemplates in the StatefulSet + mountPath: /prometheus
But for alertmanager, it does not work. The EBS volume is mounted and attached to the pod, but the data doesnt seem to get persisted.
I have no clue why, and I have no idea how to debug this, no logs
Version / image : prom/alertmanager:v0.20.0
Arguments :
- --config.file=/etc/alertmanager/config.yml
- --storage.path=/alertmanager
Mounted Volume :
volumeMounts:
- name: alertmanager
mountPath: /alertmanager
Volume claim :
volumeClaimTemplates:
- metadata:
name: alertmanager
annotations:
volume.beta.kubernetes.io/storage-class: encrypted-alertmanager-ebs
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 1Gi
and finally storage class:
I understand this question touches both Alertmanager configuration and Kubernetes, but I could not find a single definitive guide / doc on the alertmanager storage persisting options, and therefore I think it can be valuable for the community to solve this here