Repository navigation
|
Hi, we are currently using volume snapshot and object store backups. Thanks, |
Replies: 2 comments 5 replies
|
Hi @lnxu303! I'm Dosu and I’m helping the cloudnative-pg team. There are currently no new or replacement Prometheus metrics specifically for monitoring failed volume snapshot backups in CloudNativePG. The deprecated metrics— Alternatively, you can monitor the status of In summary: use the deprecated metrics if you need Prometheus monitoring, or watch the backup resource status for failures if you want a more future-proof approach. To reply, just mention @dosu. Docs are dead. Just use Dosu. |
|
In case anyone else is experiencing this issue, we have now found the following solution for monitoring failed backups: We enabled custom resource state in the We then added our custom alerting rules to the existing prometheusrule.yaml: - alert: FailedObjectStoreBackup
annotations:
description: |-
Last object store backup failed. Use kubectl -n zitadel get backups.postgresql.cnpg.io -o json | jq '.items[] | select(.status.phase == "failed" and .spec.method == "plugin") | { name: .metadata.name, error: .status.error, startedAt: .status.startedAt }' to list failed object store backups.
summary: Checks if the last object store backup has failed.
expr: |-
(barman_cloud_cloudnative_pg_io_last_failed_backup_timestamp - barman_cloud_cloudnative_pg_io_last_available_backup_timestamp) > 1
for: 1m
labels:
severity: warning
- alert: FailedVolumeSnapshotBackup
annotations:
description: |-
Last volume snapshot backup failed. Use kubectl -n zitadel get backups.postgresql.cnpg.io -o json | jq '.items[] | select(.status.phase == "failed" and .spec.method == "volumeSnapshot") | { name: .metadata.name, error: .status.error, startedAt: .status.startedAt }' to list failed volume snapshot backups.
summary: Checks if the last volume snapshot backup has failed.
expr: |-
(max(kube_customresource_cnpg_last_backup_started_at{method = "volumeSnapshot", phase = "failed"}) - max(kube_customresource_cnpg_last_backup_started_at{method = "volumeSnapshot", phase = "completed"})) > 1
for: 1m
labels:
severity: warning |
In case anyone else is experiencing this issue, we have now found the following solution for monitoring failed backups:
We enabled custom resource state in the
values.yamlfor the kube-state-metrics sub chart (as part ofkube-prometheus-stack):