Files
helm-charts/charts/postgres-cluster/prometheus_rules/cluster-long_running_transaction-warning.yaml
2025-12-26 21:53:57 -06:00

17 lines
532 B
YAML

{{- $alert := "CNPGClusterLongRunningTransactionWarning" -}}
{{- if not (has $alert .excludeRules) -}}
alert: {{ $alert }}
annotations:
summary: CNPG Cluster query is taking longer than 5 minutes.
description: |-
CloudNativePG Cluster Pod {{`{{`}} $labels.pod {{`}}`}}
is taking more than 5 minutes (300 seconds) for a query.
expr: |-
cnpg_backends_max_tx_duration_seconds{namespace="{{ .namespace }}"} > 300
for: 1m
labels:
severity: warning
namespace: {{ .namespace }}
cnpg_cluster: {{ .cluster }}
{{- end -}}