forked from PinSpace-Org/GistPin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreplication-lag.yml
More file actions
46 lines (43 loc) · 1.76 KB
/
Copy pathreplication-lag.yml
File metadata and controls
46 lines (43 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
groups:
- name: rds-replication
rules:
# Replica lag warning — risk of stale reads
- alert: ReplicaLagWarning
expr: aws_rds_replica_lag_average > 10
for: 5m
labels:
severity: warning
team: platform
annotations:
summary: "RDS replica lag elevated ({{ $labels.db_instance_identifier }})"
description: "Replica lag is {{ $value }}s — stale reads may occur. Threshold: 10s."
# Replica lag critical — trigger failover consideration
- alert: ReplicaLagCritical
expr: aws_rds_replica_lag_average > 60
for: 2m
labels:
severity: critical
team: platform
annotations:
summary: "RDS replica lag critical ({{ $labels.db_instance_identifier }})"
description: "Replica lag is {{ $value }}s. Consider routing reads back to primary."
# Replica not replicating (lag goes to 0 and replica is not active)
- alert: ReplicaReplicationStopped
expr: aws_rds_replica_lag_average == 0 and aws_rds_database_connections_average == 0
for: 3m
labels:
severity: critical
team: platform
annotations:
summary: "Replica replication may have stopped ({{ $labels.db_instance_identifier }})"
description: "Replica shows 0 lag but 0 connections — replication may be broken."
# Primary DB high CPU (may affect replication throughput)
- alert: PrimaryDBHighCPU
expr: aws_rds_cpuutilization_average{role="primary"} > 80
for: 10m
labels:
severity: warning
team: platform
annotations:
summary: "Primary RDS CPU > 80%"
description: "High CPU on primary may impact replication to replicas."