Files
sbbb/base/data/postgres-alertrules.yaml
Sienna Meridian Satterwhite 9f15f5099e fix: meet external-api route, drive media proxy, alertbot, misc tweaks
- Meet: add external-api backend path, CSRF trusted origins
- Drive: fix media proxy regex for preview URLs and S3 key signing
- OpenBao: enable Prometheus telemetry
- Postgres alerts: fix metric name (cnpg_backends_total)
- Gitea: bump memory limits for mirror workloads
- Alertbot: expanded deployment config
- Kratos: add find/cal/projects to allowed return URLs, settings path
- Pingora: meet external-api route fix
- Sol: config update
2026-03-25 18:01:15 +00:00

38 lines
1.2 KiB
YAML

apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: postgres-alerts
namespace: data
labels:
role: alert-rules
spec:
groups:
- name: postgres
rules:
- alert: PostgresDown
expr: cnpg_collector_up == 0
for: 2m
labels:
severity: critical
annotations:
summary: "PostgreSQL instance is down"
description: "CNPG collector reports {{ $labels.namespace }}/{{ $labels.pod }} is down."
- alert: PostgresDatabaseSizeLarge
expr: cnpg_pg_database_size_bytes > 7e9
for: 5m
labels:
severity: warning
annotations:
summary: "PostgreSQL database size is large"
description: "Database {{ $labels.datname }} is {{ $value | humanize1024 }} (PVC limit 10Gi)"
- alert: PostgresHighConnections
expr: sum by (pod) (cnpg_backends_total) > 80
for: 5m
labels:
severity: warning
annotations:
summary: "PostgreSQL connection count is high"
description: "Pod {{ $labels.pod }} has {{ $value }} active connections."