Files
homelab-gitops/apps/immich/resources/alerts.yaml
T

50 lines
2.2 KiB
YAML

apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: immich
namespace: immich
spec:
groups:
- name: immich
rules:
- alert: ImmichServerUnavailable
expr: kube_deployment_status_replicas_available{namespace="immich",deployment="immich-server"} < 1
for: 5m
labels:
severity: critical
annotations:
summary: Immich server has no available replicas
description: No Immich server pod has been available for five minutes.
- alert: ImmichMachineLearningUnavailable
expr: kube_deployment_status_replicas_available{namespace="immich",deployment="immich-machine-learning"} < 1
for: 15m
labels:
severity: warning
annotations:
summary: Immich machine-learning service has no available replicas
description: Immich machine learning has been unavailable for fifteen minutes.
- alert: ImmichValkeyUnavailable
expr: kube_deployment_status_replicas_available{namespace="immich",deployment="immich-valkey"} < 1
for: 5m
labels:
severity: critical
annotations:
summary: Immich Valkey has no available replicas
description: Immich's dedicated Valkey instance has been unavailable for five minutes.
- alert: ImmichPostgreSQLMetricsUnavailable
expr: absent(cnpg_collector_up{namespace="immich",cluster="immich-postgresql"}) or max(cnpg_collector_up{namespace="immich",cluster="immich-postgresql"}) < 1
for: 5m
labels:
severity: critical
annotations:
summary: Immich PostgreSQL is unavailable
description: CloudNativePG metrics for the Immich cluster have been unavailable for five minutes.
- alert: ImmichPostgreSQLReplicationLag
expr: max(cnpg_pg_replication_lag{namespace="immich"}) > 300
for: 10m
labels:
severity: warning
annotations:
summary: Immich PostgreSQL replicas are behind
description: A PostgreSQL replica has had more than five minutes of replay lag for ten minutes.