All checks were successful
release-charts-postgres-cluster / release (push) Successful in 18s
18 lines
851 B
YAML
18 lines
851 B
YAML
{{- $alert := "CNPGClusterHighConnectionsWarning" -}}
|
|
{{- if not (has $alert .excludeRules) -}}
|
|
alert: {{ $alert }}
|
|
annotations:
|
|
summary: CNPG Instance is approaching the maximum number of connections.
|
|
description: |-
|
|
CloudNativePG Cluster "{{ .namespace }}/{{ .cluster }}" instance {{ .labels.pod }} is using {{ .value }}% of
|
|
the maximum number of connections.
|
|
runbook_url: https://github.com/cloudnative-pg/charts/blob/main/charts/cluster/docs/runbooks/CNPGClusterHighConnectionsWarning.md
|
|
expr: |
|
|
sum by (pod) (cnpg_backends_total{namespace="{{ .namespace }}", pod=~"{{ .podSelector }}"}) / max by (pod) (cnpg_pg_settings_setting{name="max_connections", namespace="{{ .namespace }}", pod=~"{{ .podSelector }}"}) * 100 > 80
|
|
for: 5m
|
|
labels:
|
|
severity: warning
|
|
namespace: {{ .namespace }}
|
|
cnpg_cluster: {{ .cluster }}
|
|
{{- end -}}
|