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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# AlertManager Configuration for AbsurderSQL
#
# This configuration defines how alerts are routed, grouped, and sent to notification channels.
# Customize this file to match your notification preferences and infrastructure.
#
# For production use, replace placeholder values with your actual endpoints and credentials.
global:
# Default time to wait before sending a notification about new alerts
resolve_timeout: 5m
# SMTP settings for email notifications (optional)
# smtp_from: 'alertmanager@example.com'
# smtp_smarthost: 'smtp.example.com:587'
# smtp_auth_username: 'alertmanager@example.com'
# smtp_auth_password: 'your-password-here'
# smtp_require_tls: true
# Templates for custom alert formatting
templates:
- '/etc/alertmanager/templates/*.tmpl'
# Route tree for organizing alerts
route:
# Default receiver for all alerts
receiver: 'default'
# Group alerts by these labels
group_by:
# Wait time before sending first notification for a group
group_wait: 30s
# Wait time before sending notification about new alerts added to a group
group_interval: 5m
# Wait time before re-sending a notification
repeat_interval: 4h
# Child routes for specific alert types
routes:
# Critical alerts - immediate notification
- match:
severity: critical
receiver: 'critical-alerts'
group_wait: 10s
group_interval: 1m
repeat_interval: 1h
continue: true # Also send to default receiver
# Warning alerts - less urgent
- match:
severity: warning
receiver: 'warning-alerts'
group_wait: 1m
group_interval: 10m
repeat_interval: 12h
# Info alerts - informational only
- match:
severity: info
receiver: 'info-alerts'
group_wait: 5m
group_interval: 30m
repeat_interval: 24h
# Database-specific alerts
- match:
component: database
receiver: 'database-team'
continue: true
# Performance alerts
- match:
component: performance
receiver: 'performance-team'
continue: true
# Coordination/multi-tab alerts
- match:
component: coordination
receiver: 'coordination-team'
continue: true
# Inhibition rules - suppress certain alerts when others are firing
inhibit_rules:
# Don't alert about high latency if database is down
- source_match:
alertname: 'DatabaseDown'
target_match:
component: 'performance'
equal:
# Don't alert about warnings if critical alert is firing for same component
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
equal:
# Don't alert about elevated error rate if high error rate is firing
- source_match:
alertname: 'HighErrorRate'
target_match:
alertname: 'ElevatedErrorRate'
equal:
# Don't alert about increased latency if latency spike is firing
- source_match:
alertname: 'QueryLatencySpike'
target_match:
alertname: 'IncreasedQueryLatency'
equal:
# Receiver definitions
receivers:
# Default receiver - logs only
- name: 'default'
# Uncomment and configure your preferred notification method
# webhook_configs:
# - url: 'http://localhost:5001/'
# Critical alerts receiver
- name: 'critical-alerts'
# Slack webhook for critical alerts
# slack_configs:
# - api_url: 'https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK'
# channel: '#absurdersql-critical'
# title: '{{ .GroupLabels.alertname }}'
# text: '{{ range .Alerts }}{{ .Annotations.description }}{{ end }}'
# send_resolved: true
# color: 'danger'
# PagerDuty for critical alerts
# pagerduty_configs:
# - service_key: 'YOUR_PAGERDUTY_SERVICE_KEY'
# description: '{{ .GroupLabels.alertname }}: {{ .GroupLabels.instance }}'
# severity: 'critical'
# Email for critical alerts
# email_configs:
# - to: 'oncall@example.com'
# headers:
# Subject: '[CRITICAL] {{ .GroupLabels.alertname }}'
# html: '{{ range .Alerts }}{{ .Annotations.description }}<br/>{{ end }}'
# send_resolved: true
# Warning alerts receiver
- name: 'warning-alerts'
# Slack webhook for warnings
# slack_configs:
# - api_url: 'https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK'
# channel: '#absurdersql-warnings'
# title: '{{ .GroupLabels.alertname }}'
# text: '{{ range .Alerts }}{{ .Annotations.description }}{{ end }}'
# send_resolved: true
# color: 'warning'
# Email for warnings
# email_configs:
# - to: 'team@example.com'
# headers:
# Subject: '[WARNING] {{ .GroupLabels.alertname }}'
# Info alerts receiver
- name: 'info-alerts'
# Webhook for informational alerts
# webhook_configs:
# - url: 'http://localhost:5001/info'
# Team-specific receivers
- name: 'database-team'
# Configure team-specific notification channels
# slack_configs:
# - api_url: 'https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK'
# channel: '#database-team'
- name: 'performance-team'
# slack_configs:
# - api_url: 'https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK'
# channel: '#performance-team'
- name: 'coordination-team'
# slack_configs:
# - api_url: 'https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK'
# channel: '#coordination-team'