You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
948 B
YAML

apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
labels:
prometheus: kube-prometheus-stack-prometheus
role: alert-rules
release: {{ .Values.global.prometheus.release_label }}
name: postgres-basebackup
spec:
groups:
- name: "postgres_basebackup.rules"
rules:
- alert: postgres basebackup too old
for: 5m
labels:
team: {{ .Values.postgres.monitoring.alerts.postgres.basebackup.teamLabel | quote }}
severity: critical
expr: absent(pg_basebackup_successful_timestamp_{{ .Release.Name | lower | replace "-" "_" }}) or (time() - pg_basebackup_successful_timestamp_{{ .Release.Name | lower | replace "-" "_" }} > {{ .Values.postgres.monitoring.alerts.postgres.basebackup.timeThreshold }})
annotations:
message: last postgres backup found older than {{ .Values.postgres.monitoring.alerts.postgres.basebackup.timeThreshold }}